Building a Forum in Confluence with Reporting

Scenario

With its flexibility and rich features, the Reporting add-on allows you to transform a Confluence space into a discussion forum for users, similar to forum software such as phpBB or vBulletin. 

Forums are a great way for users to share ideas and discussions in an informal space.

Using an individual page with its comments as a forum thread, a Report Table is placed on the space's front page to generate a list of forum threads.

  • To create a new forum thread, create a new blank page. Whenever a user comments on the thread, the thread is moved to the top.

  • To sort the results by most recent comment posted, the Date Sort macro is used.

The Reporting add-on contains a List of Suppliers that can be used to manipulate data from a Confluence instance. 

In this recipe, the Page Supplier, Collection Supplier and Comment Supplier are used to gather the data to generate the forum's front page and includes all page titles, page creators, all page comments with timestamps, as well as the comment creators.

Result

 

Recipe

Apps

Reporting for Confluence Server & Data Center

Apps

Reporting for Confluence Server & Data Center

Level

Intermediate

Estimated time

30 minutes

Macros

Content Filter, Date Sort, Local Reporter, Number Filter, Report Block, Report Column, Report Empty, Report Info, Report Table

Suppliers

Collection Supplier, Comment Supplier, Page Supplier

Storage format

You can copy and paste this code into the Confluence Source Editor:

<p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="f2bbe5c1-b162-4687-b717-48351f162573" ac:name="report-table" ac:schema-version="1"> <ac:rich-text-body> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="38f3281f-c373-4ba7-b55f-17ab5624eeb0" ac:name="content-reporter" ac:schema-version="1"> <ac:parameter ac:name="types">page</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="eb7e9c0f-e382-4db4-a231-7c5fcf403b03" ac:name="date-sort" ac:schema-version="1"> <ac:parameter ac:name="order">descending</ac:parameter> <ac:parameter ac:name="">page:comments &gt; collection:last &gt; comment:modification date</ac:parameter> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="8d263f5b-fe39-4834-9633-86c87cf810f5" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Thread</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="36d97381-082e-439b-817f-eb7a8db08987" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">page:title</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="ec461193-3208-4850-ae87-d7b4708e9c2a" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Thread Starter</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="bfa16460-c5f2-48d7-8da1-eceb9e7cf6bb" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">page:creator</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="6524e8a8-8ad9-46fe-8825-9ed9950bdaca" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Last Post</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="6e70e4c5-6535-495f-84b7-f531127b090a" ac:name="report-block" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="19c84c28-fcc8-4beb-b254-a39557095329" ac:name="local-reporter" ac:schema-version="1"> <ac:parameter ac:name="">@self</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="e86188b8-cf26-48a7-b7b4-6c6a166046a4" ac:name="number-filter" ac:schema-version="1"> <ac:parameter ac:name="minValue">1</ac:parameter> <ac:parameter ac:name="">page:comments &gt; collection:size</ac:parameter> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="044c185a-9ecf-4f23-94ef-cb7f6d1b4209" ac:name="report-body" ac:schema-version="1"> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="890c7156-01a2-4853-83c6-44dba15e271b" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">page:comments &gt; collection:last &gt; comment:modification date</ac:parameter> </ac:structured-macro> by <ac:structured-macro ac:macro-id="88a33ccc-ced0-4279-97ff-efc2dc062c63" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">page:comments &gt; collection:last &gt; comment:creator</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="54b9d5a9-5dde-46fa-877d-9f2fd681b91a" ac:name="report-empty" ac:schema-version="1"> <ac:rich-text-body> <p>No replies yet.</p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="7fd33d18-4ab4-4662-9b8b-3333d95bf932" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Replies</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="f9adb824-33ac-4c13-96e7-f4d3e3207039" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">page:comments &gt; collection:size</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p>

 

Macro structure

You can recreate the example in the editor view:

  • N/A

Steps

  • N/A

Line-by-Line Explanation

  • N/A