vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [Release] Users Gender (https://vborg.vbsupport.ru/showthread.php?t=47196)

Ember 01-01-2003 12:33 AM

[Release] Users Gender
 
This has probably been done before, if so, I apologize, but I have only seen the Gender Hack, nothing that only involved a quick template edit... I thought everyone knew how to do this, but have since found people who dont, so here goes....

Go into your admin CP, scroll down to "User Profile Fields", click "add".

Title: Gender
Description: Let people on the forums know your gender.
Maximum input: 6
Field Length: 6
Field required: yes (or no, depending if you want them to do it or not)
Field hidden on profile: yes
Field editable by user: yes

Click "Save"

Now, Modify user profile fields, along the gender row, hover over the edit or the remove link, and in your status bar, take a note of the number that is at the end, after profilefieldid - mine was 6 - yours may or may not be.

Now go down to templated -> modify

and expand the list of templates you want to add the gender field too, expand Postbit Templates... and click on [edit] next to postbit.

Now simply add: Gender: $post[field6]<br> (replacing 6 with your field ID number) wherever you want to show the gender.. using the default postbit template I did it like this:

Decided to remove this cos it was unessesery and large - if you want an example, e-mail dan@twisted-designs.net


This may or may not come in handy to people, you can use it to add any profile field onto the postbit... my apologies again if this has been covered before :) PS. Its 2:40am, so if I made some mistakes let me know!

Dean C 01-01-2003 11:42 AM

Nice simple template mod buddy :p

- miSt

Ember 01-01-2003 11:55 AM

Well its very simple, but I kept finding people who didnt have a clue what I was talking about when I said add a profile field to the postbit, so I thought I may as well write it up :P

Dean C 01-01-2003 12:57 PM

Yea it's quite useful i s'pose because some people use the hack..

Only problem with this is that people can put silly answers in it like "?" and "alien" "gender-bender" hehe

Know what i mean :P

- miSt

Ember 01-01-2003 01:07 PM

Thats true, if the gender hack didnt ready exist I would create it so you could only select "male" "female" or "undisclosed" from a drop down box.. but never mind!

I wasnt going to post this as a gender modification, but I need some sort of example... its really to show people how to get a profile field into the postbit.

Dean C 01-01-2003 02:36 PM

Yea cool :p

Tony G 01-02-2003 10:54 AM

Not bad, why don't you use the male & female symbols instead?

Ember 01-02-2003 01:03 PM

I'll look into it... I guess I will just do something along the lines of:

In the postbit template use PHP to replace "male" and "female" with the relevent symbols, and then I will try to work out a way to replace anything that is not male or female with n/a or something... I'll look into it :)


All times are GMT. The time now is 12:15 AM.

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.01176 seconds
  • Memory Usage 1,724KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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