I've read through some of the other support requests on this issue with other themes, but can't find any helpful information. I'm only a novice when it comes to PHP, but I'm pretty sure my function is formatted correctly.
Here is said function:
function _phptemplate_variables($hook, $vars = array()) {
if (module_exists('advanced_forum')) {
$vars = advanced_forum_addvars($hook, $vars);
}
switch ($hook) {
case 'node':
if ($vars['page']) {
$vars['template_files'] = array('node-default-page', 'node-'. $vars['node']->type .'-page', 'node-'. $vars['node']->nid .'-page');
}
else {
$vars['template_files'] = array('node-'. $vars['node']->nid);
}
break;
}
if ($hook == 'page') {
celju_removetab('Users', $vars); // replace themename with your theme's name
}
return $vars;
}
Thanks in advance for any assistance!
Comments
Comment #1
james_w commentedEdit:
I think it's a problem with the above line. If I comment this line, the post will theme correctly. I'm not experienced enough to understand what this line is doing, though.
Any help is appreciated!
Comment #2
james_w commentedAnother update, I was able to make it work by moving the snippet to the bottom of the function, like so:
Any idea if I will see any problems by doing this? I've clicked around most areas of my site and things still appear to be in order.
Thanks...
Comment #3
michelleYeah, that line is overriding the forum post template file. Moving the advforum function call to the end looks like the right fix. It won't affect any template files except forum posts.
Thanks for fixing your own issue. Makes my job easier. ;)
Michelle
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.