Hey guys. I would like to use the author_pane theme in nodes, but a custom version of the template and not the same one I use in blocks. This would be similar to how Advanced Forums uses its own template file for Author Pane as well. Any idea how I can do this? I already have another template file named author-pane-two.tpl.php but I'm not sure where to go next.

Inside my node template I have the following code

    <?php $account = user_load($node->uid);
        print theme('author_paned', $account, $caller, $picture_preset, $context, $disable_css); 
    ?>  

This calls the normal author-pane.tpl.php file and not the newer one. I tried using print theme('author_paned_two') instead, but that did nothing. Is this even possible? Id like to have my nodes show different user info then my blocks. Thanks!

Comments

Media Crumb’s picture

Any ideas?

Media Crumb’s picture

How about with some money thrown in for good measure?

michelle’s picture

I can give you some pointers but not in depth help right now...

* Don't change the name of the theme function. It needs to be theme('author_pane'
* Passing in a different caller doesn't do anything automagically. You still need to have your preprocess function look for the caller and add the template suggestion. Here is AF's version:

function advanced_forum_preprocess_author_pane(&$variables) {
  // Author pane is used in various places. Check the caller to make sure
  // we are the one that called it.
  if (!empty($variables['caller']) && $variables['caller'] == 'advanced_forum') {
    advanced_forum_add_template_suggestions("author-pane", $variables['template_files']);
  }
}