Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Avatar on forum not showing
Avatar
Jaysun
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2012 - 2:30 pm

I've checked all the options and integration and everything seems fine, when using a Wordpress page the avatar is working - but once I load Simplepress the avatars are not shown on forum posts or in the top right of the screen in the Wordpress userbar.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2012 - 8:25 pm

simple press avatars are different than wp avatars...  unless you have configured your settings to accomplish this... what are you avatar settings?

also, what avatar does it say in your sp profile will be displayed?  and can you try a the direct url to it?  your server permissions might be blocking web user access to the sp avatar folder...

Avatar
Jaysun
Member
Free Members
sp_UserOfflineSmall Offline
Sep 15, 2012 - 5:08 am

Sorry been a little busy and forgot about this problem embarassed

 

I've tried all sorts of variations of options to try and resolve this and a plugin to disable gravatar calling - as the forum seems to call for the Gravatar to be displayed even if Gravatar is placed below Sp-Default in priority.

 

What I'm trying to achieve is for the avatar the user has used in Wordpress either by uploading or from Facebook registration to be used on the forum also. 

 

However when I switch to forum i'm just getting the default avatar instead.

 

avatar1.jpgImage Enlargeravatar2.jpgImage Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 15, 2012 - 9:30 am

the way you have the priorities set there, the only avatar that will be used is the wp avatar... no other sp avatar choice will exist...  so what do you have set for the wp avatar?  that would be on wp - settings - discussion...

now you mention their wp avatar by uploading or facebook...  wp out of the box does not support either of those... so are you using a custom plugin for the wp avatar?  and if so, does it use the wp api for the avatar?  otherwise, plugins like simple press wont even know the avatar exists...

Avatar
Jaysun
Member
Free Members
sp_UserOfflineSmall Offline
Sep 15, 2012 - 9:55 am

ok that's probably what's happening here then, I'm also using Buddypress and with that users can upload their own Avatar (which is also not shown in SimplePress).

 

Facebook integration is provided by the Ultimate Facebook plugin (allows registration using your Facebook account, logging in and other features)

 

I've disabling Gravatars in discussion settings and also the different options there, but my Simplepress install grabs the Gravatar regardless.

 

Seen some hacks to disable the Gravatar option from Wordpress which will possibly work... just wanted to make sure it's not something that can be resolved through the options in Simplepress...

Thank you for you advice smile

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 15, 2012 - 11:48 am

a bit odd as I thought buddypress avatars used to work... but long time since we checked...

if you have the highest priority set to wp avatars like you do, all we do is simply call the wp function get_avatar() and have it tell us what the avatar is...

so if buddypress is not using that api, would wonder why and what its doing... even if it plugs that function (replaces it), it should keep the same interface (ie arguments) and behave properly...  do you know how buddpress is displaying its avatars in place of wp ones?  I assume you mean on posts, comments and in the admin when you say the avatars are displayed properly... or do you mean only on buddypress specific pages?

as to facebook, we have facebook logins (as well as twitter, google, and other 3rd party) built into simple press (rpx on components - login and registration)...  but facebook doesnt really have an avatar unless its displaying their profile pic?? and it seems like it would have to hook into the wp api for that too...

Avatar
Jaysun
Member
Free Members
sp_UserOfflineSmall Offline
Sep 15, 2012 - 12:23 pm

Have fixed the problem smile

Firstly I added this code to my theme (wordpress theme) function.php file 

function bp_remove_gravatar ($image, $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir) {

$default = '/avatarsdefault.png';

if( $image && strpos( $image, "gravatar.com" ) ){

return '<img src="' . $default . '" alt="avatar" class="avatar" ' . $html_width . $html_height . ' />';

} else {

return $image;

}

}

add_filter('bp_core_fetch_avatar', 'bp_remove_gravatar', 1, 9 );

function remove_gravatar ($avatar, $id_or_email, $size, $default) {

$default = '/avatars/default.png';

return '<img src="' . $default . '" alt="avatar" class="avatar" width="60" height="60" />';

}

add_filter('get_avatar', 'remove_gravatar', 1, 5);

function bp_remove_signup_gravatar ($image) {

$default = '/avatars/default.png';

if( $image && strpos( $image, "gravatar.com" ) ){

return '<img src="' . $default . '" alt="avatar" class="avatar" width="60" height="60" />';

} else {

return $image;

}

}

add_filter('bp_get_signup_avatar', 'bp_remove_signup_gravatar', 1, 1 );

 
And then installed the 'User Avatar' plugin from the wordpress directory.
This now gives me the same avatar on my wordpress pages and my Simplepress forum smile
 
Maybe this might be of some use to someone one day? which is why I posted the code - hope you don't mind
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 15, 2012 - 12:52 pm

nope, not at all.  in fact, appreciate it!!  love folks helping out folks... thanks for the code!  and good work tracking it down...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17368
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626