View Full Version : Display a specific avatar?
Staxed
03-30-2007, 12:02 AM
I've been looking for a while now, and I can't seem to find instructions on how to do this...
what I want to do is quite simple...i'm making a bio page for each of the staff members on a site...so on each page I would like that specific users avatar to show...how do I go about displaying that specific users avatar?
WetWired
03-30-2007, 12:11 AM
View their profile, right click their avatar, choose properties, copy the URL, paste into the src attribute of an img tag. If they use custom avatars, then this should work fine. If they use avatars from the selection, I can't say.
Staxed
03-30-2007, 12:52 AM
well...i should have figured that out...i guess i was looking too indepth trying to find some variable or something....
well...i think i need a variable for this next one...
how do I stick the username along with that?...without just typing it in...(i'd want it to update if the username is changed)
WetWired
03-30-2007, 01:45 AM
If you want the username, you'll need to get it from the database. That either means making it a vBulletin page with vB function calls to get the username from the DB, or writing your own code to extract the info from the database. There are plenty of tutorials arround for making vB pages (at least, people are always linking to them...). As for the specifics, you'll need to call fetch_userinfo to get the user information:
$myinfo=fetch_userinfo(1);Once you've done this, you can use $myinfo[username] to get the username of user 1. Where you put this depends on how you go about doing the vB page.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.