![]() |
Gender In postbit
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> 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> 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 :) |
oops, i didn't know this hack already been released here. seems much easier than my Image Gender thing. ^_^
|
if it was your hack, i released it here after, seeing as this isnt much more than a template mod to begin with :)
|
Just a couple of things..
First, a typo.! HTML Code:
<img src="$stylevar[imgdir_misc]/gender_$post[filedX].gif" HTML Code:
<img src="$stylevar[imgdir_misc]/gender_$post[fieldX].gif" Disclose; To expose to view, as by removing a cover; uncover |
I had to retype it as IE crashed :) and ill change it :P
|
very good zachery and easy to do
can be changed for a number of things cheers i cliked install :) |
Awesome!
|
nice! but what if its just a blank text field... how do i show those that is non blank text field?
|
Can this be done without the images, i.e. text only?
|
Sure just remove the imag tag :)
|
Thanks! :)
|
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.
|
bump
|
just change the image path....
|
Zak can you put this in a text file?, thanks.
|
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:
HTML Code:
<if condition="$post[field8] != Undisclosed"><div>Gender: $post[field8] <img src="http://www.armageddononline.org/forums/images_old/misc/gender_$post[field8].gif" alt="$post[field8]"/></div></if> |
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) |
Installed ;)
|
I can't seem to get this to work... I think it has something to do with having RPG stats hack installed as well... :(
|
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) :
HTML Code:
<if condition="$post[field6] != Undisclosed"><div>Bike: $post[field6]</div></if> |
Quote:
*admincp > user profile field > profile manager > gender > edit and hello all :) hope that works for you Beastboyz.. |
Quote:
Thanks everyone :) Matt |
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
|
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?
|
Quote:
HTML Code:
UPDATE `userfield` SET `fieldX` = 'Undisclosed'; |
Works Great, I wish I thought of it!!!!
|
smaal but good
|
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 |
ignore me i sorted it now.
|
I seem to remember releasing this exact same mod for Gamma & RC. Zach's response to it was
Quote:
Quote:
|
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 |
Quote:
Cheers |
Thanks for the hack. It's awsome. :)
|
Thanks for the hack its great
|
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: |
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.
|
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! :)
|
Quote:
i use these: http://www.turbidblue.com/forum/air/...ender_Male.gif and http://www.turbidblue.com/forum/air/...der_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 :) |
Thanks very much! Those will work great! :)
|
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 |
All times are GMT. The time now is 02:10 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|