The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Query help - retrieve avatar
I'm trying to write a hack and need to retrieve the user's avatar, whatever it is - ie custom or one that's already on the boards.
I know there are are loads of tables involved and probably some joining queries. However it's been a year since I did them and I'm a lil' rusty Thanks |
#2
|
||||
|
||||
something like that, just copied it from avatar.php
[sql] $DB_site->query_first("SELECT avatardata,dateline,filename FROM customavatar WHERE userid=".intval($userid)) [/sql] |
#3
|
||||
|
||||
That query will get you the data from the custom avatar table only, and is also redundant since you have to go through the coding to actually display the avatar.
The predefined vBulletin function, from functions.php, getavatarurl(), does this all for you. Simply use this code whenever you want to display the users avatar: PHP Code:
|
#4
|
||||
|
||||
Thanks guys for your help
Edit: Sorry I don't think I explained my self properly . I would like a link in each post which opens a new window displaying the users avatar. Also I guess I'll be needing a variable too |
#5
|
||||
|
||||
doh! my bad
if you want a link in each post then in admin/functions.php find this line // do posts from ignored users and do this above it PHP Code:
lol hope this helps at all |
#6
|
||||
|
||||
Thanks E,
I'll try that |
#7
|
||||
|
||||
So is this correct?
PHP Code:
Thanks again |
#8
|
||||
|
||||
if you have the link and the pop up code inside editav im pretty sure that should work , but like i've said, i dont think i've EVER gotten popup code to work, not really sure why, so hope you get it to work
|
#9
|
||||
|
||||
I nicked it from another hack
|
#10
|
||||
|
||||
lol, that's good, even when i steal popup code from other sites it won't work for me...go figure
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|