A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
WP Wall and SPF: using the SPF avatars
Feb 3, 2010
3:11 am
Member
Forum Posts: 184
Member Since:
Jan 30, 2008
Offline

Hi there, I just found a solution to include the SPF avatars int he famous chat-like WP Wall plugin.

Modify wp-wall.php at the end and replace last function with this.

function WPWall_Gravatar($comment)
{
$options=WPWall_GetOptions();

if (!$options['gravatar'])
return '';

$return= '<span class="wall-gravatar">';
$size=25;
$email=strtolower(trim($comment->comment_author_email));
$rating = "G";
if (function_exists('sf_show_forum_avatar')) {

$return.= sf_show_forum_avatar($email, 25);
}
else if (function_exists('get_avatar')) {
$return.= get_avatar($email, $size);
} else {
$grav_url = "http://www.gravatar.com/avatar…..avatar_id=
" . md5($emaill) . "&size=" . $size."&rating=".$rating;
$return.= "<img src='$grav_url'/>";
}
$return.= '</span>';

return $return;
}

Feb 3, 2010
4:47 am

SP Master
Forum Posts: 22131
Member Since:
Nov 9, 2008
Offline

Thanks for publishing that here. Hopefully will be useful to others.

Yellow Swordfish
Feb 3, 2010
7:34 am

SP Master
Forum Posts: 23587
Member Since:
Dec 10, 2006
Offline

in 4.2, you will be able to simply check an option to include SPF avatars in all WP locations where avatars are shown…  assuming those locations are done with the get_avatar() of course… which this plugin does properly…  no more need to edit templates or change code…

Feb 5, 2010
1:47 am
Member
Forum Posts: 184
Member Since:
Jan 30, 2008
Offline

This is a great feature, but the wp wall plugin uses the gravatar functionallitly.

The code mentioned above currently is not superb and has some issues with the picture placement. I will look into that and post a solution.

Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online:
60 Guest(s)

Currently Browsing this Page:
1 Guest(s)

See All Online Activity

Top Posters:

-Radio-: 1251

Lee H: 606

Luffer: 535

Conrad_Farlow: 485

jim: 478

neon: 263

ovizii: 240

Tal: 240

Member Stats:

Guest Posters: 2616

Members: 7328

Moderators: 1

Admins: 2

Forum Stats:

Groups: 5

Forums: 16

Topics: 10839

Posts: 79131

Moderators: Brandon C (158)

Administrators: Yellow Swordfish (22131), Mr Papa (23587)