PDA

View Full Version : [RELEASE vB2B3] Gender Hack 2.0



PeF
Wed 14th Mar '01, 12:04pm
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.

bombout
Thu 22nd Mar '01, 11:32pm
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?

bombout
Thu 22nd Mar '01, 11:34pm
worked fine in userinfo too.

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

bombout
Thu 22nd Mar '01, 11:54pm
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.

PeF
Fri 23rd Mar '01, 5:46am
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. :)

snyx
Wed 28th Mar '01, 12:24am
works great love it man, thanks!

ff92k
Mon 9th Apr '01, 9:31pm
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?

PeF
Tue 10th Apr '01, 5:13am
Simply add new templates with names and contents as written in the documentation. :)

ff92k
Tue 10th Apr '01, 8:27am
thats it :)
thanks you, done it!

mrlister
Tue 10th Apr '01, 11:00am
just before i try it does it work in beta 5.

Kamui
Tue 10th Apr '01, 7:30pm
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.

Birdie501
Mon 30th Apr '01, 11:46am
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

rickjansen105
Mon 30th Apr '01, 2:06pm
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... :)

PeF
Mon 30th Apr '01, 4:27pm
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.

rickjansen105
Tue 1st May '01, 3:42pm
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!!!

conan
Tue 1st May '01, 4:38pm
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.

Maverick1236
Tue 22nd May '01, 12:06am
when i click submit after putting my gender in user cp-it doesnt update

snyx
Tue 22nd May '01, 2:30am
Can I please see a working update for vB 2.0 FINAL, PLEASE?!? :D

MicKeY R@t
Tue 22nd May '01, 5:43am
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>

rickjansen105
Tue 22nd May '01, 1:16pm
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???

Maverick1236
Tue 22nd May '01, 7:56pm
when i click submit after putting my gender in user cp-it doesnt update

MicKeY R@t
Wed 23rd May '01, 3:17am
I am using the vB version 2 rc3

MicKeY R@t
Thu 24th May '01, 7:10am
can any1 plz help mi?

PeF
Thu 24th May '01, 7:29am
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.

MicKeY R@t
Thu 24th May '01, 7:56am
OMG :(

snyx
Thu 24th May '01, 12:15pm
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!

White Chocobo
Thu 24th May '01, 6:26pm
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/

White Chocobo
Thu 24th May '01, 11:42pm
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.

pcmania
Wed 13th Jun '01, 12:31pm
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?

WEAPON
Wed 13th Jun '01, 1:41pm
^Same thing happened to me. I just uploaded my backup of register.php and acted like nothing happened.

Cold Steel
Mon 18th Jun '01, 1:56am
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

snyx
Mon 18th Jun '01, 4:59am
Originally posted by Cold Steel


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

PeF
Tue 19th Jun '01, 9:18am
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.

Jpp
Thu 21st Jun '01, 11:26am
Got it installed and working, but how do i add an Admin option to change (or add) the already registered members gender??

teenfront
Wed 4th Jul '01, 10:39am
any chance of someone rewriting this hack so it works with vbfinal in user profile? please

Maverick1236
Sun 29th Jul '01, 2:24pm
Anyone?

illogicalX
Mon 6th Aug '01, 10:30am
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.

snyx
Mon 6th Aug '01, 11:00am
PeF has stopped supporting this hack so I don't see anyone who can help you?

White Chocobo
Fri 10th Aug '01, 4:32pm
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.

Maverick1236
Fri 10th Aug '01, 6:07pm
I would also love this hack;)

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

snyx
Sat 11th Aug '01, 4:07pm
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

illogicalX
Sat 11th Aug '01, 4:59pm
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 .

Dunny
Sat 18th Aug '01, 3:11pm
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

Maverick1236
Sat 18th Aug '01, 6:00pm
in member php
line 1025
this has got to be the most frustrating hack on this board!!

Dunny
Sat 18th Aug '01, 6:43pm
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?

Maverick1236
Sat 18th Aug '01, 7:08pm
me too-except for members.php

:(

Maverick1236
Sat 18th Aug '01, 10:20pm
everything works-i just cannot get the gender images to show up?

my paths are correct

this hack doesnt like me:p

neogeniseva
Sun 14th Oct '01, 4:46pm
their are 2 $templatesused in the showthread.php and i their are none of the other codes i need to chage in their..

TheComputerGuy
Wed 17th Oct '01, 9:57am
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

TheComputerGuy
Wed 17th Oct '01, 11:09am
I got it working, and well I am going to find some better pictures because those are just too large...

Maverick1236
Wed 17th Oct '01, 5:44pm
congrats!!-could u please help us out?
tx!!:)

TheComputerGuy
Wed 17th Oct '01, 5:54pm
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 mafia name....so I am just customizing the little boxes...

Alien
Wed 17th Oct '01, 8:29pm
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

Gamingforce
Mon 29th Oct '01, 1:46pm
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!