MyBB Hacks

Full Version: Check user avatar, signature...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys, I need to check if the user have added an avatar, signature.
I have added this code to check for it:
(signature)

PHP Code:
<if $GLOBALS['mybb']->user['signature'] == '' then>
<center>This user has no signature.</center>
<else>
<center>{$signature}</center>
</if>

(avatar)

PHP Code:
<if $GLOBALS['mybb']->user['avatar'] == '' then>
<else>
<tr>
<td class="trow2"><center>{$avatar}</center></td>
</tr>
<tr>
<td class="thead" colspan="2"><strong></strong></td>
</tr>
</if>

But it only works if the member have made any changes to these options... Like.. If the user just registered it will no display the "This user has no signature." message, BUT if I'm a member and had a signature and I removed it for some reason it will display the message. Same for the avatar.

Thank you for the help.

In which page?
Oh. Sorry I forgot to add this in the main post.
Location: member_profile
(01-21-2011 08:54 AM)Skiilz Wrote: [ -> ]Location: member_profile

If it is in member profile, may I know why you use $GLOBALS['mybb']->user['signature'] and $GLOBALS['mybb']->user['avatar'] variable ?
That's what I'm asking.. I have the wrong code there. What code should I use?
$memprofile
Thank you.
Reference URL's