The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I add the user's avatar to the header
I want to add the user's avatar (if he or she is logged in) to the header template, how can I find the avatar's url?
Thanks |
#2
|
|||
|
|||
I would like to know this as well. Any thoughts?
--------------- Added [DATE]1273875943[/DATE] at [TIME]1273875943[/TIME] --------------- Ok that's what I ended up doing if anyone interested. It requires a file modification but works so far. Maybe someone can suggest a better solution. Code:
open: /forum/includes/init.php find: $vbulletin->userinfo =& $vbulletin->session->fetch_userinfo(); add below: require_once(DIR . '/includes/functions_user.php'); fetch_avatar_from_userinfo($vbulletin->userinfo); use in header template: <img src="<vb:if condition="$bbuserinfo['avatarurl'] != '/unknown.gif'">/forum/{vb:raw bbuserinfo.avatarurl}<vb:else />/forum/images/misc/unknown.gif</vb:if>" alt="{vb:raw bbuserinfo.username}'s Avatar"/> add plugin on "init_startup" with the following code: define('AVATAR_ON_NAVBAR', true); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|