Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Gender In postbit Details »»
Gender In postbit
Version: 1.00, by Zachery Zachery is offline
Developer Last Online: May 2017 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-26-2004 Last Update: Never Installs: 5
 
No support by the author.

AdminCP > Profile Fields > Add new PRofile field > Single Select Menu >

Tile > Gender
Description > This is your gender, your either male or female 99% of the time.
Options:
Undisclosed
Male
Female
Default Option: Yes, but not blank

make note of the field id

Template edit:
in postbit(_legacy)
find
HTML Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
add under

HTML Code:
<if condition="$post[fieldX] != Undisclosed"><div>Gender: $post[fieldX] <img src="$stylevar[imgdir_misc]/gender_$post[fieldX].gif" alt="$post[fieldX]" /> </div></if>
Change X to the field id
And yer done
For the images to work you would need to upload a

images/misc/gender_male.gif and gender_female.gif

If you dont have or want images remove the img tag

Show Your Support

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

Comments
  #42  
Old 09-26-2004, 06:54 AM
rjerina rjerina is offline
 
Join Date: Jan 2004
Location: Cleveland, OH
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

one thing, if you people are using a unix system (where case matters), if the gender fields are "Male" and "Female", for this hack, you will need the image filenames to be "gender_Male.gif" and "gender_Female.gif" because it uses those fields to determine the filename. Hope this helps some of you with images not showing up
Reply With Quote
  #43  
Old 09-27-2004, 04:13 AM
CSMatt CSMatt is offline
 
Join Date: Aug 2004
Location: Forest, Virginia
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BeasTboyz
Any Idea why even if the user has chosen to not answer the question (i.e. left the field blank) the "Gender:" info still shows up under their name, there is just nothing next to it.
This happened to me as well. Isn't the Gender field not supposed to appear at all in the postbit if "Undisclosed" is selected?
Reply With Quote
  #44  
Old 09-27-2004, 11:57 PM
CSMatt CSMatt is offline
 
Join Date: Aug 2004
Location: Forest, Virginia
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Never mind. I fixed this problem myself. I find it's easier to have the default option blank instead of using "Undisclosed," revising the HTML code accordingly, and placing the Gender option between the Location and Age field rather than by itself underneath the IM icons.

Revised code (X = field ID):
HTML Code:
<if condition="$post['fieldX']"><div>Gender: $post[fieldX] <img src="$stylevar[imgdir_misc]/gender_$post[fieldX].gif" alt="$post[fieldX]" /></div></if>
HTML tag the code is placed after:
HTML Code:
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
I hope these revisions help everybody else as much as they have helped me.
Reply With Quote
  #45  
Old 09-30-2004, 09:08 PM
imported_Loki12 imported_Loki12 is offline
 
Join Date: Aug 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't work for me. This is very similar to the country flag mod... that one works for me, this one not. Nothing shows up.
Reply With Quote
  #46  
Old 09-30-2004, 09:24 PM
imported_Loki12 imported_Loki12 is offline
 
Join Date: Aug 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CSMatt
Never mind. I fixed this problem myself. I find it's easier to have the default option blank instead of using "Undisclosed," revising the HTML code accordingly, and placing the Gender option between the Location and Age field rather than by itself underneath the IM icons.

Revised code (X = field ID):
HTML Code:
<if condition="$post['fieldX']"><div>Gender: $post[fieldX] <img src="$stylevar[imgdir_misc]/gender_$post[fieldX].gif" alt="$post[fieldX]" /></div></if>
HTML tag the code is placed after:
HTML Code:
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
I hope these revisions help everybody else as much as they have helped me.
Ah, I used your coding, and now it works like a charm. Thanks.
Reply With Quote
  #47  
Old 10-12-2004, 05:33 PM
imported_zendiver imported_zendiver is offline
 
Join Date: Sep 2004
Location: Houston, TX
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The biggest complaint that I have seen to date on this is that they have done everything the way it says to do, but it doesn't show up.

There is a minor issue that seems to be forgotten OR misread in the original (1st) post of this thread. It is
Quote:
Template edit:
in postbit(_legacy)
find
People are misinterupting the postbit(_legacy). This is meant to be BOTH templates:
postbit & postbit_legacy.

The reason for this is because of the definition below:

postbit_legacy: old-style postbit, using two vertical columns

postbit: the new horizontal layout

More than likely they have edited one of the templates and are in the other type view mode. With that said, it is just easier to edited both templates.

I hope this clears up some issues.

Cheers
Reply With Quote
  #48  
Old 11-27-2004, 10:26 AM
croft croft is offline
 
Join Date: Aug 2002
Location: Sweden
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do i add it so that the members that has not selected this wotn show up in the postbit ?

An if statement i think. I yust want to show it if the users have chosen it in the profile.
Reply With Quote
  #49  
Old 11-27-2004, 02:03 PM
CSMatt CSMatt is offline
 
Join Date: Aug 2004
Location: Forest, Virginia
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try using the revisions I made to the mod.
Reply With Quote
  #50  
Old 11-30-2004, 07:39 AM
mahiraminc mahiraminc is offline
 
Join Date: Nov 2004
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay folks this works great. I need to know what the variable $post should be changed to in order to display this on the Who's Online page? Please help.
Reply With Quote
  #51  
Old 12-31-2004, 12:39 PM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

It doesn't seem to be working. It says Male Male instead of showing the image
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 10:17 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.04520 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_html
  • (3)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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