The Arcive of vBulletin Modifications Site. |
|
Image Gender In Postbit Details »»
|
|||||||||||||||||||||||||
/*-----------------------------------------------------------------------*\
# Image Gender in postbit for vb3 gold # # This hack adds one's gender and it shows in postbit /*-----------------------------------------------------------------------*\ Query to run: 1 File modification: 3 Template modication: 2 New Templates: 1 (estimate hack time: 4-5 mins) Note: 2 gender images ain't created by me, found it at phpbb way back then. /*-----------------------------------------------------------------------*\ To show gender in postbit, go to User CP => Edit Profile , scroll down to Gender option and select a gender or leave it blank if don't wanna show it. Live Demo: http://all4actions.net , click on a thread to see it in action. (adding gender in User Profile later, gotta run for class) :ermm: Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
how do i add more options to this
u have two male and female but working upon same concept i could use this for me clan site so they can choose what team they prefer to play on so i need 3 options really as we have 3 teams |
|
#3
|
|||
|
|||
|
can you make this a required field?
|
|
#4
|
||||
|
||||
|
wow, somthing that can be done by profile fields and template conditional
this is an insanely wonderfull hack The No hack version of this "hack" http://www.vbulletintemplates.com/mo...ead.php?t=5957 |
|
#5
|
||||
|
||||
|
Quote:
This just give me an idea for vb3 clan (users clans, clan leader, teams, etc). I wonder if anyone works on this project yet or I gonna start it. lasto, if you want to have 3 options rather than two, open Code:
// gender hack .... // end gender hack [code] if ($post[some-constant] == "0") { $var= ""; } else { if ($post[some-constant] == "1") { $var = "Team1"; } elseif ($post[some-constant] == "2") { $var = "Team2"; } elseif ($post[gender] == "3") { $var = "Team3"; } } eval ( '$gender = "' . fetch_template ( 'postbit_genderbit' ) . '" ;' ) ; Modify the genderbit in profile: Code:
<fieldset class="fieldset"> <legend>Clan</legend> <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%"> <tr> <td colspan="2">Select your clan (or whatever description).</td> </tr> <tr> <td><select name="some-constant"> <option value="0" <if condition="$bbuserinfo[some-constant] == Unknown">selected</if>>----</option> <option value="1" <if condition="$bbuserinfo[some-constant] == Team1">selected</if>>Team1</option> <option value="2" <if condition="$bbuserinfo[some-constant] == Team2">selected</if>>Team2</option> <option value="3" <if condition="$bbuserinfo[some-constant] == Team3">selected</if>>Team3</option> </select></td> </tr> </table> </fieldset> If you want to use image for clan name, change postbit_genderbit template to: Code:
<if condition="$post[some-constant] == 1"> <br> <div class="smallfont">Clan: <img src="./images/folder/$var.gif" alt=""></div> </if> <if condition="$post[some-constant] == 2"> <br> <div class="smallfont">Clan: <img src="./images/folder/$var.gif" alt=""></div> </if> <if condition="$post[some-constant] == 3"> <br> <div class="smallfont">Clan: <img src="./images/folder/$var.gif" alt=""></div> </if> Sorry it looks a bit messy, but that's the idea. |
|
#6
|
||||
|
||||
|
Quote:
|
|
#7
|
||||
|
||||
|
Like i said, and showed at vBulletinTemplates. this can be done over and over again for any appication via template conditionals and a user profile filed.
|
|
#8
|
||||
|
||||
|
This hack can be easily done by using the "Custom profile manager".
Really, a waste of effort and unncessary edit.
|
|
#9
|
|||
|
|||
|
Quote:
|
![]() |
|
|