#** * 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)
$text.get("macro.weblog.postedby") #if (!$utils.isEmpty($comment.name) && !$utils.isEmpty($comment.url)) $comment.name #elseif (!$utils.isEmpty($comment.name)) $comment.name #else $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) )Commenting on ${comment.weblogEntry.title}:
$comment.content #showCommentDetails($comment false)