The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Display Avatar in Header
I would like to display the users Avatar in the head template, so it appears on every page. I tried using
Quote:
Quote:
|
#2
|
|||
|
|||
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=32560" target="_blank">https://vborg.vbsupport.ru/showt...threadid=32560</a>
Found this, is there a vB3.0.3 hack that works for all pages? |
#3
|
|||
|
|||
ok this supuse to be simple
in global.php just before ?> do something like that $avatar = $DB_SITE->query_first("select avatarpath from avater where avatarid='$bbuserinfo[avatarid]' "); $avatarurl =$avatar['avatarpath']; the code supuse to work its only for the case that $avatarurl not defined |
#4
|
|||
|
|||
Sorry, I don't understand the code or instructions
|
#5
|
|||
|
|||
ok ill do it again
open the file global.php (on your root dir) find : ?> before add : $avatar = $DB_SITE->query_first("select avatarpath from avater where avatarid='$bbuserinfo[avatarid]' "); $avatarurl =$avatar['avatarpath']; save the file and upload it back to the server now you defiend $avatarurl so its can show its have the link its like you doing <img src=""> cuse $avatarurl not defiend. so the 2 lines of code i gave you defien $avatarurl thats all. am i more clear now ? |
#6
|
|||
|
|||
Yep Thanks a lot!
So to show the avatar URL I just use <img style="float:left;" src="$avatarurl" alt="<phrase 1="$bbuserinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" /> ? EDIT: Doesn't work, I get an error on this line; $avatar = $DB_SITE->query_first("select avatarpath from avatar where avatarid='$bbuserinfo[avatarid]' "); Am I suppose to change something? |
#7
|
|||
|
|||
Anyone else?
|
#8
|
|||
|
|||
I just edited the phpinclude_start template and got it working. Thanks anyway
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|