vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Avatar Not Appearing For Users (https://vborg.vbsupport.ru/showthread.php?t=83874)

mashby 07-18-2002 01:01 PM

Avatar Not Appearing For Users
 
In the User Info Box template mod [link], rootnick has a modification that includes the user's avatar (see page 2 post #3 [link]).

I applied his modification and it works just perfectly for my account, but it doesn't work for any other user. :( After a bit of research into the problem, I've narrowed it down, but still have no real solution.

The modification relies on a url for the image location.
Code:

<img width="75" height="75" src="avatar.php?userid=$bbuserinfo[userid]">
Again, my account works just fine [link], but any other user does not put up the image [link]

It's not a problem with the mod, it's something to do with the URL itself. The only difference I've found between my account and everyone else's is that I use a custom avatar and the other users use an avatars that I've uploaded for them to use. So, for some reason, the avatar.php page is not pulling up those.

Anyone have any clue how I could fix this?

SaintDog 07-18-2002 01:16 PM

Using the above, you would have to have an avatar "pre-made" for each user with each ID, otherwise it will not auto-***ign and avatar to them (which honestly, would be a pain if you have more than a few members :)).

I would suggest just letting them choose their own avatar is they want, but if you want them all to have an avatar, I think there is a small "one-line" hack that will show a default one (of your choice) until they choose their own.

mashby 07-18-2002 02:49 PM

I understand that if the user doesn't have an Avatar ***igned it won't display. However, I've ***igned avatars to these members, since they are test accounts.

The only difference is that the avatar has already been uploaded and made available for them to use. Mine is a custom avatar that I uploaded to my account. So, all accounts have an avatar ***igned.

mashby 07-19-2002 01:19 PM

bump...

mashby 07-21-2002 04:43 PM

Thanks to some help from xiphoid in the #vBorg chat channel, I've made some progress with this. It seems that the code I was using will only work with Admins and SuperUsers. If the user is a normal "user," then it won't work.

I found that I can query the user table and get the id of the icon they are using, but I can't actually get the avatar to pull up, just it's id. I'm also starting to see why the welcome panel is a hack and not a template mod :p

But, I'm not giving up just yet. Does anyone know how I can pull up a user's avatar on the forum home?

mashby 07-21-2002 05:10 PM

Ok, after playing with this some more, I came across another bit of code in the getinfo template.
Code:

$userinfo[avatarurl]
I've tried using this, but clearly it didn't work. :( I just wish I understood what the $ foo[foo] statements actually did. Is there a tutorial anywhere that explains this function?


All times are GMT. The time now is 08:46 AM.

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.02050 seconds
  • Memory Usage 1,723KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete