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)

Zachery 03-26-2004 10:00 PM

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

tnguy3n 03-27-2004 04:10 AM

oops, i didn't know this hack already been released here. seems much easier than my Image Gender thing. ^_^

Zachery 03-27-2004 07:24 AM

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 03-27-2004 09:01 AM

Just a couple of things..


First, a typo.!
HTML Code:

<img src="$stylevar[imgdir_misc]/gender_$post[filedX].gif"
Should be:
HTML Code:

<img src="$stylevar[imgdir_misc]/gender_$post[fieldX].gif"
Second, Disclosed should be Undisclosed.. =)
Disclose; To expose to view, as by removing a cover; uncover

Zachery 03-27-2004 09:14 AM

I had to retype it as IE crashed :) and ill change it :P

lasto 03-27-2004 01:49 PM

very good zachery and easy to do

can be changed for a number of things cheers

i cliked install :)

imported_TheComputerGuy 03-27-2004 10:44 PM

Awesome!

imported_d3nnis 03-29-2004 10:11 AM

nice! but what if its just a blank text field... how do i show those that is non blank text field?

contramontanum 04-20-2004 02:00 PM

Can this be done without the images, i.e. text only?

Zachery 04-20-2004 02:49 PM

Sure just remove the imag tag :)

contramontanum 04-20-2004 04:26 PM

Thanks! :)

lazserus 04-21-2004 10:08 PM

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 04-25-2004 12:18 AM

bump

Zachery 04-25-2004 01:22 AM

just change the image path....

Brad 04-25-2004 03:49 AM

Zak can you put this in a text file?, thanks.

lazserus 05-04-2004 04:24 PM

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>
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 05-18-2004 09:42 AM

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 05-21-2004 08:50 AM

Installed ;)

[H]Dazz 05-29-2004 01:00 PM

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 05-31-2004 02:34 AM

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>

imported_badpacket 05-31-2004 05:03 PM

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. Here is what I have (the all text version) :

HTML Code:

<if condition="$post[field6] != Undisclosed"><div>Bike: $post[field6]</div></if>

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 05-31-2004 08:52 PM

Quote:

Originally Posted by badpacket
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 05-31-2004 09:27 PM

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 06-01-2004 07:52 PM

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 06-01-2004 09:24 PM

Quote:

Originally Posted by badpacket
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
HTML Code:

UPDATE `userfield` SET `fieldX` = 'Undisclosed';
adjust that fieldX with your gender field.

Silverstangs 06-26-2004 02:22 AM

Works Great, I wish I thought of it!!!!

gmarik 06-26-2004 11:01 AM

smaal but good

Jacko 07-07-2004 06:13 PM

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-07-2004 09:01 PM

ignore me i sorted it now.

imported_uber 07-30-2004 02:11 PM

I seem to remember releasing this exact same mod for Gamma & RC. Zach's response to it was

Quote:

Originally Posted by Zachery
and i could think of a few ways to improve it also

Quote:

Originally Posted by Zachery
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 08-05-2004 10:53 AM

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 08-05-2004 11:09 AM

Quote:

Originally Posted by Mith
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 08-27-2004 12:08 PM

Thanks for the hack. It's awsome. :)

imported_khaledtrm 08-28-2004 12:44 AM

Thanks for the hack its great

mholtum 08-28-2004 09:30 AM

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 08-28-2004 10:29 AM

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 08-31-2004 04:41 AM

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 09-01-2004 12:44 AM

Quote:

Originally Posted by Romeos Tune
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/...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 :)

Romeos Tune 09-02-2004 01:36 AM

Thanks very much! Those will work great! :)

devilsmania 09-03-2004 07:54 AM

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
  • Page Generation 0.01485 seconds
  • Memory Usage 1,819KB
  • 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
  • (8)bbcode_html_printable
  • (7)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
  • (40)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