I get so many support requests for the Zen theme and I can't help these people. The Zen I use is from early 2007 and I've ripped out all the subtheme stuff anyway. Normally I would say it's the module maintainer's job to make the module themable but, in this case, it works fine in "normal" themes. This theme is just so complex and does crazy things with subthemes and whatnot and it doesn't act normally. So I'm putting in a formal feature request to the maintainer(s) of this theme to build in advforum support.

If there's something I can change on my end to make it easier, just let me know. If this gets won't fix'd, I understand, and I'll just put a note on my project page that it can't be used with Zen.

Thanks,

Michelle

Comments

JohnAlbin’s picture

Title: Make Zen work with Advforum » Add MODULE_preprocess_HOOK functions to Zen
Priority: Normal » Critical

This would also help out the Page Title module and others that want to insert variables into template files.

JohnAlbin’s picture

Status: Active » Fixed

Zen now implements MODULE_preprocess(&$vars, $hook) and MODULE_preprocess_hook(&$vars) hooks.

Michelle’s picture

Awesome, thanks!

Michelle

JohnAlbin’s picture

Just a recap of our conversation on IRC…

If you use path_to_theme() in your module, it will only return the path to the base theme Zen. So Zen has its own path_to_subtheme() function.

Here’s some sample code you could use to get the path to a theme or to a Zen sub-theme:

$theme_path = !function_exists('path_to_subtheme') ? path_to_theme() : (path_to_subtheme() ? path_to_subtheme() : path_to_theme());

Or, if you don’t like the ternary operator :-D …

$theme_path = path_to_theme();
if (function_exists('path_to_subtheme') && path_to_subtheme()) {
  $theme_path = path_to_subtheme(); // Support for Zen sub-themes.
}

I forgot to mention in IRC, but path_to_subtheme() returns FALSE if the current theme is NOT a zen sub-theme.

JohnAlbin’s picture

Michelle, is there a place where I can track the other of half of this issue getting into advanced forum?

Michelle’s picture

Ok, http://drupal.org/node/253365 for my end. I'll try to get to it soonish. I've got a backlog of stuff that needs doing for advforum.

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

kriskd’s picture

John,

Could I get specific instructions on where I should implement the bit of code needed in _phptemplate_variables within zen/mytheme/template.php (assuming this should work now). Here are the instructions for Advanced Forum (item #4):

http://drupal.org/node/227108

Thanks!

JohnAlbin’s picture

krisd, if you have upgraded to Zen 5.x-1.1 (upgrade instructions are available), you don't need to add anything to your zen/mytheme/template.php file.

Zen 5.x-1.1 will work with advforum 5.x-1.0-alpha9 (when available) or the current 5.x-1.x-dev (as of May 30) without needing any modifications or patches to Zen or to advforum.

kriskd’s picture

Excellent! Thanks so much John!