vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Avatar on homepage (https://vborg.vbsupport.ru/showthread.php?t=32560)

JTMON 12-04-2001 08:21 PM

Well here is my altered code that works for me. Note, I didn't care about the guest code as I don't allow guests to view my board:D

PHP Code:

//Avatar on Homepage Code
if ($bbuserinfo[userid]!=0) {
  
$avatarurl=getavatarurl($bbuserinfo[userid]);
  if (
$avatarurl=='') {
    
$avatarurl='images/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/guestavatar.gif"></a>';



Airwaves 12-04-2001 08:27 PM

well php3 are of no use to me, i have .php

also, i allow guests to view, so thats no use to me either :(

sorry

JTMON 12-04-2001 08:35 PM

Quote:

Originally posted by Airwaves
well php3 are of no use to me, i have .php

also, i allow guests to view, so thats no use to me either :(

sorry


You can use it with no problems. There is no difference other than the extension in the link in the code. I've edited them out now so you should just be able to cut and paste it in and it will work.

Airwaves 12-05-2001 05:05 AM

Your code doesnt hyperlink to the UserCP when they have no avatar specified.

I will use your code for now, but I really would like that feature.

trilOByte 12-05-2001 05:25 AM

Quote:

Originally posted by Airwaves
Having a bit of trouble with this...


$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img border="0" src="images/avatars/guestavatar.gif"></a>';

Try making the paths absolute for guestavatar.gif and noavatar.gif - ie,

PHP Code:

src="http://www.yoursite.com/forums/images/avatars/guestavatar.gif"></a>'; 

etc....

JTMON 12-05-2001 11:04 AM

Quote:

Originally posted by Airwaves
Your code doesnt hyperlink to the UserCP when they have no avatar specified.

I will use your code for now, but I really would like that feature.

It does for me :rolleyes:

VolsReport 12-06-2001 01:08 AM

Does it work for v2.03?

Airwaves 12-06-2001 08:53 AM

Quote:

Originally posted by JTMON


It does for me :rolleyes:

Yeah sorry, not being a PHP/HTML guru, I didnt realise until I made a test account.

Anyway, thanks for your help, I now have it sorted. :D

take a look at http://www.airwavescomms.co.uk/forums

Lesane 12-06-2001 09:20 AM

Quote:

Originally posted by VolsReport
Does it work for v2.03?
Yes

Dark Blaze 12-06-2001 10:41 AM

Great Hack Chen, well done :)


All times are GMT. The time now is 04:49 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.01307 seconds
  • Memory Usage 1,743KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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