The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Plugin to check for members avatar in footer
Hi folks,
I'm coding a side column in the footer template and I want to show the members avatar at the top. I can't use the code from the postbit templates because they don't parse in the footer. I can use this to show the avatar (avatars are stored in the filesystem): HTML Code:
<div align="center"> <a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]"><img src="customavatars/avatar$bbuserinfo[userid]_$bbuserinfo[avatarrevision].gif" alt="$bbuserinfo[username]'s Avatar" /></a> </div> So I need a conditional to check for an avatar before trying to show it. The following don't work: Code:
<if condition="$show['avatar']"> <if condition="$avatarurl"> <if condition="$bbuserinfo['avatar']"> Can anyone help please? Thanks! |
#2
|
||||
|
||||
The "proper" way to fetch the current user's avatar and display it is by using the "AVATAR_ON_NAVBAR" constant and fetch_avatar_from_userinfo(). Bring out a mass search tool and search for the constant, you will see how it all ties together.
(BTW, I've also posted this in many other threads before, you may want to search for those threads as well.) |
#3
|
|||
|
|||
Thanks for the direction Dismounted. I have searched for those terms and I see that it's what I'm looking for but my knowledge of PHP is limited and I'd appreciate it if you could help me further please?
Thanks! |
#4
|
||||
|
||||
Set the constant to true, and run fetch_avatar_from_userinfo() to fetch the avatar URL.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|