Tuesday January 18, 2005
JunkfoodFood and Junk. Roller: Customizing Comment Details Through experimentation, I've found that you can write macros that override the default implementation by Roller. On comments pages, email addresses (or IP addresses, if no email is provided) and websites are displayed by default. I don't like this behavior, so I wrote a macro that overrides it. The macro gets added to the top of the Weblog file, just after the DOCTYPE line.
#macro( showCommentDetails $comment $showPermalink )
$dateFormatter.applyPattern($text.get( "macro.weblog.datepattern" ))
#set($email = $utilities.hexEncode($comment.email))
<p class="comment-details">
$text.get("macro.weblog.postedby")
#if (!$stringUtils.isEmpty($comment.name))
<b>$comment.name</b>
#else
<b>Anonymous</b>
#end
$text.get("macro.weblog.on") $dateFormatter.format($comment.postTime)
#if( $showPermalink )
<a href=
"${ctxPath}/comments/${userName}/${page.link}/${entry.anchor}#comment${velocityCount}"
class="entrypermalink"
title="$text.get( "macro.weblog.commentpermalink.title" )">#</a>
#end
</p>
#end
The macro is intended for use with Roller 1.0. I'm not sure whether it works with other versions. (2005-01-18 08:00:00.0) Permalink | Comments [2] |
Calendar
Recent Entries
SearchNavigation
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||