Helpful Information
 
 
Category: vBulletin.org Forum
[RELEASE vB2B3] Gender Hack 2.0

Description:
This hack will show a little graphical icon representing a gender of a user. This icon will also be shown in the memberlist and in the member profile. User may select Unknown, Male and Female.

vBulletin versions supported:
2.0 Beta 3

Files to edit:
register.php, member.php, memberlist.php, showthread.php

Templates to modify:
8 - registeradult, registercoppa, modifyoptions, modifycoppa, postbit, memberlist, memberlistbit, getinfo

Number of new queries:
0

Number of new templates:
3

Size:
2,70KB

Demo:
N/A

Known bugs and issues:
None

Instructions:
Included in the attached ZIP file.

Installed. And it shows the genders fine within the MEMBERLIST, but within the posts it just shows everyone as the gender you have seleted in your profile.

Any Ideas on Why This Happened?

worked fine in userinfo too.

just within the threads it seems to be a little weird.

Had a quick read through and fixed it...

The part which says:

3. showthread.php
************************************************

// Gender Hack
if ($bbuserinfo[gender]==-1) {
eval("\$gender = \"".gettemplate("postbit_gender_unknown")."\";");
}
else if ($bbuserinfo[gender]==1) {
eval("\$gender = \"".gettemplate("postbit_gender_male")."\";");
}
else if ($bbuserinfo[gender]==2) {
eval("\$gender = \"".gettemplate("postbit_gender_female")."\";");
}
// Gender Hack End

Should be changed to:
3. showthread.php
************************************************

// Gender Hack
if ($userinfo[gender]==-1) {
eval("\$gender = \"".gettemplate("postbit_gender_unknown")."\";");
}
else if ($userinfo[gender]==1) {
eval("\$gender = \"".gettemplate("postbit_gender_male")."\";");
}
else if ($userinfo[gender]==2) {
eval("\$gender = \"".gettemplate("postbit_gender_female")."\";");
}
// Gender Hack End

Hope this helps people.

You're right. The problem was in readme.txt which was used from another hack I made and I accidentaly left those two bb before userinfo. :rolleyes:

Thanks for the head up and I apologize for the bug.

ZIP updated. Bug fixed. Case closed. :)

works great love it man, thanks!

i know this might sound stupid...but im a begginer. Where are the templates found? I got down to the bit that said "new template" and i dont know where that is...help?

Simply add new templates with names and contents as written in the documentation. :)

thats it :)
thanks you, done it!

just before i try it does it work in beta 5.

Yes, it works in every 2.0 beta. I couldn't find anything that needed to be modified for the new code, and it's installed on my forums.

Hi,

i just installed it in RC1! Everything works fine. Then i tried to change it from user options to user profile. But it doesn't work. Can somebody tell what to do if I want to have it the user profile?

Thanks

uhm, can you add one more option to it:?:?:

Both

that would be funny and cool...
would love that for my forums...
does it work with
EVERY beta of vbb 2.0?
(1-5 and RC1+RC2)

thank you in advance... :)

I'll try to make the options selectable using the admin control panel (so you'll be able to add as many options as you want to) as soon as the final version of vB is released.

Originally posted by PeF
I'll try to make the options selectable using the admin control panel (so you'll be able to add as many options as you want to) as soon as the final version of vB is released.

sounds cool!!!

Even the option for a gay icon? lol That should be interesting :D:D:D

Originally posted by PeF
I'll try to make the options selectable using the admin control panel (so you'll be able to add as many options as you want to) as soon as the final version of vB is released.

when i click submit after putting my gender in user cp-it doesnt update

Can I please see a working update for vB 2.0 FINAL, PLEASE?!? :D

This was the line in step 11 in the readme.txt file:
Edit modifycoppa, registeradult and registercoppa the same way as modifyoptions
But I cant find these lines stated in the modifyoptions in the above 3 templates!:
<TR bgcolor="{firstaltcolor}">
<td><normalfont><b>Default Thread View:</b></normalfont></TD>

Originally posted by MicKeY R@t
This was the line in step 11 in the readme.txt file:
Edit modifycoppa, registeradult and registercoppa the same way as modifyoptions
But I cant find these lines stated in the modifyoptions in the above 3 templates!:
<TR bgcolor="#F1F1F1">
<td><normalfont><b>Default Thread View:</b></normalfont></TD>

what vbb version do you use???

when i click submit after putting my gender in user cp-it doesnt update

I am using the vB version 2 rc3

can any1 plz help mi?

I don't wanna repeat it all over again. I'm between jobs and I currently don't have time to rewrite those hacks. They'll be available within 14 days.

OMG :(

Originally posted by PeF
I don't wanna repeat it all over again. I'm between jobs and I currently don't have time to rewrite those hacks. They'll be available within 14 days.
Thanks PeF, I understand, work comes before anything. Good luck man!

If you get the error message after you try to update info under Edit Options this is why. Go modify member.php file. If the line where you updated:
$DB_site->query("UPDATE user

Now if you're using vB 2 Final then just replacing the code, with the one in the readme, you will screw up the file, cause you've just removed some important stuff. Here what it should look like instead:
Replace This:
startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm',

With This:
startofweek='".addslashes($startofweek)."',gender='".addslashes($gender)."',options='$options',receivepm='$receivepm',

Sorry if you don't quite get it but this my first time modifing something on vB. So I'm a kinda a newbie. But the Hack did work for me check my forum. http://ffanitopia.maryginseng.com/forums/

Well this hacked seem to work. But it doesn't. Cause after you update the database it seems to reset your gender after a while. Which I find very weird. I think it's each time you logout or something it resets to the default.

Hi,

I tried to install this hack but when I try to add a new user to my database it is giving me this error:

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.:confused: :(

Any Ideas?

^Same thing happened to me. I just uploaded my backup of register.php and acted like nothing happened.

Originally posted by snyx
Can I please see a working update for vB 2.0 FINAL, PLEASE?!? :D

What about for 2.0.1? :D

Originally posted by Cold Steel


What about for 2.0.1? :D
I think thats implyed :rolleyes:

I'm forced to say I have to leave this community for some time due to my new job and some projects I work for (and of course my personal life). This all means I won't be able to rewrite my hacks as promised so if anyone is interested in the rewrite, just go ahead. You'll find links to my old hacks in my signature.
I apologize for any inconveniences.

Got it installed and working, but how do i add an Admin option to change (or add) the already registered members gender??

any chance of someone rewriting this hack so it works with vbfinal in user profile? please

Anyone?

it was working in 2.0.1 good but when i change my forum to 2.0.3 it can't .

I made all the necessary changes in functions.php but nothing happened :( . can you help me in that hack.

PeF has stopped supporting this hack so I don't see anyone who can help you?

Well there's gotta be some kinda vB hacker who wants to take a crack at this one! I need this hack to work for vB2.0.3. It was working perfectly on 2.0.1 and 2.0.2. Then BAM I get hit hard with it not working...But I did eventually get it working.

I suggest you modify these pages from 2.0.3 Register.php, and Memberlist.php. Those ones for sure you can modify I've done it. Then just use your old Showthread.php and Member.php from vb 2.0.1 or 2.0.2 and modify them as they should be.

Hope this helps you all.

I would also love this hack;)

If anyone could finish it and wrap it up that would be GREAT!!!!:cool: :cool:

whats the big deal? use mutt's hack ( http://www.vbulletin.com/forum/showthread.php?s=&threadid=21833 ) and just add a drop down menu asking if there Male or Female? The only features PeF has is that he has some cool little male/female icons.

snyx

Originally posted by snyx
whats the big deal? use mutt's hack ( http://www.vbulletin.com/forum/showthread.php?s=&threadid=21833 ) and just add a drop down menu asking if there Male or Female? The only features PeF has is that he has some cool little male/female icons.

snyx


yea thankx but i trid it one week a go for a gender hack and country hack olso .

it's good but what i'm looking for something else you can check it in http://www.vbulletin.com/forum/showthread.php?s=&threadid=21833&perpage=15&pagenumber=2 .

Originally posted by conan
Even the option for a gay icon? lol That should be interesting :D:D:D



ok made 2 minor changes

male - female - gay - les
fixed a nicer layout in the profile


aint tested it, but should work

in member php
line 1025
this has got to be the most frustrating hack on this board!!

Originally posted by Maverick1236
in member php
line 1025
this has got to be the most frustrating hack on this board!!

not sure mate just tried it and worked fine for me?

me too-except for members.php

:(

everything works-i just cannot get the gender images to show up?

my paths are correct

this hack doesnt like me:p

their are 2 $templatesused in the showthread.php and i their are none of the other codes i need to chage in their..

I dont see where in showthread on 2.01 $templatesused...

is someone told us where if

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

was we could get it working

I got it working, and well I am going to find some better pictures because those are just too large...

congrats!!-could u please help us out?
tx!!:)

You must have the 2.01 showthread file or it will not work...simple as that...and it will work on 2.03 I am testing it out on my test board right now...and I am trying to change the girl to some +++++ name....so I am just customizing the little boxes...

I'd like to install this after the updated code is posted from scratch for a 2.0.3 install...

Whenever anyone gets the chance. :D

This seems to be pretty simple hack but after much trying it does not work with vBulletin 2.0.3. Can anyone redo this hack or modify it for vBulletin 2.0.3? I am sure a lot other people around here want it as well =) Thanks!

This could use a nice update for 2.2.0, it always seemed to be a bit quirky and not a clean install... Anyone?










privacy (GDPR)