Installing Advanced Forum

  1. Enable all dependencies: Author Pane, Forum, Taxonomy, Comment. (Optionally: Statistics)
  2. Copy the entire advanced_forum project directory (not just the contents) to your normal module directory (ie: sites/all/modules)
  3. Enable the advanced forum module at ?q=admin/build/modules
  4. In the module package is a directory called "styles" that contains the included styles, one per directory. Choose one of the styles to use and copy the entire directory (not just the contents) to the theme directory of the theme you are using on your site. If you use forums with more than one site theme, copy the style directory to each theme's directory. If you use subthemes, copy it to the subtheme's directory. You should end up with something like "sites/all/themes/SITETHEME/naked".
  5. If you are not using a theme with built in AF support (Zen, some Roople themes, possibly others) Add this code to the top of _phptemplate_variables in template.php in your theme and make sure you are returning $vars, not array() at the end of the function:
      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.

  6. Because phptemplate_comment_wrapper() is commonly used in themes already, it can't be added to the module without causing conflicts. If your theme's template.php already has this function, you will need to replace it with the following code. If it doesn't, just paste it in (without the php tags).
    /**
     * 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.

Configuring Advanced Forum

Visit the Advanced Forum settings page at ?q=admin/settings/advanced-forum

  1. Advanced forum style directory: Enter the name of the style you are using. See http://drupal.org/node/234042 for more information on this.
  2. Use graphical buttons for links: Included buttons with text are only in English. If your site isn't in English and you don't want to replace the buttons, uncheck this box and you will get translatable text links instead. Icons with no text are not affected by this setting.
  3. Image directory: The images used by the styles are assumed to be in an "images" subdirectory off the style. If you need to use images from another source, enter the complete path here.
  4. Treat all site comments like forum comments: If you would like advanced forum to take over the theming of all comments, even those outside the forum, choose yes here. Please note that "theming" here isn't simply the look but also includes a lot of data gathering, especially for the Author Pane module, that may impact performance.
  5. Hide the created column on the topic list: Because the column headers for the topic list are set in code, they are not themable. This option will let you turn the column off. This is useful if you want to move the "created" information into the topic title area. Note that this only turns off the column. It doesn't move the contents.
  6. Maximum number of pages to show on per title pager: On the page that lists all the topics, for topics that span multiple pages, there is a mini pager under the topic title. This setting lets you adjust how many numbers that show there. Useful if you are trying to cram extra information into that spot and want a smaller pager.
  7. Get the number of new comments per forum on the forum list: On the forum list page, core forum will show if there are new topics but not if there are new replies (comments). This option shows the total number of new posts (topics and replies) under the "Posts" column. Because the query is resource intensive, this is turned off to start.
  8. Use topic navigation: Core forum puts links to the previous and next nodes at the bottom each forum node. The query for this is inefficient and the placement is less than ideal, so this is turned off by default. Because some people like these links, there is an option to turn them back on.
  9. Number of characters to display for the topic title: Number of characters before cutting off title of the last post on the forum overview page.
  10. Number of hours before switching to "time ago" in displays: Will use "time ago" for this many hours back and then switch to displaying the date.

Also, be sure to go to ?q=admin/user/access and set permissions for administering advanced forum as well as viewing the statistics section.