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)

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 09:34 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.01234 seconds
  • Memory Usage 1,774KB
  • 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
  • (7)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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