vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Gender In postbit (https://vborg.vbsupport.ru/showthread.php?t=88773)

rjerina 09-26-2004 06:54 AM

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 :)

CSMatt 09-27-2004 04:13 AM

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?

CSMatt 09-27-2004 11:57 PM

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.

imported_Loki12 09-30-2004 09:08 PM

Doesn't work for me. This is very similar to the country flag mod... that one works for me, this one not. :confused: Nothing shows up.

imported_Loki12 09-30-2004 09:24 PM

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. :)

imported_zendiver 10-12-2004 05:33 PM

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

croft 11-27-2004 10:26 AM

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.

CSMatt 11-27-2004 02:03 PM

Try using the revisions I made to the mod.

mahiraminc 11-30-2004 07:39 AM

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.

kadafi_alive 12-31-2004 12:39 PM

Hi,

It doesn't seem to be working. It says Male Male instead of showing the image

CSMatt 02-04-2005 05:57 PM

Quote:

Originally Posted by mahiraminc
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.

Are you sure you don't mean the Members List?

Quote:

Originally Posted by kadafi_alive
It doesn't seem to be working. It says Male Male instead of showing the image

Is your image in the /images/misc folder? Are the images correctly named gender_Male.gif and gender_Female.gif?

Also, in my revision, you'll need to set the Set Default option to None, not Yes, Including a First Blank Option. Otherwise, new members will automatically be classified as Male instead of having no specified gender.

Wordplay 02-11-2005 07:26 AM

zender, i tried what you said but with no luck. then again my postbit doesn't have the exact same part as the postbit_legacy. my postbit_legacy which is what i'm using, uses < div > while my postbit just uses < tr > < td > and < table > so i wasn't that certain whether to put it behind just the </ td > or the </ table >, did anybody else happen to figure out how to get those pix to show? and get rid of that Male Male / Female Femal?

Wordplay 02-11-2005 07:42 AM

man what the.... aiight. look i got one of the pictures to show up, remember it says "male male" or "female female".

and here are my 2 cents, if you're running a forum in some other language, for example german, you're going to have to name the file gender_Maennlich.gif instead of gender_Male.gif. because of the phrase translation.

now get jiggy with it.

only problem is, as long as it shows "Male < img >" the image is kind of useless.

////////

****, how did you guys not get this? this is the code you need:

HTML Code:

<if condition="$post[fieldX] != Undisclosed"><div><img src="$stylevar[imgdir_misc]/gender_$post[fieldX].gif" alt="$post[fieldX]" /> </div></if>
that removes the MALE MALE and makes it only one male... and furthermore, read my reply above to see how to get the images to show.

now get jiggy with it!

wb-legends 02-13-2005 06:34 PM

installed the hack, tis beautiful, thanks!

just one thing...the pictures wont work because the gender thing is set to Male and Female, but you say to upload the images as gender_male...it should be capitalized to get it to show up ;)

imported_blizmop 02-20-2005 01:34 AM

I installed it but only after reading the tips from people who understood the instructions. its great and if you want to see it in action check out: Pit Lane

hollyboy 03-03-2005 03:53 PM

works with vb3.07?

CSMatt 03-03-2005 07:37 PM

Yes, this should work with vBulletin 3.0.7, as well as all other revisions of vBulletin 3.

hollyboy 03-05-2005 07:13 AM

installed cool ;)

I have only 1 question: I'd like to not show anything on my postbit if the members select no sex, how do I set this?

CSMatt 03-05-2005 05:03 PM

Remove "Undisclosed" and change the Set Default option to None.

yinyang 04-18-2005 06:52 PM

i've set up my members listing page to show this custom profile. right now, it shows Gender > male for example. How do I KISS and make it so it shows the picture and not the text? This would be helpful also for the membersinfo page as well.

for those of you who don't know, KISS = Keep It Simple Stupid

hitokiri battou 05-04-2005 07:31 PM

Ok this is probably a really dumb question but what is a field id and where do I find it? :confused:

EDIT: Nevermind, im an idiot, found it.


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01254 seconds
  • Memory Usage 1,768KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete