folderblog
What is folderblog?
Folderblog is a free PHP script that automatically displays the images placed in a given directory, no database needed. It can be used as a blog or gallery — and anything in between.

» demo blog   » learn more   » download now

Discussion
fb3b RSS feed bug fix(back to index)
The the RSS 2.0 feed in the fb3b05 build (and mostly previous builds) does not validate, when tested here, as the <dc:date> tag is not part of the RSS 2.0 specification and the date stamp isn't in the RFC 822 format.

The language is also fixed as "en-us", which could also be an issue for some Folderblog users.

To fix both of these problems, you'll have to hack the fb.php file. Locate line 275, which is a bit of an epic and looks like this:

$rss = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<rss version=\"2.00\">\n<channel>\n<title>$blog_title</title>\n<link>http://" . $_SERVER["SERVER_NAME"] . "$fbfile</link>\n<dc:date>" . date("Y-m-d\TH:i:s+0I:00") . "</dc:date>\n<description>Recently Posted</description>\n<language>en-us</language>\n";

Replace this line with the following:

$rss = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<rss version=\"2.0\">\n<channel>\n<generator>Folderblog 3</generator>\n<title>$blog_title</title>\n<link>http://" . $_SERVER["SERVER_NAME"] . "$fbfile</link>\n<description>$rss_desc</description>\n<language>$rss_lang</language>\n<lastBuildDate>" . date("r") . "</lastBuildDate>\n<webMaster>$email_comments_to</webMaster>\n<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n";

You'll now also need to add some new variables to the fb_vars.php file. Locate line 20, which looks like this:

$fbrss = "rss.xml"; // Filename for RSS feed; leave blank for no feed

Add the following two lines immediately after it:

$rss_desc = "Recently posted image captions"; // Description for the RSS feed
$rss_lang = "en-gb"; // Language for the RSS feed


You can now change the feed's description and language, and should now have a valid RSS 2.0 feed.

This revision includes a generator tag (Folderblog 3, obviously!), and the email address you specify in fb_vars.php for comment notifications (used here so folks can email you about techinical issues regarding the feed). Also included is the link to the RSS 2.0 specification documents, so you'll always have a handy reference.

Donald might like to update future beta builds to fix this problem.
posted by Elwing on 22 Jun 05 at 8:24 AM
Ahem. Sorry about the messy presentation of the above post. Perhaps Donald can fix it so it fits into this forum's template!
posted by Elwing on 22 Jun 05 at 8:28 AM
Elwing, thanks so much. I admittedly know basically nothing about RSS, so these changes should definitely help.
posted by donald on 22 Jun 05 at 4:38 PM
Is there some way to get the RSS feed to show more than 2 entries at a time?
posted by James on 29 Jun 05 at 10:09 PM
James, the RSS feed should show 10 entries by default.

Make sure you use your /post/ interface. The feed is only updated on post.
posted by donald on 30 Jun 05 at 1:18 AM
James you can have as many entries as you like in the feed, but what you need to do is open the rss-photos file and enter the number you want down the file ie
1
2
3
Will give you three entries. The default is 10 and if you have already started posting you will notice that each number has now been replaced by the recent entries names with the most recent post being uppermost. To reset that you need to delete those entries and number down to whatever amount of rss feed entries you want and save the rss-photos file back to your photoblog (remember *not* to save it as a .txt file or anything just leave it as is)
Then you have to go back and "update" the recent entries covered by your rss feed entry number so for 3 you go back 3, for 13 you go back 13 photos. This is how it has worked for me anyway. (Eventually I went back to the default 10 entries)
:-)>
posted by Cameron on 1 Jul 05 at 12:48 AM
Is there a way to generate the RSS automatically without hitting "Post" ? I'm using folderblog and automatically uplading photos to the server, though not using "Post"...
posted by Miguel on 6 Nov 05 at 12:10 PM
No this is not possible, at least not in the regular constellation of folderblog. Just to give you an idea, this would require that you have a so-called cron job running a separate php script every day to check whether there are new files of the server. Feel free to realize this, if you know programming, as it surely would be an interesting feature.
posted by ikue on 7 Nov 05 at 2:23 AM
Post a Reply:

Name:    Remember me
URL:    
(include http:// or mailto:)
(back to index)