Using Drupal's Advanced Forum and Author Pane modules on blog posts

Earlier today, I performed a major Drupal upgrade on another site that I run. Part of the upgrade involved me installing the Advanced Forum module to bring the forums a little more up to date with other sites that are out there.

Along the way, I learned something interesting: the Author Pane module does NOT display on blog posts.

It looked rather odd when comments on the blog posts had detailed user info, but the post itself did not. So I set out to fix that. I ended up commenting out the line print $picture; in node.tpl.php and instead adding in these lines:

$account = user_load($node->uid);
$template = "advf-author-pane";
$author_pane = theme('author_pane', $account, 
        advanced_forum_path_to_images(), $template);
print $author_pane;

The code is fairly straightforward. It loads user info on the author of the post, and the theme() function loads the author_pane template, passing in the user data.

Enjoy!

2.5
Average: 2.5 (6 votes)
Your rating: None