Support Forum

Strange Avatar behaviour?

MA Malte
Malte
Member

Hi there,

I noticed a strange behaviour with the avatars:

If I’m logged in, it seems to be that the other users have my own avatar in the topic view?! Take a look: http://www.abload.de/img/1eso3d.jpg

And this, or my, avatar from the user “SOMA” links as well to my own profile, not to his one. But if I go to the users profile (red linked name), everything seems to be fine: http://www.abload.de/img/2mpp9r.jpg

Here’s the php-Code for this section, but what’s wrong with it?

                            sp_ColumnStart(‘tagClass=spUserSection spLeft&width=15%&height=50px’);
                            sp_PostIndexUserName(‘tagClass=spPostUserName’);
                            sp_PostIndexUserRank(‘tagClass=spPostUserRank’);
                            sp_UserAvatar(‘tagClass=spPostUserAvatar’, $spThisPostUser);
                            echo “<br><br><br><br><br>”;

Thanks for your help again …

Regards

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

you are calling the avatar function wrong… where did you get that call? its not in our themes, at least the two just looked at…

you want:

sp_UserAvatar(‘tagClass=spPostUserAvatar spCenter&context=user’, $spThisPostUser);

the key being ‘context=user’ so you tell it to use the $spThisPostUser object… without that it, uses the current logged in user – you… thus your user avatar…

MA Malte
Malte
Member

Maybe it was an issue in an old version, because I built up my theme based on the first version of the Simple:Press 5.0-Theme. Thanks for your code, it works fine and resolved the problem. 🙂

Regards