HOW TO CONFIGURE

Once installed "Report Abuse" tab is available to space administrators.

In the default "Global Look & Feel" theme - it will be under Space Tools/Integrations

In the Documentation theme - it will be under Space Admin/Add-Ons in the left panel.

There Report Abuse can be enabled per space, and the moderator user group can be specified.

Templates used to report the comment and the notice to be displayed once the comment has been banned are also configurable.



INTEGRATE WITH CONFLUENCE THEMES

In the Global Look & Feel as well as Documentation Theme there is a layout titled Comments Layout:

For Global L&F go to Space Tools (in left pane)/Look and Feel/Layouts

For Documentation Theme go to Browse/Space Admin/Look and Feel/Layouts

You can change it directly by creating a custom version or if you are using a custom theme - locate that analog of this decorator there and change it.

Locating the macro to edit

Within this decorator there is a macro #macro (commentThread $comment) - we need to change the section dealing with viewing comments (see below the #else branch):

#macro (commentThread $comment)
     #set ($page = $comment.owner)
     <li id="comment-thread-$comment.id" class="comment-thread">
         #if ($action.editComment && $action.comment && $action.comment.id == $comment.id && $permissionHelper.canEdit($remoteUser, $comment ))
         ...
         #else
             <div class="comment #if ($comment.id == $focusedCommentId) focused #end " id="comment-$comment.id">
                 <p class="comment-user-logo">
                     #userLogoBlock($comment.creator)
                 </p>
                 <div class="comment-header">
                     <h4 class="author">$action.getText("comment.author.byline", ["#userLink ($comment.creator)"])
#if ($page.type == "blogpost" && $comment.creator == $page.creator) 
<span class="author-lozenge">$i18n.getText('comment.author.lozenge')</span>#end</h4>
                 </div>
                 <div class="comment-body">
                     <div class="comment-content wiki-content">
                         $action.getXHtmlComments().get($comment)
                     </div>
                     <div class="comment-actions">
                         #set ($webInterfaceContext = $action.getWebInterfaceContext($comment))
                         #displayCommentActions($comment.id "secondary" $webInterfaceContext)
                         #displayCommentActions($comment.id "primary" $webInterfaceContext)
                     </div>
                 </div>
             </div>
             ...
         #end
         ...
     </li>
#end
The outline of the integration:
  1. identify if the comment is banned by using $reportAbuseHelper.isBanned method
  2. if the comment is banned - add a CSS class to the comment block to display it differently e.g. red background
  3. obtain banned notice or the comment text (for comments that are not banned) using$reportAbuseHelper.getBannedNoticeOrText method
  4. render comment actions HTML part using $reportAbuseHelper.renderCommentActions method
  5. add custom CSS style to your space stylesheet or theme stylesheet
Changed macro
#set($commentBanned = $reportAbuseHelper && $reportAbuseHelper.isBanned($comment.id))
<div class="comment #if ($comment.id == $focusedCommentId) focused #end #if($commentBanned) banned #end" id="comment-$comment.id">
    <p class="comment-user-logo">
        #userLogoBlock($comment.creator)
    </p>

    <div class="comment-header">
        <h4 class="author">$action.getText("comment.author.byline", ["#userLink ($comment.creator)"])
        #if ($page.type == "blogpost" && $comment.creator == $page.creator)
            <span class="author-lozenge">$i18n.getText('comment.author.lozenge')</span>#end</h4>
    </div>
    <div class="comment-body">
        <div class="comment-content wiki-content">
            #if($reportAbuseHelper)
                $reportAbuseHelper.getBannedNoticeOrText($comment.id, $action.getXHtmlComments().get($comment))
            #else
                $action.getXHtmlComments().get($comment)
            #end
        </div>
        <div class="comment-actions">
            #set ($webInterfaceContext = $action.getWebInterfaceContext($comment))
                    #displayCommentActions($comment.id "secondary" $webInterfaceContext)
                    #set($commentActions="#displayCommentActions($comment.id 'primary' $webInterfaceContext)")
                    #if ($reportAbuseHelper)
                        $reportAbuseHelper.renderCommentActions($commentActions, $comment.id)
                    #else
                        $commentActions
                    #end

        </div>
    </div>
</div>
Sample CSS style

You can add the following CSS style to your space Stylesheets or your custom theme stylesheet

For Global L&F go to Space Tools (in left pane)/Look and Feel/Stylesheet
For Documentation Theme go to Browse/Space Admin/Look and Feel/Stylesheet

#comments-section .comment.banned, #content.banned{
  background-color: #ff8872;
}
#comments-section .comment.banned .comment-action-like, #comments-section .comment.banned li.first:before{
    display: none;
}