Download & Extend

Forum doesn't look like the demonstration

Project:Advanced Forum
Version:5.x-1.0-alpha10
Component:Theming
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

My forum topics and replies look like a regular node with replies. They don't at all look like the demonstration page where the user information is on the left.

Here's an example: http://beaconsurvival.com/acronyms

Any idea where I might have gone wrong? I followed the documentation step by step.

Comments

#1

I see in the troubleshooting page that this may have something to do with my function call in template.php. Here is a copy of what I have:

/**
* Override or insert PHPTemplate variables into the templates.
*/
function _phptemplate_variables($hook, $vars)
{
  if (module_exists('advanced_forum')) {
    $vars = advanced_forum_addvars($hook, $vars);
  }
  if ($hook == 'page') {

    // Hook into color.module
    if (module_exists('color')) {
      _color_page_alter($vars);
    }
    return $vars;
  }
  return array();
}

I am returning $vars AND array. Should I change this?

#2

Status:active» closed (fixed)

Okay I changed the last return to return vars again - still not sure if that it totally right, but it works now.

#3

Status:closed (fixed)» postponed (maintainer needs more info)

Try step #4 again. This is a typical symptom of not having the _phptemplate_variables code correct.

Michelle

#4

This is what my code looks like now (and it is working):

/**
* Override or insert PHPTemplate variables into the templates.
*/
function _phptemplate_variables($hook, $vars)
{
  if (module_exists('advanced_forum')) {
    $vars = advanced_forum_addvars($hook, $vars);
  }
  if ($hook == 'page') {

    // Hook into color.module
    if (module_exists('color')) {
      _color_page_alter($vars);
    }
    return $vars;
  }
  /* return array(); */
  return $vars;
}

I thought that the first return was enough, but apparently I needed to add that second return.

#5

Status:postponed (maintainer needs more info)» fixed

The first return only gets called for the page hook, which advforum doesn't use. That's why the docs say to make sure you're not returning array() at the end. That's the important one.

Michelle

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.