modules

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!

0
No votes yet
Your rating: None

Essential Modules for Drupal 4.6.5

I'm a big fan of Drupal, and one of the things I think that makes it great are the add-on modules that you can download and add to your Drupal installation.

That being the case, there are some modules that I consider to be absolutely essential to getting the most out of Drupal. I install these modules on just about any Drupal instance I build so that I can save time when putting the actual content on the site. Here is the list of modules in no particular order:

0
No votes yet
Your rating: None
Syndicate content