HACK: User avatar from WPMU Avatar Plugin
-
If anyone is using ‘ Avatar pluginsuleiman, here’s a hack I use to show the WPMU’s avatar in BBPress:
In post.php, after the
<small><?php post_author_title(); ?></small>
bit I use the following:<?php
$userid = get_post_author_id();
$wp_avatar = '/full/path/to/public_html/wp-content/avatars/' .$userid. '.jpg';
$wp_avatarURL = '/wp-content/avatars/' .$userid. '.jpg';
if (file_exists($wp_avatar)) {
echo '<img class="avatar" src="'. $wp_avatarURL.'" />';
}
?>Probably not the most elegant, but it works:
Vincent
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.