The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
avatar check
I have a customized avatar system that stores custom avatars as the users username.gif
Now In the postbit template I would like to be able to display that avatar $userinfo[username].gif when I use this i get a broken link if the user hasn't uploaded there avatar yet. I made it so it would load a transparent gif and stuck the gif into a table as a background but it repeats if it isn't 66x64. So what would be the best way to check if the file exists and display it and if not just display the transparent image and fill where the avatar would be? Thanks |
#2
|
||||
|
||||
try this, in admin/functions.php find
// do posts from ignored users and above it do PHP Code:
|
#3
|
|||
|
|||
the avatarurl in vB is always going to be null so i don't think that is going to work?
I need to see if the file exsists and if not display the clear.gif |
#4
|
||||
|
||||
it won't be null if they've uploaded an avatar, that's what you want right? if they've uploaded one, then display it, otherwise display clear.gif?
|
#5
|
|||
|
|||
yeah that is what i want but like i said the avatar is saved as the users name.
It's not uploaded via vB so it won't be stored in the vB db |
#6
|
||||
|
||||
so it's stored in a folder on your server as their username?
|
#7
|
|||
|
|||
yeah the file would be stored as
like main/images/avatars/username.gif |
#8
|
|||
|
|||
bumppity bump
|
#9
|
|||
|
|||
anybody?
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|