PDA

View Full Version : Avatar in header hack / Can someone help me with a problem?


Xelation
04-17-2003, 02:03 AM
Ok, I need to use this hack

https://vborg.vbsupport.ru/showthread.php?s=&threadid=32560&perpage=50&display=&pagenumber=1

It says to put the code above $header in the global.php file in a couple posts down... but if I do that, my users can no longer change their avatars.... can someone help me fix this?

grog6
04-17-2003, 12:11 PM
Put the code in the PHP Code parse, no pb with it ;)

Xelation, you've a new PM ;)

Xelation
04-17-2003, 03:31 PM
could you be a little bit more specific? I'm not good with php and don't really understand a lot of things lol.... I tried putting it in the phpinclude template, and global.php file... for both ways when a user trys to modify his avatar they get this message...


Error - cannot find an image at the specified URL. Please make sure that you have entered a valid URL.



Thanks for any help:)

Xelation
04-17-2003, 04:11 PM
I'll pay someone $5 if they help me fix this.. PLEASE lol :)

grog6
04-17-2003, 06:28 PM
Don't want to be paid ;)

you just want to add the user's avatar to the header ?!

Contact me by MSN : grog6@msn.com

assassingod
04-17-2003, 06:31 PM
I used some code that I put in the phpinclude template and it worked fine. I could edit avatars fine:)

Except my code shows a broken image if the user is logged out or has no avatar. If you want I can give it to you

grog6
04-17-2003, 06:32 PM
Ohhh, just understood your problem, I've tested by adding the code to the PHP parsed code, so the avatar is well displayd in the header, but you're right, we can't change the avatar now :-/

I'll try finding a solution now ;)

grog6
04-17-2003, 06:56 PM
Xelation, add it to your template phpinclude (PHP parsed code)

if ($action!=editavatar && $action!=updateavatar) {
if ($bbuserinfo[userid]!=0) {
$avatarurl=getavatarurl($bbuserinfo[userid]);
if ($avatarurl=='') {
$avatarurl='images/avatars/noavatar.gif';
}
$avatarimage='<a href="member.php?s='.$session[sessionhash].'&action=editavatar"><img src="'.$avatarurl.'" border="0"></a>';
} else {
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/avatars/guestavatar.gif" border="0"></a>';
}
}


and add $avatarimage to your template header !

Seens working perfectly, you can now change your avatar :)

Xelation
04-17-2003, 07:04 PM
Sweet! I'll try it out in a bit!

Xelation
04-17-2003, 07:46 PM
Thanks grog6! it works :D

grog6
04-17-2003, 08:05 PM
;)