vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Avatar in header hack / Can someone help me with a problem? (https://vborg.vbsupport.ru/showthread.php?t=51713)

Xelation 04-17-2003 02:03 AM

Avatar in header hack / Can someone help me with a problem?
 
Ok, I need to use this hack

https://vborg.vbsupport.ru/showthrea...=&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)

PHP 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


All times are GMT. The time now is 09:20 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
  • Page Generation 0.01145 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete