Support Forum
I'd like to make some changes on the way the avatar and rank icons are displayed in my theme.
Basically I am trying to modify spTopicView.php not to display the avatar icon if the avatar not been configured and it is left as default (guest/member).
I am testing the following in the post loop $spThisPostUser->avatar['uploaded']
It works fine except if the user has changed his avatar in Wordpress rather than in SP in which case $spThisPostUser->avatar['uploaded'] is still empty. Is there anyway to get the avatar in situation ?
Thank you.
I would suggest just grabbing the user avatar with the current template tag, sp_UserAvatar(), but instead of having it echo out, set the get=1 argument and you will just be given the avatar data... and you can compare it to the default avatar filename and use or not use...
Visit Cruise Talk Central and Mr Papa's World
yes, that should get you the info... good work!
Visit Cruise Talk Central and Mr Papa's World
for each post, the $spThisPostUser object will contain:
[memberships] => Array
(
[0] => Array
(
[usergroup_id] => 2
[usergroup_name] => Members
[usergroup_desc] => Default Usergroup for registered users of the forum.
[usergroup_join] => 0
)
)
which is a list of memberships... so you can check the usergroup_id.. and then echo what you want...
or you can simply use the:
sp_PostIndexUserMemberships();
template tag which will show the usergroup memberships directly for you... see the function itself in the code for available arguments...
Visit Cruise Talk Central and Mr Papa's World