Check user avatar, signature...
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #1
Check user avatar, signature...
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:
1
2
3
4
5
6
7
8
9
<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.


[Image: 468x602b.png]
(This post was last modified: 01-21-2011 07:36 AM by Skiilz.)
01-21-2011 07:34 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: Check user avatar, signature...
In which page?

01-21-2011 07:40 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #3
RE: Check user avatar, signature...
Oh. Sorry I forgot to add this in the main post.
Location: member_profile

[Image: 468x602b.png]
01-21-2011 08:54 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Check user avatar, signature...
(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 ?

01-21-2011 09:19 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #5
RE: Check user avatar, signature...
That's what I'm asking.. I have the wrong code there. What code should I use?

[Image: 468x602b.png]
01-21-2011 10:35 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Check user avatar, signature...
$memprofile

My Blog
01-21-2011 10:39 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #7
RE: Check user avatar, signature...
Thank you.

[Image: 468x602b.png]
(This post was last modified: 01-22-2011 07:19 AM by Skiilz.)
01-21-2011 08:58 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: