The Arcive of vBulletin Modifications Site. |
|
avatar code error Details »»
|
|||||||||||||||||||||||||
i have trouble pulling from the post the avatar:
PHP Code:
Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You need to add a JOIN to your query, on the user table.
|
|
#3
|
||||
|
||||
|
i pm you the code FireFly..
hehe a love that most of my hacks contain credits for your work..
|
|
#4
|
||||
|
||||
|
LEFT JOIN user ON user.userid=post.userid
? |
|
#5
|
||||
|
||||
|
Yup. But since you are doing this every time anyway, I suggest using getavatarurl() as it will save you 3 JOINs, one of them is on the user table which is huge.
|
|
#6
|
||||
|
||||
|
can you clear the last part of the mistery for me? that's all i need to release the hack.
i looked in functions.php but i'm a little confused how to call the avatar from it with [high]getavatarurl($userid)[/high] thanks for your time. |
|
#7
|
||||
|
||||
|
Never mind, use what you had before it's the same. Either way you get the same thing I think.
But basically you just call getavatarurl with a user id and it gives you what you need to use in the <img src="...."> tag. |
|
#8
|
||||
|
||||
|
i will use the getavatarurl. i think is a more elegant solution.
i will post here the rest of the code so you can evaluate it. although, can you tell me where is called, from functions.php that bit of code? so i can see the code mechanism? thanks for your help firefly. |
|
#9
|
||||
|
||||
|
i got it working.
|
|
#10
|
||||
|
||||
|
i have another problem:
PHP Code:
|
![]() |
|
|