The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Avatar by User Profile Fields
I'm wondering if someone could come up with a code for me that will choose avatar out from User Profile Fields if no Avatar is selected.
I'm running a World of Warcraft guild forum on http://www.victrix-guild.com and would like for everyone to have a avatar. Atm I got http://img464.imageshack.us/img464/2228/noavatarjw2.jpg as a standard avatar if nothing is selected. Been hacking a little on my postbit, and it should be possible to forexample set "Troll_Female_Rogue.gif as a avatar if they have selected troll, female and rogue in "Edit Profile" This is the code I use for my faction, race, class and profession icons Code:
<if condition="$post[fieldA] && $post[fieldB]" && $post[fieldC]><img src="images/wow/$post[fieldA]_$post[fieldB]_$post[fieldC].gif" alt="$post[fieldA] $post[fieldB] $post[fieldC]"></if> This is the avatar code Code:
<if condition="$show['avatar']"> <div class="smallfont"> <br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> </if> edit: -------------------------------------------------------------------------------------- I shouldn't have asked, as it was very easy to do so when actually taking the time to just merge them together. If you want to do this yourself you can use the following code: Code:
<if condition="$show['avatar']"> <div class="smallfont"> <br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> <else /> <if condition="$post[field5] && $post[field7] && $post[field13]"><img src="images/wow/$post[field5]_$post[field7]_$post[field13].gif" alt="$post[field5] $post[field7] $post[field13]"></if> </if> User Profile Field 5 is called "Class" and are a single selection menu with these options:
User Profile Field 7 is called "Race" and are a single selection menu with these options:
User Profile Field 13 is called "Gender" and are a single selection menu with these options:
I have files like this in the /images/wow folder: Warrior_Tauren_Female.gif Warrior_Tauren_Male.gif Warrior_Undead_Female.gif ...and so on... These are then avatars. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|