Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Gender in Postbit or Postbit Legacy - vB 4.0.x Inc GOLD Details »»
Gender in Postbit or Postbit Legacy - vB 4.0.x Inc GOLD
Version: 1.00, by Welshy2008 Welshy2008 is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.0 Rating:
Released: 12-25-2009 Last Update: 12-26-2009 Installs: 280
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

What is this?

This is a little Mod & Template edit that adds a 'Gender' for you Members to choose and displays their 'Gender and a nice little icon' in their Postbit.

Instructions in the "READ ME" file (pdf) , pictures and SCREENSHOTS are all included in the Attached file ' Gender in Postbit'.

Complete this in 4 Steps:-


STEP ONE; Create a New Profile Field:

AdminCP -> User Profile Fields -> Add New User Profile Field ->
And do the following:
  • Profile Field Type: Single-Selection Menu
Click Continue


Add New User Profile field: Single-Selection Menu

  • Title: Gender:
  • Description: Please Select your Gender
  • Profile Field Category: Uncatagorized
  • Options: Male , Female
  • Set Default: None
  • Display Order: (Chosen By You)
  • Field Required: Yes, at registration & profile updating (You don?t have to make it compulsory)
  • Field Editable By User: Yes
  • Private Field: No
  • Field Searchable On Members List: Yes
  • Show On Members List: Yes
Optional Output:
  • Allow User to input their own value for this option: No
  • Max length of allowed user input: 100
  • Field Length: 25
  • Regular Expression: Leave this EMPTY
Display Page:
  • Which page displays this option? Edit Profile
SAVE & Note the ?field? number as you need to replace the ?X? with it in the two positions (2) containing ?fieldX?



STEP 2; Add a Phrase:

AdminCP -> Languages & Phrases -> Phrase Manager -> Add New Phrase (Center button on the bottom):
  • Phrase Type: GLOBAL
  • Product: vBulletin
  • Varname: gender
  • Text: Gender
SAVE


STEP 3; Postbit or Postbit_Legacy Template (whichever one you use):


AdminCP -> Styles and Templates -> Style Manager -> (style that you use ? Mine is ?Default Style?) -> << >> -> Postbit
Templates -> Postbit (or Postbit _legacy, depending on which one YOU use)

FIND:

Code:
<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt>: <dd>{vb:raw post.joindate}</dd></vb:if><br />
ADD BELOW:

Code:
<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Gender:</dt> <dd><img src="http://WWW.YOUR FORUM
ADDRESS.COM/images/misc/{vb:raw post.fieldX}.gif" alt="" /></dd></vb:if>
<!-- Wy Gender in postbit End -->

vBulletin 4.1.0 (tested by beiamerica. Please note that I have not tested this myself.

Code:
<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['fieldX']"><dt>{vb:rawphrase gender}</dt> <dd><img src="{vb:stylevar imgdir_misc}/{vb:raw post.fieldX}.gif" alt="{vb:raw post.fieldX}" /></dd></vb:if>
<!-- Wy Gender in postbit End -->

  • Replace the TWO Green ?X?s with the field number in Step One (1).
  • Replace the Red Text with YOUR forum address.
STEP 4; Upload the Images:
  • Upload the ?Male.gif? and the ?Female.gif? to the ?images/misc? directory of your forum?s route.
THAT?S IT !

To view it in your profile: Edit your Profile and choose your ?Gender?.

Please Click the Install and Rate the Mod ? Many Thanks.

Edited on Wednesday 7th July 2010. Reason: Two more Screenshots added and made the "Single-Selection Menu" Bold.

Download Now

File Type: zip Gender In Postbit.zip (808.3 KB, 1715 views)

Screenshots

File Type: jpg 1.jpg (92.6 KB, 0 views)
File Type: jpg 2.jpg (82.3 KB, 0 views)
File Type: jpg 3.jpg (85.1 KB, 0 views)
File Type: jpg 4.jpg (37.6 KB, 0 views)
File Type: gif 5.gif (28.1 KB, 0 views)
File Type: jpg Gender-Screen1-on-Registration.JPG (42.4 KB, 0 views)
File Type: jpg Gender-Screen2-on-Registration.JPG (44.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
6 благодарности(ей) от:
akz645, elsa23, Gorgasm, Macgiber, mohammadxxx, sodasusu

Comments
  #22  
Old 01-15-2010, 10:58 PM
serega_m serega_m is offline
 
Join Date: Aug 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Your code is working fine but I have a little problem, as my genders are in Russian, so before I was using this code in postibt_legacy:

<br /> Он/Она/Оно? - <if condition="$post[field6] == 'Он'"><img src="images/misc/male.gif" align="absmiddle" alt="Он">
<else /><if condition="$post[field6] == 'Она'"><img src="images/misc/female.gif" align="absmiddle" alt="Она"><else /><if
condition="$post[field6] == 'Оно'"><img src="images/misc/it.gif" align="absmiddle" alt="Оно"></if></if>

But now it doesn't work, obviously. I have tried to modify it to work with vB 4.0.1 style but with no results. Can anybody please modify the code so it will work with vB 4.0.1 the way it was working for me before - with if-else operators, so if a person's gender is "Она" (Female) then the appropriate pic will be showing. I could use just english words for my Russian forums, of course, but then I need to save the new English gender in every profile which already had the old Russian gender, and it will be a major pain in the ass and I dunno how or if I can do it automatically from AP.
Reply With Quote
  #23  
Old 01-16-2010, 10:22 AM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by serega_m View Post
Hi,

Your code is working fine but I have a little problem, as my genders are in Russian, so before I was using this code in postibt_legacy:

<br /> Он/Она/Оно? - <if condition="$post[field6] == 'Он'"><img src="images/misc/male.gif" align="absmiddle" alt="Он">
<else /><if condition="$post[field6] == 'Она'"><img src="images/misc/female.gif" align="absmiddle" alt="Она"><else /><if
condition="$post[field6] == 'Оно'"><img src="images/misc/it.gif" align="absmiddle" alt="Оно"></if></if>

But now it doesn't work, obviously. I have tried to modify it to work with vB 4.0.1 style but with no results. Can anybody please modify the code so it will work with vB 4.0.1 the way it was working for me before - with if-else operators, so if a person's gender is "Она" (Female) then the appropriate pic will be showing. I could use just english words for my Russian forums, of course, but then I need to save the new English gender in every profile which already had the old Russian gender, and it will be a major pain in the ass and I dunno how or if I can do it automatically from AP.


What are the following, in Russian?


Please Translate the following for me...


1. Gender
2. Please Select your Gender
3. Male , Female
4. gender (No capitals)
5. This is Gender


I do not speak or understand Russian. I do not normally do translations - But on this occasion I will have a TRY! I will do my best - with no guarantee that it will work.
Reply With Quote
  #24  
Old 01-16-2010, 10:56 AM
serega_m serega_m is offline
 
Join Date: Aug 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No,

You don't need to do translation really Just in my old code system were getting the right picture for the choice people made in their profile. See, if a person choose "Он" (Male) then there was the code for this choice: <if condition="$post[field6] == 'Он'"><img src="images/misc/male.gif" align="absmiddle" alt="Он">

It was using if-else operators, and in your code it is just one operator<vb:if> - the way it works now is that you have two options - Male or Female and two corresponding files with names Male.gif and Female.gif - but this won't work for me cause if I'll rename my files to Russian - Unix won't be able to recognize them That's the problem So I need the workaround, essentially - a new version of the old code which will work in vB 4.0.1
Reply With Quote
  #25  
Old 01-16-2010, 11:28 AM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see. I am sure someone will be along that can help you.
Reply With Quote
  #26  
Old 01-16-2010, 11:30 AM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just one more thing - Can you click installed please?
Reply With Quote
  #27  
Old 01-16-2010, 11:37 AM
serega_m serega_m is offline
 
Join Date: Aug 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did click, but anybody?
Reply With Quote
  #28  
Old 01-18-2010, 08:00 PM
sdavis2702 sdavis2702 is offline
 
Join Date: Apr 2008
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome awesome awesome... thank you.
Reply With Quote
  #29  
Old 01-20-2010, 10:15 AM
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Posts: 878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why have three options...?

Male
Female
Blank <------ ?????
Reply With Quote
  #30  
Old 01-20-2010, 02:28 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RedHacker View Post
Why have three options...?

Male
Female
Blank <------ ?????


With the blank option, the mod doesn't show if the user doesn't select an option.
Reply With Quote
  #31  
Old 01-20-2010, 03:31 PM
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Posts: 878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Welshy2008 View Post
With the blank option, the mod doesn't show if the user doesn't select an option.
Can i show together male and female icon if the user select blank option...?
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 03:25 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.04861 seconds
  • Memory Usage 2,362KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (6)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (8)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete