From 748566ef33bd247a9bc020ca13db4c8a0ed9b05d Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Wed, 13 Apr 2011 07:41:51 +0200 Subject: [PATCH] New 'topic' and 'id' optional CGI arguments to 'RSS_COMMENTS'. --- RELEASE_NOTES | 2 ++ templates/art5/RSS_COMMENTS | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index e0b64aa..d6e0254 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -11,6 +11,8 @@ Gruta Release Notes - A new checkbox to show the full story in indexes (so that the abstract and the body are the same, no need to add the magic separator mark at the end) + - The `RSS_COMMENTS' template now accepts optional `topic' + and `id' arguments to return comments only from a story - Bug fixes: - Fixed a crash in RSS and TOPIC when a subscriber-only story was defined diff --git a/templates/art5/RSS_COMMENTS b/templates/art5/RSS_COMMENTS index b8580f2..ed505e1 100644 --- a/templates/art5/RSS_COMMENTS +++ b/templates/art5/RSS_COMMENTS @@ -21,7 +21,14 @@ '' {foreach - {comments {or %num 10}} + {if + {and + {ne %topic ''} + {ne %id ''} + } + {reverse {story_comments %topic %id}} + {comments {or %num 10}} + } { '' -- 2.11.4.GIT