The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Default Member Picture for Men and Women
A default picture can improve community atmosphere.
A different picture for each gender can be a killer One for the boys and one for the girls! I guess that in order to do that, the developer will have to provide an option set in AdminCP that tells stores the field number being used as the gender field and the values it contains for each gender. Thank you in advance. |
#2
|
||||
|
||||
You should have a profile field that has Male and Female and you can place this where your avatar/profile picture code should appear:
Code:
<if condition="$userinfo[field12]==Male"> Male Picture <else /> Female Picture </if> Code:
<if condition="$userinfo[field12]==Male"> Male Picture </if> <if condition="$userinfo[field12]==Female"> Female Picture </if> |
#3
|
||||
|
||||
Thanks for such a quick reply.
The gender field is now mandatory (upon registration), but it was wise of you to point out that not all members have filled out their gender yet Can you please put all three options together, I.E. Male/Female/Otherwise? I also wish that you can expend on it and show how to assemble it with this MOD for the benefit of all of us PHP illiterates. Many thanks. Quote:
|
#4
|
||||
|
||||
No Php required here, just simple HTML coding and some mind power and logic.
HTML Code:
<if condition="$prepared['profilepicurl']"> <td id="profilepic_cell" class="tborder alt2"> <img src="$prepared[profilepicurl]" $prepared[profilepicsize] alt="<phrase 1="$prepared[username]">$vbphrase[xs_picture]</phrase>" /> <else /> <if condition="$userinfo[field12]==Male"> <img src="http://www.your-domain.com/images/Default-Male-Pic.gif"> <else /> <img src="http://www.your-domain.com/images/no-gender-pic.gif"> </if> <if condition="$userinfo[field12]==Female"> <img src="http://www.your-domain.com/images/Default-Female-Pic.gif"> <else /> <img src="http://www.your-domain.com/images/no-gender-pic.gif"> </if> </td> </if> |
#5
|
||||
|
||||
And that's exactly why we are fortunate to have you here
Many thanks, GameWizard, from the bottom of my heart. |
#6
|
||||
|
||||
I might be mistaken, but the code i posted above may actually be showing 2 avatars for those who have no profile picture, and have not selected a gender. Assuming you haven't already forced your previously registered members to do select a field. In case you do notice this problem, the code below should correct that problem.
HTML Code:
<if condition="$prepared['profilepicurl']"> <td id="profilepic_cell" class="tborder alt2"> <img src="$prepared[profilepicurl]" $prepared[profilepicsize] alt="<phrase 1="$prepared[username]">$vbphrase[xs_picture]</phrase>" /> <else /> <if condition="$userinfo[field12]==Male"> <img src="http://www.your-domain.com/images/Default-Male-Pic.gif"> <else /> <if condition="$userinfo[field12]==Female"> <img src="http://www.your-domain.com/images/Default-Female-Pic.gif"> <else /> <img src="http://www.your-domain.com/images/no-gender-pic.gif"> </if> </if> </td> </if> |
#7
|
||||
|
||||
You are something else Thanks for your second-to-none support.
|
#8
|
|||
|
|||
May I humbly suggest my mod Gender Bit to show the default profile pictures for male/female?
The mod is mainly for showing a small symbol in postbit indicating the poster's gender but the new version (1.0.2) also takes care of default avatar. Enjoy! |
#9
|
||||
|
||||
Thanks a lot for a great mod. Implemented successfully on vb3.8 beta 3 as well.
My comments, requests, voting, and nominations are placed here. Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|