Kind of a wierd default avatar issue
Posted 15 June 2006 - 03:50 PM
I run a guild website for my world of warcraft crowd. I'm running phpnuke 7.5. Now I'm using a thing called wowroster. roster website is www.wowroster.net. Now what the roster dose is allow players to upload there game information and all that good stuff. There is a part of the roster called siggen. What that does is creates a signature and avatar when a person uploads there information. You can use the avatar and or sig fairly easy enough with a little bit of know how. Unfortuatley alot of my users don't know how And I'd love to see the majority of users using these avatars (mainly becuase im anal and think it makes everything look better). So now we come to my issue that I prestent here...
I'd like it so when someone new registers on the site they get assigned the default Avatar (I have that setup now) BUT, As soon as they upload there roster information and there roster avatar is created, there profile will know to use that avatar inplace of the defualt one. The siggen avatars are stored in a single directory on the server.
I looked at using a "file exists" method but the problem is that when someone registes they will not have yet uploaded there roster profile, therefore the file (in this case the avatar) will never exist so it will alway's just use the default avatar anyway.
If anyone can lend me a hand in making this work I would be greatly thankful. I'm still learning this code stuff
Thanks for taking the time to read my post!
Yours truley Shorty_K_Dahee
Posted 15 June 2006 - 05:08 PM
Posted 15 June 2006 - 09:34 PM
You could just put another field in your database (I'm assuming you're using a database) that is "uploaded" or something like that. Have it default to 0 and change it to 1 once they upload their avatar stuff, then you can point to where their avatar is stored...thats what I would do if I correctly understood your question.
Thank you for your response. I'm not sure axactly how to go about all this. i'm still pretty new. But yes I do have a sql database that runs all this. here is some code that a freind of mine wrote to maybe do what im trying to do. However it is not complete. I don't know exactly how to make it work with the database. See if this makes any sence to you?
// This mod will check a Nuke CMS for a blank.gif as the user's current avatar. If found, replaces it with their saved SigGen avatar.
// Read user's current avatar from Database
$ava_str = "SELECT `user_avatar` FROM `nuke_users` WHERE username = '$member_name' LIMIT 1;";
$ava_sql = $wowdb->query($ava_str);
if( $ava_sql )
print '<span style="color: #FDFF1F;">Guest Avatar replaced for ['.$member_name."]</span><br />\n";
Thanks again for any help you can provide. I'm still learning.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users