Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

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
  #132  
Old 07-07-2012, 05:00 AM
thenamesgould thenamesgould is offline
 
Join Date: Mar 2008
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by insidegames View Post
can you tell mer your code please? :-) Looks very coool
Sorry for the slow reply. I put mine in the postbit_legacy template ... and it goes right after this bit:

{vb:raw memberaction_dropdown}

and before:

{vb:raw post.onlinestatus}

It should look like this once done:

{vb:raw memberaction_dropdown}
<!-- Wy Gender in postbit Start -->
<vb:if condition="$post['field5']"><img src="{vb:stylevar imgdir_misc}/{vb:raw post.field5}.gif" alt="{vb:raw post.field5}" /></vb:if>
<!-- Wy Gender in postbit End -->
{vb:raw post.onlinestatus}

Of course, you might not be using field 5, so you might have to change that bit. Let me know if you have any problems.
Reply With Quote
Благодарность от:
MeMySelfNi
  #133  
Old 07-24-2012, 06:39 PM
imported_dfmafia's Avatar
imported_dfmafia imported_dfmafia is offline
 
Join Date: Jun 2004
Location: Wherever Uncle Sam Needs!
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

had an issue, i required it for registration. it wasn't showing up.

I added the following to my registration template:

FIND:

Code:
			<div class="blockrow">
				<ul class="group">
					<li>
						<label for="email">{vb:rawphrase email_address}:</label>
						<input type="text" class="textbox" name="email" id="email" maxlength="50" value="{vb:raw email}" dir="ltr" tabindex="1" />
					</li>
					<li>
						<label for="emailconfirm">{vb:rawphrase confirm_email_address}:</label>
						<input type="text" class="textbox" name="emailconfirm" id="emailconfirm" maxlength="50" value="{vb:raw emailconfirm}" dir="ltr" tabindex="1" />
					</li>
				</ul>
				<p class="description">{vb:rawphrase enter_valid_email_address}</p>
			</div>

ADD BELOW:

Code:
<div class="blockrow">
				<ul class="group">
					<li>
<label for="gender">{vb:rawphrase gender}:</label>
<select class="primary" name="userfield[fieldXX]" id="cfield_XX" tabindex="1">
<option value="0" selected="selected"></option>
<option value="1">Male</option>
<option value="2">Female</option> 
</select>
<input type="hidden" name="userfield[fieldXX_set]" value="1" />
					</li>
				</ul>
			</div>
change XX for whatever your profile field for gender is.

and seems to be working...

vB 4.2.0 PL 2
Reply With Quote
  #134  
Old 12-17-2012, 08:24 PM
Ary Braga Ary Braga is offline
 
Join Date: Jun 2009
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by insidegames View Post
is it possible to get the gender-icon after the username?
working Perfectly on VB 4.2.0pl3

yes.

Firstly understand. The image name is case sensitive. Find first you Fieldx. No number, but the two names.
e.g: Male and Female =>Female is different of female
just rename the img as you filled in FieldX

Put the two img in /yourforum/images/misc

if you use VB4.2x

Find in postbit_legacy or postbit, this line: ( in my case I used postbit_legacy).

To put After USERNAME, use my attachments.



PHP Code:

     
<vb:if condition="$post['userid']">      
        {
vb:raw memberaction_dropdown
Change to:

PHP Code:
<vb:if condition="$post['userid']">     
{
vb:raw memberaction_dropdown}    
 <
vb:if condition="$post['fieldX']">&nbsp;&nbsp;&nbsp;&nbsp;<img src="{vb:stylevar imgdir_misc}/{vb:raw post.fieldX}.png" alt="{vb:raw post.fieldX}" />
            <
vb:else />
                <
span class="username guest">{vb:raw post.musername}</span>
</
vb:if></vb:if> 
I alter to PNG File. (case sensitive to) if you need change to .gif or .GIF? it's OK.

I used spacing ( &nbsp; ) to separate the image of Username.

Maybe you need to take out or put more ( &nbsp; ).

Depending on the template of your postbit.

Be happy



----------------

18x18-PNG

18x18-PNG
----------------
12x12-GIF

12x12-GIF
Reply With Quote
  #135  
Old 07-29-2013, 10:36 AM
unfor unfor is offline
 
Join Date: Jul 2013
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey!

do you have any solution for the missing icons in 4.2.1?

thanks in advance .
Reply With Quote
  #136  
Old 08-01-2013, 02:46 AM
Macgiber Macgiber is offline
 
Join Date: Apr 2009
Location: PR
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed

4.2.1
Reply With Quote
  #137  
Old 08-01-2013, 02:53 AM
Macgiber Macgiber is offline
 
Join Date: Apr 2009
Location: PR
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by unfor View Post
hey!

do you have any solution for the missing icons in 4.2.1?

thanks in advance .
Friend, you have to verify either the image path, I install in current version and struggle to 100%
Reply With Quote
  #138  
Old 08-09-2013, 10:23 PM
TravisWPaquin's Avatar
TravisWPaquin TravisWPaquin is offline
 
Join Date: Aug 2012
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It does not list the gender on my postbit. I edited the template, added the images and profile field, but nothing. Any ideas on how to get it to show? The code I was to add below the other one did not have the break tag which gives me the impression I may of had the wrong code, but for the most part, I'm sure they did match. Any help would be appreciated. Thanks!
Reply With Quote
  #139  
Old 08-09-2013, 10:39 PM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we have the texts Male or Female instead of the gender symbols?
Reply With Quote
  #140  
Old 08-10-2013, 05:34 AM
TravisWPaquin's Avatar
TravisWPaquin TravisWPaquin is offline
 
Join Date: Aug 2012
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Amaury25 View Post
Can we have the texts Male or Female instead of the gender symbols?
Preferably, why not both. That would be nice to have.
Reply With Quote
2 благодарности(ей) от:
Amaury, CoZmicShReddeR
  #141  
Old 08-17-2013, 08:07 PM
CoZmicShReddeR's Avatar
CoZmicShReddeR CoZmicShReddeR is offline
 
Join Date: Sep 2006
Location: MI, USA
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Amaury25 View Post
Can we have the texts Male or Female instead of the gender symbols?
This doesn't really require rocket science to modify this... Just sayin...
Reply With Quote
Reply

Thread Tools

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 02:28 AM.


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.05441 seconds
  • Memory Usage 2,381KB
  • Queries Executed 28 (?)
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
  • (5)bbcode_code
  • (2)bbcode_php
  • (5)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
  • (9)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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