adress the comment and not the article in rss-feed

Discussion corner for Developers of Serendipity.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

adress the comment and not the article in rss-feed

Post by stm999999999 »

Hello,

If you get an rss/atom-feed of the comments, every rss-item has a link to the article. When you click on it, you will go to the article, but not to the comment directly. If the article have many comments, I think this is not so good.

With the following change you go directly to the comment you see in your feed-reader:

on every (default-)theme-feed-tpl

replace every

Code: Select all

{$entry.feed_entryLink}
with

Code: Select all

{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}

And, to do this with trackbacks , too: Insert an id on every trackback (on the comments this is default now)

trackbacks.tpl:

Code: Select all

{foreach from=$trackbacks item=trackback}
	<a id="c{$trackback.id}"></a>
    <div class="serendipity_comment">

you can see it in action: http://blog.stephan.manske-net.de/feeds ... backs.rss2
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: adress the comment and not the article in rss-feed

Post by garvinhicking »

Hi!

Good suggestion, committed!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply