6.8 Forum / Message Board Templates
Tribiq CMS contains built-in forum functionality. You can create multiple Forums and Message Boards from one template.
A Tribiq CMS forum effectively has 3 modes:
- Forum Details (mode: forum)
- Thread List (mode: openforum)
- Thread (mode: openthread)
All three modes are controlled from a related include. There is a functionality file which your forum must load.
<?php
include "templateincludes/forum_functionality.inc.php";
?>
However it is suggested that you copy the standard functionality include from /templateincludes/ to your new template family, and use this. As usual, you copy and modify this file to your template family folder, for both template family specific includes and forum specific includes.
cp /templateincludes/forum_functionality.inc.php /templates/mytribiqsite/newtemplatefamily/includes/
We can then include this file instead of the /templateincludes file. This snippet must live at the top of your Forum template.
<?php
include $template_path."/includes/forum_functionality.inc.php";
?>
6.8.1 Forum Models
We must then include your "forum models", where you wish your forum to be built on the page. You must create 3 forum models - a mode that is the introduction to the forum, a mode that controls thread views and a mode that controls post views. The mode that is used depends on the POST value of the parameter "mode".
<?php
if (!$mode) {
include $template_path."/includes/forum_intro.inc.php";
} elseif ($mode=="openforum" || $mode=="opentrackedthreads") {
include $template_path."/includes/forum_openforum.inc.php";
} elseif ($mode=="openthread") {
include $template_path."/includes/forum_openthread.inc.php";
}
?>
As you can see, you will want to create three new files in your new Template Family. We suggest you copy these files from the bundled template family, tribal-GPL-1066. You can copy them from the /includes/ directory.
You can then modify the layout and design of each Forum mode.
Top of Page