The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Avatar in template
I'm attempting to place the current user's avatar in a location in the header template, but the avatar variables I know fail to display the image. I tried adding the below code to the end of global.php but it didn't help. Any suggestions?
Code:
$bbuserinfo['user_avatar']="<img src='{$bbuserinfo['user_avatar']}' alt='Edit Your Avatar' border='0'>"; $bbuserinfo['user_avatar']="<a href='profile.php?{$session['sessionurl']}&do=editavatar'>{$bbuserinfo['user_avatar']}</a>"; $welcome_avatar=$bbuserinfo['user_avatar']; |
#2
|
|||
|
|||
I doubt it's related, but you shouldn't have that & after the sessionurl. The sessionurl adds it on its own, if it's necessary (and it would be & to be XHTML-compliant).
|
#3
|
||||
|
||||
Quote:
<tag var="X"></tag> AFAIK you will need to query the database in some form to get what you want. |
#4
|
|||
|
|||
Got it. Here's the code. Place this in phpinclude_start
Code:
require_once('./includes/init.php'); require_once('./includes/functions_user.php'); $bbuserinfo['user_avatar']=fetch_avatar_url($bbuserinfo['userid']); $bbuserinfo['user_avatar']="<img src='$vboptions[bburl]/{$bbuserinfo['user_avatar']}' border='0'>"; $bbuserinfo['user_avatar']="<a href='$vboptions[bburl]/profile.php?{$session['sessionurl']}&do=editavatar'>{$bbuserinfo['user_avatar']}</a>"; $welcome_avatar=$bbuserinfo['user_avatar']; |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|