I know nothing about RSS so I wanted to ask if anyone here could tell me how to mod rss.php so that the feed shows the story's category too?
I use an iframe to display my rss feed on a couple of other pages, but with only the the title, summer, and rating showing no-one knows what category the story they're clicking on belongs to unless the characters are in the summery.
And if anyone knows anything about adding css to the feeds too, that would be great. Thanks in advance.
I am definitely not sure on the subject of RSS, but I don't think it's possible to add CSS to your feed. As the whole point of RSS is 'really simple syndication' and having CSS could override 'default styling' within the RSS agreggator.
archive:
site:
Available for skin/mod commission! π
I'm pretty sure it can be done. It's not so much for the rss page itself as it's for reader that are able to handle it in most cases. I'm researching the subject now, but here are a few of links I came across:
http://www.talkingtree.com/blog/index.cfm/2005/2/20/CSSRSS
http://www.hicksdesign.co.uk/tag/css/
http://fozbaca.org/mt/mt-comments.cgi?entry_id=3034
http://forums.omnigroup.com/archive/index.php/t-139.html
Just wanted to say I was able to add the category to the RSS feed with eFiction 3.3 by adding the following code to rss.php. Just below the code that sets the $ratings array in a while loop, add this block, which is very similar:
$catlist = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_categories");
while($cat = dbassoc($catlist)) {
$categories[$cat['catid']] = $cat['category'];
}
Then change this line:
<title>".strip_tags(xmlentities($story['title']))." "._BY." ".strip_tags(xmlentities( $story['penname']))." [".$ratings[$story['rid']]."]</title>
to this:
<title>".strip_tags(xmlentities($story['title']))." "._BY." ".strip_tags(xmlentities( $story['penname']))." [".$categories[$story['catid']]."] [".$ratings[$story['rid']]."]</title>
Seems to work, anyway: http://www.thealphagate.com/rss.php
ETA: it doesn't work for stories in multiple categories...
Very nice Michelle! Thanks for sharing this with us.
