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)
-   -   [RELEASE vB2B3] Gender Hack 2.0 (https://vborg.vbsupport.ru/showthread.php?t=11367)

03-13-2001 10:00 PM

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.

03-23-2001 01:32 AM

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?

03-23-2001 01:34 AM

worked fine in userinfo too.

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

03-23-2001 01:54 AM

Had a quick read through and fixed it...

The part which says:
Code:

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

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.

03-23-2001 07:46 AM

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

03-28-2001 02:24 AM

works great love it man, thanks!

ff92k 04-09-2001 11:31 PM

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 04-10-2001 07:13 AM

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

ff92k 04-10-2001 10:27 AM

thats it :)
thanks you, done it!

MrLister 04-10-2001 01:00 PM

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


All times are GMT. The time now is 12:35 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.01206 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_code_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
  • (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