PDA

View Full Version : Avatar Not Appearing For Users


mashby
07-18-2002, 02:01 PM
In the User Info Box template mod [link (http://www.vbulletintemplates.com/mods/showthread.php?s=&threadid=36)], rootnick has a modification that includes the user's avatar (see page 2 post #3 [link (http://www.vbulletintemplates.com/mods/showthread.php?s=&threadid=36&pagenumber=2)]).

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. <img width="75" height="75" src="avatar.php?userid=$bbuserinfo[userid]">

Again, my account works just fine [link (http://www.npug.org/forum/avatar.php?userid=1)], but any other user does not put up the image [link (http://www.npug.org/forum/avatar.php?userid=5)]

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, 02: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, 03: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, 02:19 PM
bump...

mashby
07-21-2002, 05: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, 06:10 PM
Ok, after playing with this some more, I came across another bit of code in the getinfo template. $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?