The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
This piece of code is not working
Im trying to display a users' avatar in navbar. I add this lines to a plugin in the global_start hook location.
PHP Code:
HTML Code:
<img src="$avatarurl" alt="Your Avatar" border="0" />
|
#2
|
|||
|
|||
This should be your plugin code. I don't know how that code is not a endless loop if you have that in global_start hook. The global file is already included so you don't need to include it again.
PHP Code:
|
#3
|
||||
|
||||
Your code in the template should also take into account if the user has no avatar.
Code:
<if condition="$avatarurl"><img src="$avatarurl" alt="Your Avatar" border="0" /></if> |
#4
|
|||
|
|||
I made the changes but it doesn't seems to work.
I'm using vbulletin's latest version 3.7.2 Patch Level 1. Maybe that's the problem. |
#5
|
|||
|
|||
I didn't look at the function you call, but it would seem a string return would be the result, not an array? So get rid of the [0] on $avatar and see what happens.
EDIT: It is an array. I suggest you use... PHP Code:
|
#6
|
||||
|
||||
My changes were for a suggestion to fix a bug . You are also going about the wrong way to do this - look in class_core.php (vB_Session class constructor).
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|