Adding function call to _phptemplate_variables
NOTE: Ignore the opening and closing PHP tags in here. They are just for display and should not be added to your file.
if (module_exists('advanced_forum')) {
$vars = advanced_forum_addvars($hook, $vars);
}
This assumes a basic knowledge of PHP to be able to do any merging necessary. If you don't know how to do this, see this tutorial for adding things to _phptemplate_variables. This code controls the look of the forum threads. If you do it incorrectly, AF cannot style your threads.
/**
* Allow themable wrapping of all comments.
*/
function phptemplate_comment_wrapper($content, $type = null, $n = null) {
static $node_type;
static $node;
if (isset($type)) $node_type = $type;
if (isset($n)) $node = $n;
if ($node_type == 'forum' && module_exists('advanced_forum')) {
$variables = array();
$variables['node'] = $node;
$variables['content'] = $content;
advanced_forum_preprocess_comment_wrapper($variables);
$forum_style = advanced_forum_get_current_style();
return _phptemplate_callback('advf-comment-wrapper', $variables, array("$forum_style/advf-comment-wrapper"));
}
if (!$content || $node_type == 'forum') {
return '<div id="comments">'. $content . '</div>';
}
else {
return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
}
}
This code enables the reply button at the bottom of the node and also affects a bit of the theming.
Visit the Advanced Forum settings page at ?q=admin/settings/advanced-forum
Also, be sure to go to ?q=admin/user/access and set permissions for administering advanced forum as well as viewing the statistics section.
NOTE: Ignore the opening and closing PHP tags in here. They are just for display and should not be added to your file.