#** * Comment page links and comment forms. *# #** * Display the pop-up comments link for a weblog entry. * Use the URL for the href attribute for those who have disabled * javascript or who desire to open the comments window in another (Mozilla) tab. * @param entry WeblogEntryData object for which link is to be displayed. *# #macro( showCommentsLink $entry ) #set( $commentCount = $entry.commentCount ) #if ($entry.commentsStillAllowed || $commentCount > 0) #set( $link = "$url.comments($entry.anchor)?popup=true" ) $text.get( "macro.weblog.comments" ) [$commentCount] #end #end #** * Display the in-page comments link for a weblog entry. * @param entry WeblogEntryData object for which link is to be displayed. *# #macro( showCommentsPageLink $entry ) #set( $commentCount = $entry.commentCount ) #if ($entry.commentsStillAllowed || $commentCount > 0) #set( $link = "$url.comments($entry.anchor)" ) $text.get( "macro.weblog.comments" ) [$commentCount] #end #end #** * Display link for comments that renders a dynamically (DHTML) generated * comments form - Matt Raible's "twisty comments" style. * @param entry WeblogEntryData object for which link is to be displayed. *# #macro( showCommentsDiv $entry ) #set( $commentCount = $entry.commentCount ) #if ($entry.commentsStillAllowed || $commentCount > 0)
#if($commentCount == 0) $text.get( "macro.weblog.addcomment" ) #elseif($commentCount == 1) $commentCount $text.get( "macro.weblog.comment" ) #else $commentCount $text.get( "macro.weblog.comments" ) #end
#end #end #** * PRIVATE. Macro for displaying Comment details (not content). **# #macro( showCommentDetails $comment $showPermalink )

$text.get("macro.weblog.postedby") #if (!$utils.isEmpty($comment.name) && !$utils.isEmpty($comment.url)) $utils.escapeHTML($comment.name) #elseif (!$utils.isEmpty($comment.name)) $utils.escapeHTML($comment.name) #else $utils.escapeHTML($comment.remoteHost) #end $text.get("macro.weblog.on") $utils.formatDate($comment.postTime, $text.get( "macro.weblog.datepattern" )) #

#end #** * Display all comments comments for an entry. * @param entry WeblogEntryData object for which comments are to be displayed. *# #macro( showComments $entry ) ## replaced by Roller 3.0 version #showWeblogEntryComments($entry) #end #** * Display recent comments for whole blog (not just one entry). * @param numComments Maximum number of comments to be displayed **# #macro( showRecentComments $numComments ) #if( !$numComments ) #set( $numComments = 20 ) #end #if( $numComments > 100 ) #set( $numComments = 50 ) #end #set( $comments = $model.weblog.getRecentComments($numComments) )
#foreach( $comment in $comments ) #set($content = $utils.encodeEmail($comment.content)) #if($config.commentEscapeHtml) #set($content = $utilities.escapeHTML($content)) #else #set($content = $utils.transformToHTMLSubset($utils.escapeHTML($content))) #end #if($config.commentAutoFormat) #set($content = $utilities.autoformat($content)) #end #set($content = $utils.addNofollow($content))

Commenting on ${comment.weblogEntry.title}:

${content} #showCommentDetails($comment false)
#end
#end #** * Display list of most recent comments for a blog. * @param numComments Max number of comments to show. * @param maxWidth Limit width of comment text to this number of characters **# #macro( showRecentCommentsListWidth $numComments $maxWidth ) #if( !$numComments ) #set( $numComments = 20 ) #end #if( $numComments > 100 ) #set( $numComments = 100 ) #end #set( $minWidth = $maxWidth - 5 ) #set( $comments = $model.weblog.getRecentComments($numComments) ) #end #** * Display list of most recent comments for a blog (with maxWidth = 25) * @param numComments Max number of comments to show. **# #macro( showRecentCommentsList $numComments ) #showRecentCommentsListWidth( $numComments 25 ) #end #** * Display comment form for a weblog entry. * @param entry WeblogEntry object for which form is to be shown. *# #macro( showCommentForm $entry ) #set($cform = $model.getCommentForm())
$text.get("macro.weblog.postcommentHeader")

#if( $entry.commentsStillAllowed ) #if( $cform.error ) $cform.message #end #if( !$cform.error && !$utils.isEmpty($cform.message) ) $cform.message #end
#if($requestParameters.popup) #end #if ($config.commentEmailNotify) #end
$text.get( "macro.weblog.name" )
$text.get( "macro.weblog.email" )
$text.get( "macro.weblog.url" )

$text.get( "macro.weblog.yourcomment" )

$text.get( "macro.weblog.htmlsyntax" ) #if($config.commentEscapeHtml) $text.get( "macro.weblog.htmldisabled" ) #else $text.get( "macro.weblog.htmlenabled" ) #end
#else $text.get( "comments.disabled" ) #end
#end #** * Display hidden comment form for a weblog entry. * * NOTE: this was EOLed a while ago and is totally broken. * * @param entry WeblogEntry object for which form is to be shown, *# #macro( showHiddenCommentForm ) #end