![]() |
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" /> |
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:
|
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> |
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. |
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:
|
Quote:
|
All times are GMT. The time now is 01:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|