PDA

View Full Version : Gender Hack for vB 2.2.0


apfeifer
11-07-2001, 10:00 PM
This is basically the same as the Gender Hack for the earlier version, but made to work with 2.2.0. This is all my coding, but was not originally my idea. There are three new images that I made for this, and I may make alternate ones for those because they're kinda blah. Anyway, hope you like it.

Enjoy!

maverick1236
11-07-2001, 11:41 PM
Same Problem as always.....

you choose your gender....submit.....

and nothing updates


this has been the same problem with this hack for the past 6 months


too bad=was hoping you fixed it :(

apfeifer
11-08-2001, 01:01 AM
This works for me, I will try it on a fresh install tomorrow and see if it still works. There was nothing to fix, seeing I didn't even look at the person's code who had written this before...

Gamingforce
11-08-2001, 04:55 AM
I'll give it a try myself apfeifer! Thank you so much for following up on my request!

Alien
11-09-2001, 02:38 AM
Hey,

How'd you make out on trying that 2.2.0 fresh install, then adding the gender hack?

Originally posted by apfeifer
This works for me, I will try it on a fresh install tomorrow and see if it still works.

maverick1236
11-09-2001, 02:40 AM
it works for new registers no problem

just not in modify profile

Goldfinger
11-09-2001, 09:27 AM
just needs a lil tweaking to work for a profile edit :) ill check it out.

maverick1236
11-09-2001, 09:29 AM
Thank You Goldfinger!!

I Appreciate it!!!:D

Gamingforce
11-09-2001, 08:43 PM
Dear apfeifer,

Thank you very much for this hack, I installed this hack on my board with no problem! (I decided to keep the old hack gender icons though).

I am running vBulletin 2.2.0 and following apfeifer's directions, on my board installation everything went smoothly!

Once again thanks!

My board: http://www.gamingforce.com/forums/

The Realist
11-12-2001, 01:22 PM
trying to Install this hack but when it comes to:

### Go to Templates -> Modify -> [expand list] -> Member List Templates [expand] -> postbit


There is NO postbit.

The only postbit is in the postbit section templates.

Anyhelp?

Installing on 2.2.0

:)

apfeifer
11-12-2001, 01:58 PM
Whoops...yeah, the one in the Postbit section. I'm amazed you're the first person to notice that! Sorry about that!:)

The Realist
11-12-2001, 02:24 PM
I left the below section out and the hack is working fine here on 2.2.0 but I used the old gifs from the original version.


:D


Originally posted by The Realist
trying to Install this hack but when it comes to:

### Go to Templates -> Modify -> [expand list] -> Member List Templates [expand] -> postbit


There is NO postbit.

The only postbit is in the postbit section templates.

Anyhelp?

Installing on 2.2.0

:)

Lesane
11-12-2001, 02:53 PM
I dont think it works in version 2.0.3 because in the replacing by register.php it says in your find tag on the end "$avatarid" and the register.php of 2.0.3 dont have that. :(

Alien
11-12-2001, 05:40 PM
Works great, thanks a bunch for this update! :D

Now I have to find some images.

Lesane
11-14-2001, 02:19 PM
I did some little modifications and it works perfect now on 2.0.3, thnx for the hack

BluSmurf
11-15-2001, 09:28 AM
Lesane, care to share how you do it for 2.0.3? :)

Lesane
11-15-2001, 01:48 PM
Sure, no problem.

Its all the same except the part in register.php. The find and replace part contains "$avatarid", version 2.0.3 dont have that in the register.php.

So when it asks 2 replace the part in register.php do this:

$DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signa ture,adminemail,showemail,invisible,usertitle,join date,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm,options,birthday,maxposts,startofwee k,ipaddress,pmpopup,referrerid,nosessionhash,gende r) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes(md5($password))."','".addslashes(htmlspecialchars($email))."',".$newstyleval."'".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','".time()."','$cookieuser','".addslashes($prunedays)."','".time()."','".time()."','$newusergroupid','".addslashes($timezoneoffset)."','$emailnotification','$receivepm','$emailonpm',' $options','".addslashes($birthday)."','".addslashes($umaxposts)."','".addslashes($startofweek)."','".addslashes($ipaddress)."','$pmpopup','".addslashes($testreferrerid['userid'])."','$nosessionhash','$gender')");

Good luck ;)

nafae
11-21-2001, 01:46 AM
hrm i cant find the postbit stuff, i went under "postbit templates-postbit and didnt find
$userinfo[username]</a></normalfont>" am i looking in the wrong place? i am using 2.2.1

maverick1236
11-21-2001, 08:45 PM
ok i dont know how many times i need to say this for someone to actually notice...

the image WILL NOT SHOW IN POSTBIT-but it shows everywhere else

can ANYONE fix this??

212rikanmofo
12-03-2001, 05:18 AM
is anyone else getting the same problem? it shows up as a ? for all my users no matter where i am, weird, help me, wut am i doing wrong.

DelusionalMind
12-29-2001, 06:32 AM
gonna be installing this in a few

does anyone want a link to my test forums so they can check it out?

DelusionalMind
12-29-2001, 06:55 AM
i just installed this on my test board...

it no workie :( :( :'(

hmmm....it seems to conflict with the collapse posts thing...

Bedhead
12-29-2001, 09:13 AM
Does this work on 2.2.1?

Ifrani
12-29-2001, 02:54 PM
But how can I edit the gender in the AdminCP ???? :confused:

Ifrani
12-29-2001, 04:22 PM
If edit the my profile, there is always the default value selected. If I change an other option in the profile, my gender is set to unknown... Is there a problemsolving for that ???

Simon Moon
01-05-2002, 02:56 AM
Hi everyone. Great hack, but i think it needs some more treatment... Hardcodeing the images is not a very usable idea, therefore, use templates.

Add 3 templates
gender_male:
&nbsp;<img src="images/male.gif" border="0">

gender_female:
&nbsp;<img src="images/female.gif" border="0">

gender_undiscloed:
&nbsp;<img src="images/questionmark.gif" border="0">


If you want to change this part now ever, just change these 3 templates. Now to the modifications you need to do for them to work properly with the page.

IMPORTANT for the part below: Everything stays the same in the 3 files, EXCEPT $post[gender]. Justtake a good look and replace the coresponding code... it aint that hard :)

Wherever the instructions tol you to put in this code:

if ($post[gender] == "0") {
$genderimage = "&nbsp;<img src=\"images/questionmark.gif\" border=\"0\">";
} elseif ($post[gender] == "1") {
$genderimage = "&nbsp;<img src=\"images/female.gif\" border=\"0\">";
} elseif ($post[gender] == "2") {
$genderimage = "&nbsp;<img src=\"images/male.gif\" border=\"0\">";
}


Put now in this one:

if ($post[gender] == "0") {
eval("\$genderimage = \"".gettemplate("gender_undisclosed")."\";");
} elseif ($post[gender] == "1") {
eval("\$genderimage = \"".gettemplate("gender_female")."\";");
} elseif ($post[gender] == "2") {
eval("\$genderimage = \"".gettemplate("gender_male")."\";");
}


This has to be done in these files: admin/functions.php member.php memberlist.php

Now 2 more steps and we have it.
in member.php search for

if ($action=="getinfo") {
$templatesused = "getinfo_sendpm,aol,icq,yahoo,getinfo_birthday,geti nfo_customfields,getinfo";

change the second part to this:
$templatesused = "getinfo_sendpm,aol,icq,yahoo,getinfo_birthday,geti nfo_customfields,getinfo,gender_male,gender_female ,gender_undisclosed";
If you have some hacks that might need here more, just take a look at the end. Its just 3 names added.

Now change in memberlist.php the 4th line, and add there also the three templates. If you have no other hacks it could look like this:

$templatesused = "memberlist_letterselected,memberlist_letter,postbi t_search,postbit_useremail,icq,aim,yahoo,postbit_h omepage,postbit_sendpm,postbit_profile,memberlistb it,memberlist,memberlistsearch,gender_male,gender_ female,gender_undisclosed";

Thats it, its now template based. The fun with templates is that you change a tamplte and you change the places where you added it. Thats why i missed this function in the hack, because i felt like trying around a bit with the images and other images and it sucked to make the changes all the time to the code.

Thanks for the great hack!!!

Simon Moon
01-05-2002, 08:33 AM
Toying around, i found it sucks not to be able to change the the status of the user as an admin. So i whipped out this little hack.

First, you need a whole new function in admin/adminfunctions.php
Find:// ###################### Start makechoosercode #######################
Add BEFORE:
// ###################### Start makeselectcode #######################
function makeselectcode ($title,$name,$seedarray,$selvalue=-1) {
// returns a combo box containing a list thats fed from an hash called seedarray
// that hash needs a pair combination, where the name will be used as title and the value as value
// allows specification of selected value in $selvalue


echo "<tr class=\"".getrowbg()."\" valign=\"top\">\n<td><p>$title</p></td>\n<td><p><select name=\"$name\">\n";

while ( list($key, $val) = each($seedarray) ) {
if ($selvalue==$val) {
echo "<option value=\"$val\" SELECTED>$key</option>\n";
} else {
echo "<option value=\"$val\">$key</option>\n";
}
}
echo "</select>\n</p></td>\n</tr>\n";
}
Close adminfunctions.php

Open global.php (you can put it also in the user.php in the admin directory on the top, but i used it for other hack parts too, so i needed it global) and add to the top, after the <?php this part:
$gender_array = array( "Undisclosed" => "0",
"Female" => "1",
"Male" => "2");

This will help a lot later on...
SAve it and close it.

Open admin/user.php

These are for the edit part of the users...
Find:
makeinputcode("Yahoo Messenger Handle","yahoo",$user[yahoo],0);
Paste after it:
makeselectcode("Gender","gender",$gender_array,$user[gender]);

Now these are for adding users over the control panel:
Find
makeinputcode("Yahoo Messenger Handle","yahoo");
Paste after:
makeselectcode("Gender","gender",$gender_array);

So much for the interface. Now we need to make sure your data gets saved!

Find:
$userid=$DB_site->insert_id();
In the line before THIS, search for options,birthday and add ",gender" to it without the "" of course. Now go to the very end of the line. There it looks like '$birthday')"); wich you change now to '$birthday','$gender')");
Ok, new users are set, now the edits.

Search with your editor for this part:
$DB_site->query("UPDATE user SET birthday='$birthday'
Found this, go to the very end of the line.
You read there something like that:
$pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");
Change it to this:
$pmpopup=1,pmpopup,'$pmpopup'),gender='$gender' WHERE userid=$userid");

Save it, upload the files, and you are finished. You can instantly start to edit users, or add new ones with the gender hack. I tested this on 2.2.1 as the hack before, both on an new installed test board and on an already pretty heavy hacked one.

If you got questions, mail me.

Erwin
01-07-2002, 06:36 PM
I'm new to VB (a recent UBB convert) with my board being only 4 days old on VB, but I am having a ball installing all the hacks.

This hack here is fantastic.

I want to thank Simon for his admin add-on hack to the gender hack.

Just one note: when you modify the global.php file for Simon's admin hack, it is the admin/global.php file, not the root global.php file. It was a bit confusing as Simon specified the admin/ subdirectory for the other files, but not for the global.php file.

The gender hack works well with the admin add-on. Well done people!

:)

Shenlong
01-10-2002, 01:35 AM
Originally posted by apfeifer
Whoops...yeah, the one in the Postbit section. I'm amazed you're the first person to notice that! Sorry about that!:)

yea well glad ur sorry but where do we go?

Sadie Frost
01-10-2002, 05:51 PM
I put it in the postbit in the postbit section :)

DelusionalMind - worked fine with my expand/collapse hack :)

maverick1236 - Do you have the expand/collapse hack installed? If so, you need to put the $genderimage twice in the postbit - once in the "plusimg" part and once in the "minusimg" part. It took me forever to figure out that was what I was doing wrong!

Shenlong
01-10-2002, 06:30 PM
well these instructions are weird, dont got that code in my postbit so I guess no genderhack 4 me

Sadie Frost
01-10-2002, 06:45 PM
put it after $post[username]

Lucky
01-10-2002, 07:55 PM
Is this fully operational now?

Shenlong
01-10-2002, 08:45 PM
Can someone just make a new zip for 2.2.1 plz?

Sadie Frost
01-11-2002, 12:08 AM
It worked for me Lucky :)

Barret
01-13-2002, 01:21 AM
Thanks for the help but after looking at this a little closer, it appears to me that this hack isn`t worth the time to try to install.
It was a great hack in 2.03 and worked with np but if you upgrade to 2.2.1 it will no longer work with the old hack and to upgrade is nothing less than a pain. :(
If and when I get time, I will redo this for 2.2.1 so peeps can hack once and be done rather than hack and take this out and hack and take that out and etc. and etc.
Blah!
<---starts to think would have been better off to stay with 2.03 :(

Lucky
01-13-2002, 03:21 PM
Does this work for 2.2.1 with np?

butty
01-14-2002, 01:34 AM
im mad for bangin this baby on aswel but am a bit confused by the last posts?? i have 2.2.1 can n e 1 say if it works/doesnt or might do before i start pulling my board to peices???

cheers in advance peeps :)

Lucky
01-14-2002, 01:38 AM
I am wondering about that as well.

:confused:

Barret
03-03-2002, 08:49 PM
I have found the problem and all is working fine now!
Just gotta watch what ya do is all.

Joshua Clinard
03-08-2002, 02:51 AM
Can someone please update this hack?

snyx
04-23-2002, 06:41 PM
this hack works FINE on 2.2.5 :D
but yeah... old skool images all the way!!!

DWZ
05-04-2002, 02:36 AM
Can someone help me?

I just tried to install this on 2.2.5.

I go to the user cp, and select "male" for me then go "submit". It says "thanks for updating the options" then takes me back to the profile page, there I find its still set on "Undisclosed". All my posts, and user info comes up with the question mark.

I have done the MySQL query, which went fine:Running ALTER TABLE user ADD gender SMALLINT (6) not null ... Success!What have I done wrong?

Thanks :)

EDIT: never mind, i uninstalled the hack

FleaBag
05-16-2002, 11:27 PM
Has the problem with existing users been resolved?

Birdie501
05-17-2002, 01:31 PM
does it work with 2.2.5 without any problems now?

vBFreak
05-17-2002, 04:47 PM
can anyone make me a hack, where I can edit the Gender from the Admin Panel?

Xelation
05-23-2002, 08:50 PM
that was one long hack but it worked perfectly, thanks for the great hack :)

Webmasta XT
05-26-2002, 12:27 PM
can someone post a new file with all the modifications and stuff for vb 2.2.5?????

Erwin
05-27-2002, 03:29 AM
Originally posted by vBFreak
can anyone make me a hack, where I can edit the Gender from the Admin Panel?

The original Gender Hack allows you to do this. You need to read the thread carefully - instructions are in there - it needs to be read carefully.

Gamingforce
05-31-2002, 06:34 AM
I was the one that requested this hack a WHILE back and we have been using it on our board ever since. It works perfectly. Check it out here:
http://www.gamingforce.com/forums/

Boofo
05-31-2002, 06:38 AM
But do you have the complete hack for 2.2.5 that you can share with us? Apparently, there are some differences in it now. )

Lesane
05-31-2002, 07:03 AM
I'm using 2.2.4 and it works perfectly, no modifications needed.

Boofo
05-31-2002, 08:00 AM
The footer of your board says 2.2.2 (You might need to change that. :))

Originally posted by Lesane
I'm using 2.2.4 and it works perfectly, no modifications needed.

Boofo
05-31-2002, 08:12 AM
Is there a way to have it use text instead of images? Like Male, Female, N/A?

Lesane
05-31-2002, 08:46 AM
Originally posted by Boofo
The footer of your board says 2.2.2 (You might need to change that. :))



Ieek, i meant 2.2.2. I'm using 2.2.4 on my test board :lick:

Boofo
05-31-2002, 09:57 AM
I got it installed and it is working great on 2.2.5. I changed the images to text instead, though. Thought it looked better. I put it in the private.php, also, so I could list it in the privmsg template, too. I need to find out if where I put it in private.php is ok or will it mess with anything else? I put this:

if ($post[gender] == "0") {
$genderimage = "Not Sure";
} elseif ($post[gender] == "1") {
$genderimage = "Female";
} elseif ($post[gender] == "2") {
$genderimage = "Male";
}


after this:


if ($post[yahoo]!="") {
eval("\$post[yahooicon] = \"".gettemplate("yahoo")."\";");
} else {
$post[yahoo]="";
}

Bro_Joey_Gowdy
06-21-2002, 11:17 PM
I done a clean install and I still get this error:

Database error in vBulletin 2.2.6:

Invalid SQL: UPDATE user SET birthday='1981-2-2',signature='',customtitle='0',usertitle='Adminis trator',email='joey@joeygowdy. com',parentemail='',coppauser='0',homepage='http://www.JoeyGowdy.com',icq='33001900',aim='princegowdy ',yahoo='Brother_Joey_Gowdy',u sergroupid='6', gender='2' WHERE userid='1'
mysql error: Unknown column 'gender' in 'field list'

mysql error number: 1054

Boofo
06-21-2002, 11:22 PM
Did you run this query?

ALTER TABLE user ADD gender SMALLINT (6) not null

Bro_Joey_Gowdy
06-21-2002, 11:29 PM
what does 'running queries' do ?

I do have phpmyadmin installed - but have never used it

Im useing vB 2.2.6

Boofo
06-21-2002, 11:32 PM
It will make the entry into the database for storing the gender information. Without that, the hack will never work. :)

Originally posted by Bro_Joey_Gowdy
what does 'running queries' do ?

I do have phpmyadmin installed - but have never used it

Bro_Joey_Gowdy
06-21-2002, 11:45 PM
Its working now, thanks for the help

:)

Boofo
06-21-2002, 11:50 PM
Great! Enjoy! :)

Mystislav
07-12-2002, 08:01 AM
Damn... I'm doing it on 2.2.6 and there is'nt even a

### Go to Templates -> Modify -> [expand list] -> User Info Display Templates [expand] -> getinfo

:(... what do I do now?

Boofo
07-12-2002, 08:20 AM
Yes you do have a getinfo template. :)

Originally posted by Mystislav
Damn... I'm doing it on 2.2.6 and there is'nt even a

### Go to Templates -> Modify -> [expand list] -> User Info Display Templates [expand] -> getinfo

:(... what do I do now?

Martin64
07-21-2002, 01:37 PM
* Martin64 clicks install
* Martin64 thinks with great hacks such as this one there's no need to create my own ones
* Martin64 looks at own gender hack and laughs.

Thanks, nicely done. :)

FlyingDutchman
08-10-2002, 04:56 PM
THANKS MAN! this hack is GREAT!!! :) works perfect with vb 2.2.6...

I've added another variable, $gendername which will say, instead of the image, either Undisclosed, Female or Male...
I'll post it here immediatly for anyone who wants it: (:D)

instead of putting this:
if ($post[gender] == "0") {
$genderimage = "&nbsp;<img src=\"images/questionmark.gif\" border=\"0\">";
} elseif ($post[gender] == "1") {
$genderimage = "&nbsp;<img src=\"images/female.gif\" border=\"0\">";
} elseif ($post[gender] == "2") {
$genderimage = "&nbsp;<img src=\"images/male.gif\" border=\"0\">";
}

into the 3 files (memberlist.php, member.php, admin/functions.php), insert this:
if ($post[gender] == "0") {
$genderimage = "&nbsp;<img src=\"images/questionmark.gif\" border=\"0\">";
$gendername = "Undisclosed";
} elseif ($post[gender] == "1") {
$genderimage = "&nbsp;<img src=\"images/female.gif\" border=\"0\">";
$gendername = "Female";
} elseif ($post[gender] == "2") {
$genderimage = "&nbsp;<img src=\"images/male.gif\" border=\"0\">";
$gendername = "Male";
}

now, just put $gendername in any template you wish to insert the gender's name...

example, in postbit template, search for:
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<p>
<smallfont>

immediatly AFTER that, add:
Gender: $gendername [$genderimage]<br>

you'll see the user's gender now, just above the 'Registered: registration date here' part...

Schorsch
08-11-2002, 06:23 AM
thanks!! great hack :)

Schorsch
08-11-2002, 04:47 PM
you can't change the gender in the admin cp for the user!

how can I change that ?

Thanks,
Schorsch

assassingod
08-31-2002, 10:06 AM
Help! Im using 2.2.7, and there doesnt seem to be this code in showthread:

if ($post['receivepm'] and $enablepms==1) {
eval("\$post[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
} else {
$post[pmlink] = "";
}

Or this code:

$post[profile]="";
$post[email]="";
$post[useremail]="";
$post[icqicon]="";
$post[aimicon]="";
$post[yahooicon]="";
$post[homepage]="";
$post[findposts]="";
$post[signature]="";
$onlinestatus="";

Anyonegot any ideas??:(

Boofo
08-31-2002, 10:14 AM
I have this hack installed and I can change it under the user options in the admin cp just fine. Do you show a setting for it there?

Originally posted by Schorsch
you can't change the gender in the admin cp for the user!

how can I change that ?


Thanks,
Schorsch

Boofo
08-31-2002, 10:20 AM
Where do you see anything about the showthread.php in the gender hack? :)

Originally posted by assassingod
Help! Im using 2.2.7, and there doesnt seem to be this code in showthread:

if ($post['receivepm'] and $enablepms==1) {
eval("\$post[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
} else {
$post[pmlink] = "";
}

Or this code:

$post[profile]="";
$post[email]="";
$post[useremail]="";
$post[icqicon]="";
$post[aimicon]="";
$post[yahooicon]="";
$post[homepage]="";
$post[findposts]="";
$post[signature]="";
$onlinestatus="";

Anyonegot any ideas??:(

clouds_kid
09-05-2002, 04:34 AM
does this work on 2.2.7?

Kars10
09-05-2002, 05:25 PM
Works like a charm on 2.2.7.
Installation was very easy...:)
Thanx.

* Minifreunde klicks install!!

PHiXTiT
09-07-2002, 03:50 PM
works great on 2.2.7

PHiXTiT
09-07-2002, 04:43 PM
Originally posted by Simon Moon
Hi everyone. Great hack, but i think it needs some more treatment... Hardcodeing the images is not a very usable idea, therefore, use templates.

Add 3 templates
gender_male:
&nbsp;<img src="images/male.gif" border="0">

gender_female:
&nbsp;<img src="images/female.gif" border="0">

gender_undiscloed:
&nbsp;<img src="images/questionmark.gif" border="0">


If you want to change this part now ever, just change these 3 templates. Now to the modifications you need to do for them to work properly with the page.

IMPORTANT for the part below: Everything stays the same in the 3 files, EXCEPT $post[gender]. Justtake a good look and replace the coresponding code... it aint that hard :)

Wherever the instructions tol you to put in this code:

if ($post[gender] == "0") {
$genderimage = "&nbsp;<img src=\"images/questionmark.gif\" border=\"0\">";
} elseif ($post[gender] == "1") {
$genderimage = "&nbsp;<img src=\"images/female.gif\" border=\"0\">";
} elseif ($post[gender] == "2") {
$genderimage = "&nbsp;<img src=\"images/male.gif\" border=\"0\">";
}


Put now in this one:

if ($post[gender] == "0") {
eval("\$genderimage = \"".gettemplate("gender_undisclosed")."\";");
} elseif ($post[gender] == "1") {
eval("\$genderimage = \"".gettemplate("gender_female")."\";");
} elseif ($post[gender] == "2") {
eval("\$genderimage = \"".gettemplate("gender_male")."\";");
}


This has to be done in these files: admin/functions.php member.php memberlist.php

Now 2 more steps and we have it.
in member.php search for

if ($action=="getinfo") {
$templatesused = "getinfo_sendpm,aol,icq,yahoo,getinfo_birthday,geti nfo_customfields,getinfo";

change the second part to this:
$templatesused = "getinfo_sendpm,aol,icq,yahoo,getinfo_birthday,geti nfo_customfields,getinfo,gender_male,gender_female ,gender_undisclosed";
If you have some hacks that might need here more, just take a look at the end. Its just 3 names added.

Now change in memberlist.php the 4th line, and add there also the three templates. If you have no other hacks it could look like this:

$templatesused = "memberlist_letterselected,memberlist_letter,postbi t_search,postbit_useremail,icq,aim,yahoo,postbit_h omepage,postbit_sendpm,postbit_profile,memberlistb it,memberlist,memberlistsearch,gender_male,gender_ female,gender_undisclosed";

Thats it, its now template based. The fun with templates is that you change a tamplte and you change the places where you added it. Thats why i missed this function in the hack, because i felt like trying around a bit with the images and other images and it sucked to make the changes all the time to the code.

Thanks for the great hack!!!

Just thought that i would point out that the 3rd template undisclosed is spell wrong. It is missing the s

Thanks.

PHiXTiT
09-07-2002, 06:35 PM
I have noticed that this hack is chopped up all over the threads so I took the liberty to compose all of the additions and update this hack. I have tested this on vB2.2.7 and it is fully functional.

All credit to the original hacker. :)

I will attach the new updated file:

nbb
10-03-2002, 05:29 PM
Great thing, thank you!! Works fine with 2.2.8!

Two questions:

1) how do I have to modify if I want to force the users to decide if they are male or female? (i.e. no undisclosed possible)

2) how can I make this required? Same procedure like with required birthdate?

Can anybody help?

Xer
12-06-2002, 05:58 PM
working on 2.2.9

:Judge:
01-18-2003, 02:41 AM
Well everything went good on my 2.2.9 but I lost my edit sig option in the user profile?

L-Mane
03-02-2003, 09:23 PM
Does this work for 2.30 because I am getting a buncha coding errors on the profile pages.

L-Mane
03-05-2003, 12:47 AM
uppin

L-Mane
03-08-2003, 11:26 PM
Anyone try this on the latest?

kuwaitsun
03-19-2003, 08:17 PM
thanks
it works with my vb 228

mcyates
03-21-2003, 05:19 PM
Working on V 2.3

sabret00the
03-26-2003, 12:29 PM
had this installed for ages, just forgot to press install :nervous:

Weasel
04-03-2003, 05:33 AM
On 2.3.0 getinfo does not work because $post is not defined in member.php therefore $post[gender] does not work, anyone know how to fix this?

Boofo
04-03-2003, 05:40 AM
Today at 01:33 AM Weasel said this in Post #86 (https://vborg.vbsupport.ru/showthread.php?postid=376974#post376974)
On 2.3.0 getinfo does not work because $post is not defined in member.php therefore $post[gender] does not work, anyone know how to fix this?


Try $userinfo[gender]

Weasel
04-03-2003, 05:42 AM
Today at 12:40 AM Boofo said this in Post #87 (https://vborg.vbsupport.ru/showthread.php?postid=376977#post376977)
Try $userinfo[gender]


Duh, silly me, and by the way you only have to change it if you use the template way instead of the hard coded way

asasi
04-04-2003, 02:30 AM
Hi!
I have instaled this hack on my vb but it not working correctly...when a member change his gender too male or female when he come back to his profile it changed to unclosed (?)
plz help

Alien
04-14-2003, 08:03 PM
This hack works perfectly in 2.3.0 except I cannot get it to show gender pic in the profile.

I tried the "fix" above, however that would not work. All it would display is "1" or "2" etc.. I want it to show the picture just like in the postbit and just like in the memberlist. Help! :D

Alien
04-14-2003, 08:32 PM
BTW, I'm using the updated file from PHiXTiT earlier in this thread...

Alien
04-14-2003, 08:34 PM
Got it fixed! Yay! :)

ogden2k
05-02-2003, 08:57 PM
01-10-02 at 04:30 PM Shenlong said this in Post #31 (https://vborg.vbsupport.ru/showthread.php?postid=212328#post212328)
well these instructions are weird, dont got that code in my postbit so I guess no genderhack 4 me
Anyone have a fix for this?

NyCwill
05-12-2003, 06:08 PM
04-14-03 at 10:03 PM Alien said this in Post #90 (https://vborg.vbsupport.ru/showthread.php?postid=382172#post382172)
This hack works perfectly in 2.3.0 except I cannot get it to show gender pic in the profile.

I tried the "fix" above, however that would not work. All it would display is "1" or "2" etc.. I want it to show the picture just like in the postbit and just like in the memberlist. Help! :D

how did u fix it??..... i have the same prob

Floris
05-13-2003, 07:13 PM
I'd love to know how to fix it :)

And ..

How to make this option a required option during registration ?

thamyeuvn
05-14-2003, 03:53 AM
Tested with vb2.2.6, good job apfeifer!

cYbercOsmOnauT
06-06-2003, 10:59 PM
great!
/me clicks install.

subu1
06-12-2003, 05:51 PM
thxx for this beautifull Hack i love ist, but can everybody tell my where I can find white or red gender gif's, because my Underground is verry dark.

greetz subu1 and thank you for your help. *click installs*

subu1
06-15-2003, 05:53 AM
good morning friends,

in my version 2.2.8 the hack works perfekly, but by my Girlfriend version 2.2.6 i have an error in the memberlist. looks in my attachment.

Can everybody help me, i search for 4 hours but i can't find the problem

i hope you can see what i mean :surprised:

subu1
06-15-2003, 05:55 AM
ok here gif's 1

subu1
06-15-2003, 05:56 AM
and here gif's 2

have fun :bunny:

pgowder
08-18-2003, 10:26 PM
I installed last night and something isn't working. I'm on version 2.2.8. It must be that my insert was different than the one in the instructions. Here is the error I am getting:


Invalid SQL: INSERT INTO user (userid,username,password,email,coppauser,homepage ,icq,aim,yahoo,signature,adminemail,showemail,invi sible,usertitle,joindate,cookieuser,daysprune,last visit,lastactivity,usergroupid,timezoneoffset,emai lnotification,receivepm,emailonpm,options,birthday ,maxposts,startofweek,ipaddress,pmpopup,referrerid ,nosessionhash,avatarid,gender) VALUES (NULL,'guest1','f93d443d830d46e8f62da123ee607c09', 'calendar@powwows.com','','0','http://www.powwows.com','','aol','yahoo','','1','1','0',' Pow Wow Visitor','1061249068','1','-1','1061249068','1061249068','3','0','1','1','0',' 15','1970-1-1','-1','1','65.87.136.80','0','0','1','0','2')
mysql error: Column count doesn't match value count at row 1


Here is the part where the insert is done in register.php:


$DB_site->query("INSERT INTO user (userid,username,password,email".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signa ture,adminemail,showemail,invisible,usertitle,join date,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm,options,birthday,maxposts,startofwee k,ipaddress,pmpopup,referrerid,nosessionhash,avata rid,gender) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes(md5($password))."','".addslashes(htmlspecialchars($email))."',".$newstyleval."'".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','".time()."','$cookieuser','".addslashes($prunedays)."','".time()."','".time()."','$newusergroupid','".addslashes($timezoneoffset)."','$emailnotification','$receivepm','$emailonpm',' $options','".addslashes($birthday)."','".addslashes($umaxposts)."','".addslashes($startofweek)."','".addslashes($ipaddress)."','$pmpopup','".addslashes($testreferrerid['userid'])."','$nosessionhash','$avatarid','$gender')");
$userid=$DB_site->insert_id();


Thanks

TheComputerGuy
09-18-2003, 11:51 AM
Does this hack work for vB 2.3.2?

VirtualHogwarts
11-30-2003, 02:05 AM
/me clicks install! Works like a charm. EVEN ON vB 2.3.3

Oblivion Knight
12-23-2003, 08:07 PM
Try $userinfo[gender]Using this instead of $post[gender] makes this mod work like a dream on 2.3.3.. :)

Oblivion Knight
01-08-2004, 10:07 AM
To save yourself a couple of queries in showthread.php, it may be beneficial to do the following..

Find:

$templatesused = 'postbit_searchScroll to the end of this line and find ';
Add BEFORE that, this:

,gender_undisclosed,gender_female,gender_male

Find:

$templatesused = 'showthread_ratingdisplayScroll to the end of this line and find ';
Add BEFORE that, this:

,gender_undisclosed,gender_female,gender_male

brownafroduck
07-01-2004, 05:17 PM
Its probably my fault anyways, but when people went to register, they couldn't. It gave a database error. However, when I went to revert to by just doing the hack in reverse, all my modifications looked correct to me. I am running a vB2.3.2.

ZiRu$
08-01-2004, 05:24 PM
Installed and working on 2.3.5 by using this file

https://vborg.vbsupport.ru/showpost.php?p=296437&postcount=76