I recently begin experimenting with Sweetcron for my personal website zinnidesign.com. As a lifestreaming tool I have found Sweetcron to be both easy to use and functional. Installation could be easier or better documented (cpanel addon domains are tricky), but overall it has proven to be a solid product.
While experimenting with Sweetcron it occurred to me that while the idea behind the software was to collect personal feeds, it could easily be used to collect other feeds as well. Depending on your needs, some of the features present in Sweetcron may be overkill for a mashup, but those can just be avoided. This tutorial will show you how to create a Sweetcron theme that grabs the titles of articles collected from feeds all around the internet and display them as a list of links.
Personally, I never got into feed readers, and setting up a listing of feeds has been my happy medium. With this mashup I can now view the article on its original webpage without having to click through tons of bookmarks to find something new. I can see exactly which articles are new, and even have the added benefit of allowing other people to follow my list as well. To see an example of what we will be creating, please take a look at AssociationFeed.com.
STEP 1: INSTALL SWEETCRON
Follow the instructions for installing Sweetcron that are listed within the documentation, if you are having any problems there is also a discussion group that can help you.
STEP 2: DESIGN YOUR THEME
Use the graphics program of your choice to design a list of links. Potentially you could design a full theme however for the scope of what I am doing in this tutorial all your concept will need the following items:
- A Header containing your logo and navigation
- A body area that contains the Article Titles as links, and the name of the blog as a link
- The pagination for the entries
- (optional) a footer with copyright info
STEP 3: ADD SOME FEEDS
Login to your Sweetcron admin section by pointing your browser to: http://www.yourdomain.com/admin/ and click the “Feeds” tab at the top. Next Click the “Add New Feed” button in the column on the right and paste the URL of a RSS feed in the box. Click the “Add This Feed” button and repeat these steps a couple of times with different feeds for testing purposes.
To pull in the information you will need to click the “Items” tab, and then click the “Fetch New Items Now” button to manually check your feeds. If all has gone correctly you will see information populate in the column on the left side.
STEP 4: DOWNLOAD MY FRAMEWORK
I have created a stripped down “naked” theme that is perfect for this use. All you will need to do is download my supporting files and style them to fit your design.
Download the Supporting Files (.zip)
The main files are split up between the items.php, _header.php, _activity_feed.php, _footer.php files and _sidebar.php ( _sidebar.php is not in use with this theme so it is a blank file). rss_feed.php is what could be considered a system file, and should not be edited unless you are doing some advanced features. main.css has also been included but is a blank file, this is where you will be placing all of your styles.
Getting started is as simple as opening up the three main files and adding your own styles to the main.css file.
STEP 5: ADD ANY ADDITIONAL PAGES
In Sweetcron, pages are simply basic html pages. Create a new PHP file and then follow the steps found in this part of the documentation to add the page and make the navigation highlighting work. A sample about.php page has been included in the downloaded files to help showcase how the navigation highlighting works.
STEP 6: SWITCH TO A TRUE CRON
By defualt Sweetcron runs in a pseudo cron mode. This means that every half an hour one unlucky visitor will initiate the creation of new cache files. This will also mean that this unlucky visitor will see some rather long load times while the feeds are being pulled in and the script is running. To avoid this we can set up a true cron to run the process behind the scenes every half hour instead. Doing this is slightly tricky and varies based on your hosting provider.
To setup the true cron, first login to the admin section. Next, click the “Options” tab and select a “True Cron” from the Cron Type area. The software will then give you a URL to the cron script that your server will need to run in order to pull the new feeds in. (Note: on my server I needed to place curl in front of the URL to make it work).
Well thats it, six steps and you have a fully functioning mashup of blog articles. Obviously getting into how to develop a standards compliant website is way outside the scope of this tutorial, however any experienced web developer should be able to put this whole tutorial together in a matter of hours. If you have any questions, please ask them in the comments below and hopefully either I or the other readers can be of some help.
Great news! Guess that makes me the first to comment. 🙂 Just kidding.
My question is a bit off topic, but any idea how I can recover / reset a lost Sweetcron password? I installed it on my personal blog and now I can’t find any relevant info online or in the docs.