vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Gender Hack for vB 2.2.0 (https://vborg.vbsupport.ru/showthread.php?t=32241)

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:
Code:

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

Quote:

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

Quote:

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

Quote:

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:

Code:

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

after this:

Code:

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

Quote:

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

Quote:

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

[high]* Martin64 clicks install
[/high]
[high]* Martin64 thinks with great hacks such as this one there's no need to create my own ones
[/high]
[high]* Martin64 looks at own gender hack and laughs.
[/high]

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:
PHP 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\">";


into the 3 files (memberlist.php, member.php, admin/functions.php), insert this:
PHP Code:

                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:
PHP Code:

<smallfont>$post[usertitle]</smallfont><br>
    
$post[avatar]<p>
    <
smallfont

immediatly AFTER that, add:
PHP Code:

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:

PHP Code:

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

Or this code:

PHP 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?

Quote:

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? :)

Quote:

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

PHP Code:

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

Or this code:

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

[high]* Minifreunde klicks install!![/high]

PHiXTiT 09-07-2002 03:50 PM

works great on 2.2.7

PHiXTiT 09-07-2002 04:43 PM

Quote:

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:
PHP 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:
PHP Code:

      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
PHP Code:

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

change the second part to this:
PHP Code:

$templatesused "getinfo_sendpm,aol,icq,yahoo,getinfo_birthday,getinfo_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:
PHP Code:

$templatesused "memberlist_letterselected,memberlist_letter,postbit_search,postbit_useremail,icq,aim,yahoo,postbit_homepage,postbit_sendpm,postbit_profile,memberlistbit,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.


All times are GMT. The time now is 12:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01570 seconds
  • Memory Usage 1,883KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (13)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete