vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   male / female hack (https://vborg.vbsupport.ru/showthread.php?t=59586)

Janitor 01-03-2004 05:37 PM

male / female hack
 
should simple

just to show a small icon for Male or Female, below users avatar...

Dan 01-03-2004 05:43 PM

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.

M1th 01-03-2004 05:55 PM

Quote:

Originally Posted by Janitor
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 :)

Dan 01-03-2004 06:21 PM

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..
  1. 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.
  2. 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.
  3. 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):
PHP Code:

<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

Quote:

Originally Posted by mahiraminc
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/mo...ead.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?


All times are GMT. The time now is 04:44 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.01916 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete