PDA

View Full Version : Show Thread Enhancements - Image Gender In Postbit


tnguy3n
03-25-2004, 10:00 PM
/*-----------------------------------------------------------------------*\
# 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:

lasto
03-26-2004, 09:39 PM
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

ryancooper
03-26-2004, 09:52 PM
can you make this a required field?

Zachery
03-26-2004, 11:15 PM
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/mods/showthread.php?t=5957

tnguy3n
03-27-2004, 03:58 AM
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


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. :rolleyes:

lasto, if you want to have 3 options rather than two, open
// gender hack
....
// end gender hack


and modify it to:

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:

<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.

tnguy3n
03-27-2004, 04:05 AM
can you make this a required field?

lol... i want my members to choose whether to show their gender or not, but I'll get back to you when i got it tested. (so tired now :tired: )

Zachery
03-27-2004, 08:02 AM
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.

Gio Takahashi
03-27-2004, 08:53 AM
This hack can be easily done by using the "Custom profile manager".

Really, a waste of effort and unncessary edit.

:rolleyes:

Floris
03-27-2004, 09:19 AM
This hack can be easily done by using the "Custom profile manager".

Really, a waste of effort and unncessary edit.

:rolleyes:
At least users have the choice to do a source code modification or a template tweak. I prefer the template one since it doesn't hack in on upgrades :)

gmarik
03-27-2004, 10:16 AM
Woman are always less than men active over the www...

Zachery
03-27-2004, 12:07 PM
Woman are always less than men active over the www...
O.o who is that aimed at... Neither Me or Floris are female...

Boofo
03-27-2004, 12:12 PM
He totally lost me on that one, too. :ermm:

Aleksey
03-28-2004, 04:50 PM
This hack doesn't work for me, when I edit my profile I choose male as gender and then I go to EDIT PROFILE and it just shows ------ not male.

tnguy3n
03-28-2004, 07:13 PM
in edit profile, it's set back to ----- ; however, in postbit, it shows either male or female as you selected.

L-Mane
04-06-2004, 03:48 PM
in edit profile, it's set back to ----- ; however, in postbit, it shows either male or female as you selected.
I did the hack and it doesn't show anything in the threads. The profile part works but nothing else.

FleaBag
04-07-2004, 05:15 PM
Installed this, thank you. Can you explain how I get the gender in the profile? Cheers.

P.V.C.
05-07-2004, 10:43 PM
I can't save?!

choose "female" => save => "-----"


why? :)



cheers
andi

Mistah Roth
06-20-2004, 02:00 PM
You need to make it so they can or HAVE to chose their gender at registration, and maybe make it viewable in the profile as well.

Erwin
06-20-2004, 08:54 PM
People, you can use custom profile fields for this - no need to hack - that way you can easily display gender in postbit, and make it cimpulsory on registration.

Zachery
06-20-2004, 08:57 PM
People, you can use custom profile fields for this - no need to hack - that way you can easily display gender in postbit, and make it cimpulsory on registration.
Rele4ased this on vBT :D

pagekeeper
01-31-2005, 10:48 PM
You need to make it so they can or HAVE to chose their gender at registration, and maybe make it viewable in the profile as well.

how would you do that ? i already have a male / female field and now i have two of the same?

gembels
02-01-2005, 03:23 PM
Erwin : how about displaying on postbit without hack ? thanks for advance

Thug
02-23-2005, 11:13 AM
when i edit profile and click the gender i want and save changes it resets to no gender chose
anyone no whats wrong?

pagekeeper
02-23-2005, 04:31 PM
Erwin : how about displaying on postbit without hack ? thanks for advance - good idea lol

and thug, i get that too, not really much i can do about it, does anyone know how to fix that or do what i or erwin said ?

so is there going to be a response to this ?

Oblivion Knight
02-23-2005, 04:37 PM
<a href="http://www.vbulletintemplates.com/mods/showthread.php?t=5957" target="_blank">http://www.vbulletintemplates.com/mo...ead.php?t=5957</a>

Thug
02-24-2005, 08:38 PM
well i have gender hack erm some users you can see there gender images in postbit others wont work
see this thread you will notice me MC G iselected male but didnt appear and the user
XxXN4DHOXxX selcted female and it work
http://www.oh-twadi.com/forum/showt...ted=1#post25693
is anyone willing to check the codes for me

007
04-08-2005, 08:06 AM
Hey how would I go about adding this to register.php? I know the template stuff, but am not positive what to do in register? I want to make it a field people see when signing up..

Any help would be appreciated! Thanks!

:)

tnguy3n
04-28-2005, 05:36 PM
lol... it's a very old hack and I haven't checked this thread for so long. sorry guys, I'll update it for vb 3.0.7 if ppl still use it over the template mod one. :D

animehawk
05-09-2005, 06:51 PM
Does anyone know where this http://www.vbulletintemplates.com/m...read.php?t=5957 went? the site no longer exists. I am looking for something just like this I think

Marco van Herwaarden
05-09-2005, 08:24 PM
There some problems with the vbulletintemplates.com domain.

We are trying to solve them as fast as we can.

COBRAws
05-28-2005, 09:22 PM
yep, when u go back and edit something at the page where u select the gender, it goes back to blank (or ------), any way to save it? Maybe implementing this as a hack, not a template edit. It would be handy. Thanks

axi
06-15-2005, 03:40 PM
yep, when u go back and edit something at the page where u select the gender, it goes back to blank (or ------), any way to save it? Maybe implementing this as a hack, not a template edit. It would be handy. Thanks


In Template modifyprofile find:


<!--- gender field by tnguy3n --->

<fieldset class="fieldset">
<legend>Gender</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td colspan="2">Tell people about your gender.</td>
</tr>
<tr>
<td><select name="gender">
<option value="0" <if condition="$bbuserinfo[gender] == Unknown">selected</if>>----</option>
<option value="1" <if condition="$bbuserinfo[gender] == Female">selected</if>>Female</option>
<option value="2" <if condition="$bbuserinfo[gender] == Male">selected</if>>Male</option>
</select></td>
</tr>
</table>
</fieldset>

<!--- end gender field --->




Replace with:



<!--- gender field by tnguy3n --->

<fieldset class="fieldset">
<legend>Gender</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td colspan="2">Your gender</td>
</tr>
<tr>
<td><select name="gender">
<option value="0" <if condition="$bbuserinfo[gender] == 0">selected</if>>----</option>
<option value="1" <if condition="$bbuserinfo[gender] == 1">selected</if>>Female</option>
<option value="2" <if condition="$bbuserinfo[gender] == 2">selected</if>>Male</option>
</select></td>
</tr>
</table>
</fieldset>

<!--- end gender field --->

Omega Prime
09-27-2005, 02:24 PM
Is there a chance of this getting ported to 3.5? :)

ZeryabPhone
11-24-2005, 06:24 AM
3. Modified template: modifyprofile

## FIND: (about the middle of the page)

<input type="hidden" name="oldbirthday" value="$bbuserinfo[birthday]" />
</td>
</tr>
</table>
</fieldset>


i cant find this line in vb 3.0.9
is there anyway to update this hack to vb 3.0.9 ?