#** * 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 = $pageModel.getCommentCount($entry.Id) ) #if (($entry.commentsStillAllowed && $website.allowComments) || $commentCount > 0) #set( $link = "$ctxPath/comments/$userName/$page.link/$utilities.encode($entry.anchor)?popup=true#comments" ) $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 = $pageModel.getCommentCount($entry.Id) ) #if (($entry.commentsStillAllowed && $website.allowComments) || $commentCount > 0) #set( $link = "$ctxPath/comments/$userName/$page.link/$utilities.encode($entry.anchor)#comments" ) $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 = $pageModel.getCommentCount($entry.Id) ) #if (($entry.commentsStillAllowed && $website.allowComments) || $commentCount > 0)
$text.get("macro.weblog.postedby") #if (!$stringUtils.isEmpty($comment.name) && !$stringUtils.isEmpty($email) && !$stringUtils.isEmpty($comment.remoteHost)) $comment.name #elseif (!$stringUtils.isEmpty($comment.name) && !$stringUtils.isEmpty($email)) $comment.name #elseif (!$stringUtils.isEmpty($email) && !$stringUtils.isEmpty($comment.remoteHost)) $comment.remoteHost #elseif (!$stringUtils.isEmpty($comment.name) && !$stringUtils.isEmpty($comment.remoteHost)) $comment.name ($comment.remoteHost) #elseif (!$stringUtils.isEmpty($comment.name)) $comment.name #elseif (!$stringUtils.isEmpty($comment.remoteHost)) $comment.remoteHost #end $text.get("macro.weblog.on") $dateFormatter.format($comment.postTime) #if( $stringUtils.isNotEmpty($comment.url) ) $text.get( "macro.weblog.postedbywebsite", [$comment.url, $comment.url] ) #end #if( $showPermalink ) # #end
#end #** * Display all comments comments for an entry. * @param entry WeblogEntryData object for which comments are to be displayed. *# #macro( showComments $entry )Commenting on ${comment.weblogEntry.title}:
${content} #showCommentDetails($comment false)