View Full Version : male / female hack
Janitor
01-03-2004, 05:37 PM
should simple
just to show a small icon for Male or Female, below users avatar...
yes it is fairly simple to do but I'm at work. If Someone doesn't release it before I get home tonight I'll be sure to put out a hack for it.
should simple
just to show a small icon for Male or Female, below users avatar...
no need a hack to do this. You can easily do it by adding a new profile field and using template conditionals. :) I think floris release a template mod for this on vbulletn.nl or vbulletintemplates.com :)
Well my god i forgot you could do that..... and i didn't notice that now you can have radio buttons and such in user profile fields. I feel like such an idiot now.
Janitor
01-03-2004, 06:51 PM
lol we will try it and see
Gary King
01-03-2004, 07:01 PM
Yep should work without any file modifications :)
Pikok
02-16-2004, 09:15 AM
This should work..
New Custom Field
Create a custom field in the AdminCP and take note of the field number. You can set it as radio buttons or a drop-down menu.. It's your preference. Either way, make the options: "Male" and "Female". Set to your preference if you want the field required (recommended), etc.
Upload Files
You need to have the images you want to be displayed for each choice (i.e. male, female, unknown). Upload them to your miscellaneous images folder (i.e. "/images/misc"). Be sure that the filenames are "Male.ext", "Female.ext", and "Unknown.ext". If the filenames are different, either rename to what I listed or change the code to suit.
Template Modification(s)
Open up whatever template you want the icon displayed in and add the following code where you want it to appear (be sure to set the appropriate field number and filenames/extensions):<if condition="$post[field7]">
<img src="$stylevar[imgdir_misc]/$post[field7].gif" alt="$post[field7]" border="0" />
<else />
<img src="$stylevar[imgdir_misc]/Unknown.gif" alt="Unknown" border="0" />
</if>If you would rather have no image display for those who haven't specified male or female, or have it set to required.. You can simply remove the ELSE section of that code (2 lines). That way if the field is set, it will display, otherwise, nothing will be shown (and you don't need an unknown image either). ;)
Note: You'll need to change the variable "$post" as required to have it display in places other than the postbit.. But, I pust that as you said you wanted it by the avatar.
mahiraminc
11-26-2004, 03:44 PM
What would we change the "post" to if we wish to display these on the Who's Online page?
I would like to add a column after Username called Gender and display the male/female images in there.
Can you guide me on that as well.
mahiraminc
11-28-2004, 06:55 PM
What would we change the "post" to if we wish to display these on the Who's Online page?
I would like to add a column after Username called Gender and display the male/female images in there.
Can you guide me on that as well.
Okay, I figured how to add an column... its simply editing the WHOSONLINE template but my question still stands...
How do I add the Male/Female icons to the Who's Online page? I think the variable post needs to be changed. I have tried everything to my knowledge and couldnt' get it working.
Please help? :surprised:
Jason McConnell
11-29-2004, 09:41 AM
What would be kewl is if you could include those images in the postbit along with age and birthday... but i think that that might be a pretty simple template edit too.
Jason McConnell
11-29-2004, 11:15 AM
Speaking of which, check out Zachery's post on vbulletintemplates.com -- http://www.vbulletintemplates.com/mods/showthread.php?t=5957
mahiraminc
11-30-2004, 08:01 AM
Already did, that thread doesn't answer my question either.
Anybody know how to show the gender pics on the Who's Online page?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.