Forum doesn't look like the demonstration

gthing - August 27, 2008 - 17:45
Project:Advanced Forum
Version:5.x-1.0-alpha10
Component:Theming
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

gthing - August 27, 2008 - 17:51

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

gthing - August 27, 2008 - 17:58
Status:active» closed

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

#3

Michelle - August 27, 2008 - 18:12
Status:closed» postponed (maintainer needs more info)

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

Michelle

#4

gthing - August 27, 2008 - 18:37

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

Michelle - August 27, 2008 - 18:43
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

Anonymous (not verified) - September 11, 2008 - 05:33
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.