3. The [forum] ITL Tag

The [forum] tag is what provides the capability. It uses the forum table and follows tree-like threads in that table.

It has one required parameter, top. That gives the id of the message that is the top of the thread to display.

This is a complete forum display for a product:

        [forum top="[item-code]" /]

You will see something like that in the snip from pages/flypage.html above.

You can pass many more parameters to the [forum] tag. Some of them are:


By default, the [forum ...] tag uses the current page to link to to re-display the forum at another level. Normally this works fine, but on a product flypage it will not work. You must pass in a different page.

        [forum top="[item-code]" display-page="forum/display" /]


By default, [forum] only displays the text of top-level replies to the current thread. If you want to display more levels, set the show-level parameter to 1 or higher:

        [forum top="[data session arg]" show-level=3 /]

The above will show the first four levels of replies, with links to any further down the tree.


If you want to moderate certain comments so that their text won't be shown, you can set the scrub-score parameter to -1 and then set the score field in the message's database record to -1. By default, it is linked to with a message:

  <A HREF="{DISPLAY_URL}">One message beneath your threshold</A>

If you want to totally disable the appearance of the link and message, set the scrub-template to something:

        [forum top=THREAD
               scrub-template="<!-- killed! -->"


By default, if a message has a score of two or higher, it's text will be shown no matter what level of display it is on. You can set that threshold with this paramter.


You can set the template that displays replies with this parameter. You can also pass this as the container text for the [forum] tag, i.e.:

        [forum top="[data session arg]"]
        <table cellspacing=0 cellpadding=2 width="65%">
                        <td class=contentbar1>
                                <A HREF="{DISPLAY_URL}"><b>{SUBJECT}</b></A>
                                by <b>{USERINFO}</b>
                                on {DATE}
                        <td class=contentbar1 align=right>
                                        <A HREF="{REPLY_URL}"><b>Reply</b></A>
                        <td colspan=2>

See pages/forum/display.html for an example.


You can set the header template that displays the top-level message with this parameter. See pages/forum/display.html for an example.


You can set the template that displays the links to messages that are not shown with this parameter. See pages/forum/display.html for an example.


The template for a message that has a score lower than scrub-score. See pages/forum/display.html for an example.


The message displayed in the default scrub-template when a message is scrubbed. If you set the scrub-template yourself, it is ignored.


The page linked to with {DISPLAY_URL}. Default is the current page. See Templating below.


The page linked to with {REPLY_URL}. Default is forum/reply.html. See Templating below.


The page linked to with {SUBMIT_URL}. Default is forum/submit.html. See Templating below.


The format for the date provided with {DATE}. Default is %B %e, %Y @%H:%M, which provides a date like October 5, 2002 @21:19.