I've applied all the template.php modifications, followed the directions to the T, but my forum comments won't theme according to what is specified. I have a node-forum.tpl.php, the forums are themed, and even the top post is themed-- any idea why the comments retain the original node layout?

Comments

Michelle’s picture

Status: Active » Postponed (maintainer needs more info)

"I have a node-forum.tpl.php"

That could be the problem. Since Drupal picks up on files by that name automatically, it might be interferring with the advforum code. Try moving that out of your theme and see if it helps.

Michelle

dangarc’s picture

when i move the file out, the forum loses its node scheme.

here is an excerpt from my template.php:

 function _phptemplate_variables($hook, $vars) {
	if (module_exists('advanced_profile')) {
		$vars = advanced_profile_addvars($hook, $vars);
	}
  	if (module_exists('advanced_forum')) {
  		$vars = advanced_forum_addvars($hook, $vars);
  	}
	if ($hook == 'page') {
		if ($secondary = menu_secondary_local_tasks()) {
			$vars['tabs2'] = '<ul class="clearfix">'.$secondary.'</ul>';
		}
		
	  if($hook == 'page') {
   fblike_removetab('Private', $vars);
    // add additional lines here to remove other tabs
  }
		return $vars;
	}
	return array();
	jquery_interface_add();
} 
dangarc’s picture

wait, i think i see it. hang on.

*edit*
No, even after cleaning the code-- nothing.

 function _phptemplate_variables($hook, $vars) {
	if ($hook == 'page') {
		if ($secondary = menu_secondary_local_tasks()) {
			$vars['tabs2'] = '<ul class="clearfix">'.$secondary.'</ul>';
            fblike_removetab('Private', $vars);
            // add additional lines here to remove other tabs
        }
        if (module_exists('advanced_profile')) {
			$vars = advanced_profile_addvars($hook, $vars);
	    }
  		if (module_exists('advanced_forum')) {
  			$vars = advanced_forum_addvars($hook, $vars);
  		}
		return $vars;
	}
	return array();
	jquery_interface_add();
} 

Any ideas?

Michelle’s picture

Your change made it worse. Go back to what you had in the first post and change "return array();" to "return $vars;"

Michelle

dangarc’s picture

huh. So you want...

 function _phptemplate_variables($hook, $vars) {
    if (module_exists('advanced_profile')) {
        $vars = advanced_profile_addvars($hook, $vars);
    }
      if (module_exists('advanced_forum')) {
          $vars = advanced_forum_addvars($hook, $vars);
      }
    if ($hook == 'page') {
        if ($secondary = menu_secondary_local_tasks()) {
            $vars['tabs2'] = '<ul class="clearfix">'.$secondary.'</ul>';
        }
        
      if($hook == 'page') {
   fblike_removetab('Private', $vars);
    // add additional lines here to remove other tabs
  }
        return $vars;
    }
    return $vars;
    jquery_interface_add();
}  

I can understand the first bit, that code definitely did work well, but not theming. Give me a second, I'm trying it out now.

*edit*

you're a genius, that worked great!

for the life of me, i don't remember why i was returning an array... but it didn't break anything in there, so its all good.

Michelle’s picture

Status: Postponed (maintainer needs more info) » Fixed

Garland and some other things only return $vars from the page case and return array() (which is basically returning nothing) from everything else. Since the default theme only deals with the page case, that's fine for them. But it's a pain if you want to add anything to the other cases because the results don't get returned unless you change that last return.

Thankfully this isn't an issue in D6 because adding these 3 lines of code cause more support requests.... Sigh.

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

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