PDA

View Full Version : Gender In postbit


Zachery
27 Mar 2004, 01:35
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


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



add under



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



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

tnguy3n
27 Mar 2004, 06:10
oops, i didn't know this hack already been released here. seems much easier than my Image Gender thing. ^_^

Zachery
27 Mar 2004, 09:24
if it was your hack, i released it here after, seeing as this isnt much more than a template mod to begin with :)

Oblivion Knight
27 Mar 2004, 11:01
Just a couple of things..


First, a typo.!


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Should be:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Second, Disclosed should be Undisclosed.. =)
Disclose; To expose to view, as by removing a cover; uncover

Zachery
27 Mar 2004, 11:14
I had to retype it as IE crashed :) and ill change it :P

lasto
27 Mar 2004, 15:49
very good zachery and easy to do

can be changed for a number of things cheers

i cliked install :)

imported_TheComputerGuy
28 Mar 2004, 00:44
Awesome!

imported_d3nnis
29 Mar 2004, 12:11
nice! but what if its just a blank text field... how do i show those that is non blank text field?

contramontanum
20 Apr 2004, 16:00
Can this be done without the images, i.e. text only?

Zachery
20 Apr 2004, 16:49
Sure just remove the imag tag :)

contramontanum
20 Apr 2004, 18:26
Thanks! :)

lazserus
22 Apr 2004, 00:08
This is exactly what I'm looking for, but for some reason my images aren't showing up. I think i know what the problem is. I'm using the images_old directory for my images and I think $stylevar[imgdir_misc] calls upon vB's default image dir. I'm not much of a coder, so I'm not entirely sure how to make [imgdir_misc] point to the old one. I assumed the $stylevar would tell it to follow which ever directory the particular style is using, but it doesn't seem to reflect that. Ideas? I have the gender_male.gif and gender_female.gif in both the default vB images directory AND the images_old dir.

lazserus
25 Apr 2004, 02:18
bump

Zachery
25 Apr 2004, 03:22
just change the image path....

Brad
25 Apr 2004, 05:49
Zak can you put this in a text file?, thanks.

lazserus
04 May 2004, 18:24
Didn't work. Now, maybe I can't combine a normal HTML path with vB code (which is just PHP, no?). This is what I have setup:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


The src is correct, but it still won't work. I guess I could set it up w/o the image, but I figured the image would be kind of neat. I'm not really sure what the problem is at this point. I've got the images in every single images directory and vB still produces X's. I've used the default code and also the code above and the results never change.

moonclamp
18 May 2004, 11:42
works fine for me

Except if a member is deleted the picture turns into a red x ... can the information be retained if a member leaves or can the info be removed completely from the postbit?

I guess I could always add 1pixel image but that is more of a workaround than a solution

(Oh and first post so hello there)

imported_Wayne2k1.com
21 May 2004, 10:50
Installed ;)

[H]Dazz
29 May 2004, 15:00
I can't seem to get this to work... I think it has something to do with having RPG stats hack installed as well... :(

imported_BeasTboyz
31 May 2004, 04:34
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. Here is what I have (the all text version) :



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

imported_badpacket
31 May 2004, 19:03
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. Here is what I have (the all text version) :



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



In your User Profile Manager set the default to "yes but no first blank option"

*admincp > user profile field > profile manager > gender > edit

and hello all :)

hope that works for you Beastboyz..

imported_BeasTboyz
31 May 2004, 22:52
In your User Profile Manager set the default to "yes but no first blank option"

*admincp > user profile field > profile manager > gender > edit

and hello all :)

hope that works for you Beastboyz..

Well, that is only an option for the drop down boxes with multiple choices. Since mine will be "real name" and "Bike" options, I can't use a drop down box. Any ideas on how to do this with a single line text box?

Thanks everyone :)

Matt

imported_badpacket
31 May 2004, 23:27
Maybe make it a required field? if they dont have a bike enter N/A I guess.. *shrug* Maybe somoene will come back with some code that will default to "whatever" if left blank. :D

BeatificFaith
01 Jun 2004, 21:52
Hi, I'm trying to use this in the latest version of vbulletin but instead of the graphic showing up it says gender: female female. Can someone please help?

tnguy3n
01 Jun 2004, 23:24
Maybe make it a required field? if they dont have a bike enter N/A I guess.. *shrug* Maybe somoene will come back with some code that will default to "whatever" if left blank. :D

run this query in phpMyAdmin or AdminCP


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



adjust that fieldX with your gender field.

Silverstangs
26 Jun 2004, 04:22
Works Great, I wish I thought of it!!!!

gmarik
26 Jun 2004, 13:01
smaal but good

Jacko
07 Jul 2004, 20:13
i try to add the $gender to my postbit and i want it next to my username but it puts it on a new line under the username??

anyway of getting to align with the username???? i have checked for <br> in code but there isnt any.

ame when i put the stars hack on my post bit too. i am still using original postbit cose.

http://www.carstyledirect.com/forum/ - to see example


thanks

Jacko
07 Jul 2004, 23:01
ignore me i sorted it now.

imported_uber
30 Jul 2004, 16:11
I seem to remember releasing this exact same mod for Gamma & RC. Zach's response to it was

and i could think of a few ways to improve it also

well for one id use an if condtioin to only alow this filed to be editable on registar. or if they dont choose one. this way we cant have our trolls confucsing us and such

Your mod doesn't seem to do this at all, just a re-hash of previous ideas.

Mith
05 Aug 2004, 12:53
Hi,

I have followed all the instructions and the only place that the gender shows is in the member properties page AND it doesn't show the image (some little images i found elsewhere and uploaded to the correct directory/ correct names)

Any help appreciated,

Mith

Mith
05 Aug 2004, 13:09
Hi,

I have followed all the instructions and the only place that the gender shows is in the member properties page AND it doesn't show the image (some little images i found elsewhere and uploaded to the correct directory/ correct names)

Any help appreciated,

Mith

All is ok... being a noob I didn't realise yoy had to change postbit AND postbit_legacy (instructions not clear)

Cheers

Drache
27 Aug 2004, 14:08
Thanks for the hack. It's awsome. :)

imported_khaledtrm
28 Aug 2004, 02:44
Thanks for the hack its great

mholtum
28 Aug 2004, 11:30
Clicked install. But I have an issue. I uploaded my images to /forum/images/misc/ and now I have Gender: 2 2

Ok I am officially lost. I made all the correct changes to both postbit templates and I get the results as I stated. If I change the name of the gender_male.gif to gender_2.gif my male image appears but next to it is the Gender: 2 (then image here).

This isnt that tough.. What did I do wrong?? :eek:

mholtum
28 Aug 2004, 12:29
Ok, Now I have a new problem. I redid the profile field and it shows male male. What I am doing wrong?? Ok I figured that out. I named them gender_male.gif and it should have been gender_Male.gif. Fixed that. I am now getting a "Red X" if a member doesnt or hasnt filled out the field in thier profile. Is there a way to fix this? Never mind. I created a gender_.gif and uploaded it. Now if they havent chosen an option, it says Gender: and a blank.

Romeos Tune
31 Aug 2004, 06:41
I've been searching for some gender graphics, astrology symbols for male / female. Hoping to find a pink one for female and blue for male... I saw this somewhere on someone's site but can't find it now....grrrrrrrrr Anyone know where I can find some? Thanks! :)

turbidblue
01 Sep 2004, 02:44
I've been searching for some gender graphics, astrology symbols for male / female. Hoping to find a pink one for female and blue for male... I saw this somewhere on someone's site but can't find it now....grrrrrrrrr Anyone know where I can find some? Thanks! :)


i use these:

http://www.turbidblue.com/forum/air/misc/gender_Male.gif

and

http://www.turbidblue.com/forum/air/misc/gender_Female.gif

and this one for those who havent chosen a gender

http://www.turbidblue.com/forum/air/misc/gender_.gif


hope those are cool :)

Romeos Tune
02 Sep 2004, 03:36
Thanks very much! Those will work great! :)

devilsmania
03 Sep 2004, 09:54
Nice Simple Hack, Installed :D

btw i created my own Male-Female-Undisclosed images, i share here my lil work
(3 Transparent Gifs + 1 Psd)

in the codes and in the filenames remember to use Caps Letter ( the first of each sex Male / Female, if you use female it wont work

rjerina
26 Sep 2004, 08:54
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
27 Sep 2004, 06:13
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
28 Sep 2004, 01:57
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):


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


HTML tag the code is placed after:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I hope these revisions help everybody else as much as they have helped me.

imported_Loki12
30 Sep 2004, 23:08
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
30 Sep 2004, 23:24
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):


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


HTML tag the code is placed after:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



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
12 Oct 2004, 19:33
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

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
27 Nov 2004, 12:26
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
27 Nov 2004, 16:03
Try using the revisions I made to the mod.

mahiraminc
30 Nov 2004, 09:39
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
31 Dec 2004, 14:39
Hi,

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

CSMatt
04 Feb 2005, 19:57
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?


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
11 Feb 2005, 09:26
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
11 Feb 2005, 09:42
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:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

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
13 Feb 2005, 20:34
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
20 Feb 2005, 03:34
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 (http://pitlane.motortestmagazine.com)

hollyboy
03 Mar 2005, 17:53
works with vb3.07?

CSMatt
03 Mar 2005, 21:37
Yes, this should work with vBulletin 3.0.7, as well as all other revisions of vBulletin 3.

hollyboy
05 Mar 2005, 09:13
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
05 Mar 2005, 19:03
Remove "Undisclosed" and change the Set Default option to None.

yinyang
18 Apr 2005, 20:52
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
04 May 2005, 21:31
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.