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 |
Jump to:
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
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
Okay I changed the last return to return vars again - still not sure if that it totally right, but it works now.
#3
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
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
Automatically closed -- issue fixed for two weeks with no activity.