Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-18-2002, 02:01 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 07-18-2002, 02:16 PM
SaintDog SaintDog is offline
 
Join Date: Nov 2001
Location: Tennessee
Posts: 1,975
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 07-18-2002, 03:49 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 07-19-2002, 02:19 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump...
Reply With Quote
  #5  
Old 07-21-2002, 05:43 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

But, I'm not giving up just yet. Does anyone know how I can pull up a user's avatar on the forum home?
Reply With Quote
  #6  
Old 07-21-2002, 06:10 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:05 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04117 seconds
  • Memory Usage 2,205KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete