content => $preview);
});
- my $template = template("comments_display.tmpl");
+ my $template = template("comment.tmpl");
$template->param(content => $preview);
$template->param(title => $form->field('subject'));
$template->param(ctime => displaytime(time));
if ($shown) {
$comments = IkiWiki::preprocess_inline(
pages => "internal($page/$config{comments_pagename}*)",
- template => 'comments_display',
+ template => 'comment',
show => 0,
reverse => 'yes',
page => $page,
feeds that can be used to subscribe to those comments. But you'd like to
add a feed that contains all the comments posted to any page. Here's how:
- \[[!inline pages="internal(*/comment_*)" template=comments_display]]
+ \[[!inline pages="internal(*/comment_*)" template=comment]]
The special [[ikiwiki/PageSpec]] matches all comments. The
[[template|wikitemplates]] causes the comments to be displayed formatted
> a good feature to have, though. --[[smcv]]
* One can use inline to set up a feed of all comments posted to any page.
- Using template=comments_display they are displayed right. Only problem
+ Using template=comment they are displayed right. Only problem
is there is no indication in that template of what page each comment in the
feed is a comment on. So, if a comment is inlined into a different page,
I think it should show a link back to the page commented on.
form to wiki pages.
* `searchquery.tmpl` - This is an omega template, used by the
[[plugins/search]] plugin.
-* `comments_display.tmpl` - This template is used to display a comment
+* `comment.tmpl` - This template is used to display a comment
by the [[plugins/comments]] plugin.
* `comments_form.tmpl` - This template is the comment post form for the
[[plugins/comments]] plugin.
--- /dev/null
+<div class="comments-display" id="<TMPL_VAR NAME=INLINEPAGE>">
+
+<div class="comments-header">
+Posted by
+<TMPL_IF NAME="COMMENTUSER">
+<span class="author">
+<TMPL_IF NAME="COMMENTAUTHORURL">
+<a href="<TMPL_VAR NAME=COMMENTAUTHORURL>"><TMPL_VAR NAME=COMMENTAUTHOR></a>
+<TMPL_ELSE>
+<TMPL_VAR NAME=AUTHOR>
+</TMPL_IF>
+</span>
+<TMPL_ELSE>
+<TMPL_IF NAME=COMMENTIP>
+<span class="author">
+<TMPL_VAR NAME=COMMENTIP>
+</span>
+<TMPL_ELSE>
+unknown IP address
+</TMPL_IF>
+
+<TMPL_IF NAME=AUTHOR>
+(<span class="claimedauthor"><TMPL_IF NAME="AUTHORURL"><a href="<TMPL_VAR NAME=AUTHORURL>"><TMPL_VAR NAME=AUTHOR></a><TMPL_ELSE><TMPL_VAR NAME=AUTHOR></TMPL_IF></span>)
+</TMPL_IF>
+</TMPL_IF>
+
+(<TMPL_VAR CTIME>)
+</div>
+
+<div class="comments-subject"><TMPL_VAR TITLE></div>
+
+<div class="inlinecontent">
+<TMPL_VAR CONTENT>
+</div>
+
+</div><!--.comments-display-->
+++ /dev/null
-<div class="comments-display" id="<TMPL_VAR NAME=INLINEPAGE>">
-
-<div class="comments-header">
-Posted by
-<TMPL_IF NAME="COMMENTUSER">
-<span class="author">
-<TMPL_IF NAME="COMMENTAUTHORURL">
-<a href="<TMPL_VAR NAME=COMMENTAUTHORURL>"><TMPL_VAR NAME=COMMENTAUTHOR></a>
-<TMPL_ELSE>
-<TMPL_VAR NAME=AUTHOR>
-</TMPL_IF>
-</span>
-<TMPL_ELSE>
-<TMPL_IF NAME=COMMENTIP>
-<span class="author">
-<TMPL_VAR NAME=COMMENTIP>
-</span>
-<TMPL_ELSE>
-unknown IP address
-</TMPL_IF>
-
-<TMPL_IF NAME=AUTHOR>
-(<span class="claimedauthor"><TMPL_IF NAME="AUTHORURL"><a href="<TMPL_VAR NAME=AUTHORURL>"><TMPL_VAR NAME=AUTHOR></a><TMPL_ELSE><TMPL_VAR NAME=AUTHOR></TMPL_IF></span>)
-</TMPL_IF>
-</TMPL_IF>
-
-(<TMPL_VAR CTIME>)
-</div>
-
-<div class="comments-subject"><TMPL_VAR TITLE></div>
-
-<div class="inlinecontent">
-<TMPL_VAR CONTENT>
-</div>
-
-</div><!--.comments-display-->