![]() |
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:
|
<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? |
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 |
Sorry, I don't understand the code or instructions :(
|
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 ? |
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? |
Anyone else?
|
I just edited the phpinclude_start template and got it working. Thanks anyway :)
|
All times are GMT. The time now is 02:40 PM. |
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:
|