Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
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
Mod Version: 1.1.0, by ReCom (Member) ReCom is offline
Developer Last Online: Jul 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (15 votes - 4.80 average) Installs: 158
Released: 20 Nov 2008 Last Update: 27 Nov 2008 Downloads: 1229
Not Supported Uses Plugins Additional Files Re-usable Code  

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/

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	genderbit.gif
Views:	477
Size:	2.2 KB
ID:	89582   Click image for larger version

Name:	genderbit_cfg.gif
Views:	1003
Size:	23.9 KB
ID:	89583   Click image for larger version

Name:	genderbit_imgset.gif
Views:	1049
Size:	6.5 KB
ID:	89630   Click image for larger version

Name:	genderbit_profile.gif
Views:	972
Size:	83.4 KB
ID:	89679  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #91  
Old 26 Feb 2009, 07:10
ReCom ReCom is offline
 
Join Date: Mar 2008
Execute the following SQL assuming your vBulletin table prefix is vb_:

UPDATE `vb_userfield` SET `field5` = 'Female' WHERE `field5` = 'Unspecified'

Change `field5` to the id of the gender user profile field in your forum and 'Female' and 'Unspecified' to appropriate values.
Reply With Quote
  #92  
Old 26 Feb 2009, 07:58
singabaloo's Avatar
singabaloo singabaloo is offline
 
Join Date: May 2008
Originally Posted by ReCom View Post
Execute the following SQL assuming your vBulletin table prefix is vb_:

UPDATE `vb_userfield` SET `field5` = 'Female' WHERE `field5` = 'Unspecified'

Change `field5` to the id of the gender user profile field in your forum and 'Female' and 'Unspecified' to appropriate values.
Thanks
Reply With Quote
  #93  
Old 15 Apr 2009, 18:20
thepowerofnow thepowerofnow is offline
 
Join Date: Mar 2009
does this work on vb 3.82 ??
Reply With Quote
  #94  
Old 05 Aug 2009, 08:12
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Jan 2007
INSTALLED and works great once I figured out I had to input the field as field# and not just #. That part is not so clear in the description.
__________________
Yotsume
Kaydev Media Productions
Check out my mods
:
EYO-AIM, FlashChat Combo-Module for vBadvanced 3.6x or 3.7x
Reply With Quote
  #95  
Old 06 Aug 2009, 22:57
Gersfan Gersfan is offline
 
Join Date: Dec 2007
Installed on 3.8.3!

Has anyone got this working on 3.8, I can't get it too work, great mod aswell but something doens't seem to be right!

Thanks!
Reply With Quote
  #96  
Old 09 Aug 2009, 15:50
Gersfan Gersfan is offline
 
Join Date: Dec 2007
Got it working now!

Just curious but maybe would it be possible for you to provide me with some help regarding this please?
http://www.vbulletin.org/forum/showthread.php?t=218498

Thanks!
Reply With Quote
  #97  
Old 26 Aug 2009, 12:10
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Image for unknown gender....?
Reply With Quote
  #98  
Old 26 Aug 2009, 20:24
Mr. W's Avatar
Mr. W Mr. W is offline
 
Join Date: Aug 2009
This seems to work on 3.8.4.
Reply With Quote
  #99  
Old 07 Oct 2009, 13:48
alfex68 alfex68 is offline
 
Join Date: Feb 2008
Hello This is a great mod that works really well. Thanks. I've installed this on my local test forum but before i can roll it out into production I need an answer to a question.


In regards to the genderbit extension that shows default male/female images when a user hasn't uploaded an image...

In short I need to be able to specify a different image src url for my memberinfo template.

The template I am using requres a larger profiile image than the image used for the avatar.

I tried to mod the genderbit templates by adding "_lg" to the gif thats being called but the hack overwrites the request (or ignores it at the template level)

Standard:
src="$vboptions[genderbit_imgdir]/gender_{$gender}{$vboptions[genderbit_imgset]}.gif"

What I tried:
src="$vboptions[genderbit_imgdir]/gender_{$gender}{$vboptions[genderbit_imgset]}_lg.gif"

When i put the larger image in the images/misc directory...no good

So i need to have for example a male/female image of say 240x240 on the profile page and maybe a 100x100 on the memberlist , and perhaps a 60x60 ijn the member comments.

I know this is an older hack but hey...the last post was from someone reporting running successfully on 3.8.x

thanks

Last edited by alfex68; 07 Oct 2009 at 13:54.
Reply With Quote
  #100  
Old 07 Oct 2009, 14:01
alfex68 alfex68 is offline
 
Join Date: Feb 2008
ok after i wrote my last comment i thought to myself, something is superceding the template...so i looked in the plugins xml bitfield...and it looks liker if i modify the xml it should work....i'll try to modify it there...if you don't hear from me...it worked! lol
Reply With Quote
  #101  
Old 09 Oct 2009, 23:56
skylab's Avatar
skylab skylab is offline
 
Join Date: Feb 2009
Real name: Mike
I want to place the Gender Icon elsewhere. What would the hook be?
__________________
http://www.artoftravelblogging.com - A Travel Blogging Community
Reply With Quote
  #102  
Old 10 Oct 2009, 14:14
linuxututs linuxututs is offline
 
Join Date: Oct 2009
Work like a treat for me ( vB 3.8.4 )

The sql I ran was
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

leaving the vb_ off because I didn't put it in when I installed.

Thanks,
Reply With Quote
  #103  
Old 19 Oct 2009, 02:40
BucWiLd's Avatar
BucWiLd BucWiLd is offline
 
Join Date: Jun 2008
anyone using this with the psi-stats hack and know what to enter in the "Demographics: Gender Field" area?


edit : got it
__________________
www.discusswls.com

Last edited by BucWiLd; 19 Oct 2009 at 16:06.
Reply With Quote
  #104  
Old 30 Oct 2009, 21:00
RedHacker RedHacker is offline
 
Join Date: Jan 2009


How to fix this....?
Reply With Quote
  #105  
Old 27 Dec 2009, 10:14
mgurain's Avatar
mgurain mgurain is offline
 
Join Date: Apr 2005
Real name: Mohammed Al-Gurain
Hi ReCom,

Thanks for this useful mod, we are using it long time.
Can you upgrade it to 4.x ?

Thanks,,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 14:44.

Layout Options | Width: Wide Color: