Page 1 of 1
how to display tags in rss from smarty tpl? and rss limiting
Posted: Tue Jun 13, 2006 4:44 am
by hotroast
I can't seem to figure out the right code to use to display the freetags in the RSS output. I tried adding something like {$entry.footer} in feed_2.0.tpl but it came up blank. That's where I found the from the entries.tpl file. That's still probably not right though, since basically just need a list of keywords (ie. tag, tag, tag, ...)
Also, does anyone know how to limit the # of recent entries to show in the RSS output? Right now it seems to be showing every entry, instead of, say just the last 5 or so.
Thanks!
Re: how to display tags in rss from smarty tpl? and rss limi
Posted: Tue Jun 13, 2006 8:21 am
by garvinhicking
Hi!
Actually the tags of the freetag plugin are automatically put into the RSS output. No need to modify any files. Which s9y version and plugin version are you using?
The tags are outputted as "<category>" items.
The number of entries to show in RSS is a configurable item since serendipity 1.1 versions, I think. By default it is set to 15. In other s9y versions you would need to patch your rss.php file and set the $serendipity['fetchLimit'] variable to the desired number.
Regards,
Garvin
Posted: Tue Jun 13, 2006 8:36 pm
by hotroast
it seemed as if it should, however it wasn't outputting it that's why I'm figuring I need to add something to the .tpl file that controls the output of the rss feed. I assume the freetag plugin still needs something in there wouldn't it? Currently using:
Tagging of entries
Allows freestyle tagging of entries
version: 2.42
Serendipity 1.0-beta2
You can also see the feed at
http://www.vlogolution.com/vlog/feeds/c ... oMONEY.rss
Note that the other categories you see (ie itunes) were put in directly via the tpl file. Also, category tag in the items seems to be for the actually blog category, which I also use for the other tags. However, no freetags are passing through. Again, probably just missing something in the tpl file . Also, is 15 the rss limit set for pre-1.1 as well?
Thanks!
Posted: Tue Jun 13, 2006 8:52 pm
by garvinhicking
Hi!
Maybe you could try the recent freetag version, it should be 2.49.
Then, if you view your Atom 1.0 feed, are the tags contained in there?
What does yoru feed_2.0 tpl file look like? The plugin emits its data into the "display_dat" portion of the entries array. Maybe you've accidentaly removed the output.
In 1.1 the default for RSS is also 15 entries.
Regards,
Garvin
Posted: Thu Jun 15, 2006 12:04 am
by hotroast
ok garvin - just solved it!

apparently the problem was with the creative commons license plugin. after tracing through, the freetag plugin was working fine. the problem is that the cc plugin has several lines that assign 'display_dat' completely as opposed to adding to it...
$eventData['display_dat'] = "...";
should be
$eventData['display_dat'] .= "...";
This occurs in a bunch of places in the plugin. Once I changed it, everything works properly for the rss! People would only notice this if the creative commons plugin was linking in after another plugin (like it was for me - in this case the freetag plugin was higher on the plugin list and the output was getting nuked).
Posted: Thu Jun 15, 2006 1:34 pm
by garvinhicking
Hi!
Thanks a bunch! I also committed this fix to SVN trunk!
Best regards,
Garvin