Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Gender Bit: Show gender symbol next to username in postbits and many other places Details »»
Gender Bit: Show gender symbol next to username in postbits and many other places
Version: 1.1.0, by ReCom ReCom is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.7.x Rating:
Released: 11-19-2008 Last Update: 11-26-2008 Installs: 160
Uses Plugins
Re-useable Code Additional Files  
No support by the author.

My first public mod. Please be kind to me

Description:
Gender Bit shows gender symbol next to username in postbits. See "prerequisite" and "Installation guide" below.

Features:
  • Fully uses plugins so there is no need to customize any templates
  • Makes use of the built-in User Profile Field system
  • Configurable through vBulletin Options
  • Includes a number of male-or-female symbol sets to choose from
  • Easily enable/disable the gender symbols in various places
    • Postbits, private messages, announcements etc
    • Memberlist
    • Profile pages
  • No database changes, no extra queries (instead it utilizes existing queries to fetch the gender info), no template edits, in short, no mess.
  • Version 1.0.2 and above: Now also takes care of default profile pictures and friends' avatars by showing default male/female avatar accordingly
  • Version 1.0.2 and above: Exposes a globally-scoped function genderbit_getgender for other mods and plugins to make use (refer change logs below for details)
  • New in 1.1.0: Support for the third gender type ...

Prerequisite:
A custom user profile field designated for members' gender must be manually created in user profile field manager. If your forum does not already have one and you have no idea how to create it, please read included README.txt for instructions.

Download guide:
  • Download and install the latest version only. The older versions are there for record purpose only.
  • The main product package file is Gender Bit x.x.x.zip. You would only need to install this to get the gender symbols in your postbits.
  • Gender Bit Ext x.x.x (requires Gender Bit x.x.x).zip is an extension product that displays gender-aware default avatars for your users. Only install this if you want to have the default avatars showing sillhoutte of a man or a woman depending on your users' genders.

Installation guide:
  1. Upload the includes and images folders (inside the zipped upload folder) to your vbulletin directory (usually /forum). The folders should merge with existing /forum/includes and /forum/images.
  2. Import the product XML in AdminCP product manager. Then, head straight to the option page for Gender Bit under vBulletin Options.
  3. Configure the "User profile field name" to be the name of the user profile field. Usually it is in the form of 'fieldX' where X is a number.
  4. Also configure the "Field value: Male" and "Field value: Female" to be the value(s) of the profile field when a member selects "Male" or "Female" respectively. If there are multiple values that refer to male (or female), separate them using pipe characters, example: Boy|Gentleman
  5. Lastly configure the other options to your likings.
  6. Save and the gender symbol will appear in postbits for members who have set their gender profile field.
Upgrading guide:
Same as installation, with the only difference is to tick the "Overwrite" checkbox when importing the product xml). Also, you would need to check the options page (Admin CP > vBulletin Options > Gender Bit) for any new settings.

Uninstallation guide:
To uninstall simply uninstall the product from AdminCP product manager. Optionally delete the images and xml files:
/images/misc/gender_*.gif
/images/misc/unknown_*.gif
/includes/xml/bitfield_genderbit*.xml

Changelogs:

Version 1.0
- Initial version

Version 1.0.1
- Replaced align="absmiddle" with CSS to pass XHTML validation
- Extra image sets for male/female with a new option in vB Options to choose which set to use

Version 1.0.2
- Fixed php errors in private messages and a few other places
- New: Option to show gender symbol in memberlist
- New: Gender Bit can now take care of default profile pictures and friends' avatar to show default male/female avatar
- New: Exposes a globally-scoped function genderbit_getgender($registry, $userinfo, $unknown='') that returns 'male', 'female' or $unknown. The three parameters are:
  • $registry: the vbulletin core object, usually $vbulletin but may be $this->registry in some vb classes
  • $userinfo: the userinfo array, which usually holds 'userid' and 'username'
  • $unknown: string to return if $userinfo does not contain gender information. default to empty string
Version 1.1.0
- Major revamps.
- Added: a lots more places where the gender symbols will appear, with options to turn each one of them on/off in vBulletin Options
- Added: the third gender for those who think two genders are not enough.
- Changed: Gender Bit will only look for the images in forumdir/images/misc by default unless overridden in vBulletin Options.
- Starting from this version, the handling of gender-aware default avatars and profile pictures have been separated into an extension product named "Gender Bit Extension". Gender Bit does NOT require Gender Bit Extension to operate but Gender Bit Extension REQUIRES Gender Bit.

Note: Should also work in vB 3.6.x, but I haven't done any testing in that vB version.

Troubleshooting (aka why aren't the symbols/images showing?)

Step 1:
In { AdminCP > vBulletin Options > Gendet Bit } check if you have configured "Field value: Male" and "Field value: Female" to match what your members would choose if they are male or female. If in your forum/language "Shalabadaba" means "male" and "Shubidubidu" means "female", enter Field value: Male = "Shalabadaba" and Field value: Female = "Shubidubidu". Just overwrite the default "Male" and "Female" in the textboxes.

Step 2 (version 1.1.0 and above):
Still in { AdminCP > vBulletin Options > Gendet Bit }. Try setting Gender symbols image set = "Text/Font" to see if the symbols appear. If it does then you forgot to upload the images into ALL /images/misc folders for ALL STYLES installed in your forum.

Step 3:
From your showthread pages, find the following part (page navigation):

Right-click on the down-pointing arrow and select "Properties" from the popup menu. Check the path to the file, usually in the form of "http://www.yoursite.net/forum/images/misc/menu_open.gif". The bolded part is the path of the misc images folder for your current style. If it says "http://www.yoursite.net/forum/images/yuppie/v4/misc/menu_open.gif" then upload the gender images into forum/images/yuppie/v4/misc/

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-20-2008, 01:19 AM
ReCom ReCom is offline
 
Join Date: Mar 2008
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First post reserved!

My first public mod (although I've created a number of mods used only on my site).

Please be kind to me
Reply With Quote
  #3  
Old 11-20-2008, 02:17 AM
DarkGizmo DarkGizmo is offline
 
Join Date: Apr 2008
Location: NYC
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool mod! installed!
Reply With Quote
  #4  
Old 11-20-2008, 05:08 AM
ReCom ReCom is offline
 
Join Date: Mar 2008
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just realized that in the normal postbit template (non-legacy), both options in the "Gender bit location in postbit" setting give the same result but if the forum uses postbit_legacy, the result will be different. I only tested it on postbit_legacy so I was not aware that that particular setting doesn't do much difference in normal postbit. All is good though.
Reply With Quote
  #5  
Old 11-20-2008, 05:27 AM
sensimilla sensimilla is offline
 
Join Date: Dec 2004
Location: Poland
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ive just installed previous version by peterska yesterday, but i might look into your code aswell, thanks.
Reply With Quote
  #6  
Old 11-20-2008, 12:31 PM
Ash Ketchum's Avatar
Ash Ketchum Ash Ketchum is offline
 
Join Date: Jan 2008
Location: New Jersey
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't seem to install it....
Reply With Quote
  #7  
Old 11-20-2008, 09:38 PM
ReCom ReCom is offline
 
Join Date: Mar 2008
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ash Ketchum View Post
I can't seem to install it....
Did you import the included product-genderbit.xml file in AdminCP > Plugins & Products > Manage Products ?

Did you create a custom user profile page for members' gender using AdminCP > User Profile Fields > Add New User Profile Field ?

Did you configure Gender Bit to use that custom user profile field in Admin CP > vBulletin Options > vBulletin Options > Gender Bit ?
Reply With Quote
  #8  
Old 11-20-2008, 10:43 PM
neoxi's Avatar
neoxi neoxi is offline
 
Join Date: Mar 2007
Location: izmir - turkey
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you.. installed
Reply With Quote
  #9  
Old 11-20-2008, 11:01 PM
P.Jackson P.Jackson is offline
 
Join Date: Sep 2003
Location: Newcastle,Uk
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone got images for a dark based forum?
Reply With Quote
  #10  
Old 11-21-2008, 05:27 AM
ReCom ReCom is offline
 
Join Date: Mar 2008
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by P.Jackson View Post
anyone got images for a dark based forum?
Version 1.0.1 comes with a few image sets to choose from. Re-download the package above and install+upload. "Pixel Precision", "Japanese Kanji", "Bee & Flower" and "Toilet Sign" sets should look okay in dark-styled forum. Test for me please?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09373 seconds
  • Memory Usage 2,307KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete