hi,
I just test the rules of forum, but it seems that when I open a thread, the rules was not shown. How to make the rules was shown after openning the thread.
Thanks for any help.
They only show on the forum display...
I think you can make this quite simply...
In showthread.php, find:
$forumpermissions = forum_permissions($forum['fid']);
After that, add:
// Do we have any forum rules to show for this forum?
$foruminfo = $forum;
$forumrules = '';
if($foruminfo['rulestype'] != 0 && $foruminfo['rules'])
{
if(!$foruminfo['rulestitle'])
{
$lang->load("forumdisplay");
$foruminfo['rulestitle'] = $lang->sprintf($lang->forum_rules, $foruminfo['name']);
}
$rules_parser = array(
"allow_html" => 1,
"allow_mycode" => 1,
"allow_smilies" => 1,
"allow_imgcode" => 1
);
$foruminfo['rules'] = $parser->parse_message($foruminfo['rules'], $rules_parser);
if($foruminfo['rulestype'] == 1)
{
eval("\$forumrules = \"".$templates->get("forumdisplay_rules")."\";");
}
else if($foruminfo['rulestype'] == 2)
{
eval("\$forumrules = \"".$templates->get("forumdisplay_rules_link")."\";");
}
}
And then use $forumrules in the showthread template. Haven't tested this but it should work...