vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Select on/off in user CP? (https://vborg.vbsupport.ru/showthread.php?t=48160)

Ember 01-26-2003 02:09 PM

Select on/off in user CP?
 
Hey, for the other admins to let me implement my pet hack on Area 51, they want users to be able to turn viewing the hack in the postbit on or off, like the signature.

My question is, how do I do this?

I figured I have to create a new field in the "user" table, and then have a field in the modify options template...

I need to have an "if" arguement in functions.php, but what will it look like?

Anyone help?

JulianD 01-26-2003 02:25 PM

Simply add a new field to the user table, and then you have to modify the modifyoptions template and the file member.php to modify the query that updates the user profile.... It's very simple, just go to UserCP > Options and you will have a bunch of yesno options..... Take one of those for example, and you should be able to code something similar for your hack.

Ember 01-26-2003 02:28 PM

Yah, I know what I have to do, I just cant do it.

I cant find what I have to add in member.php - as all of those go on if stuff is enabled in the admin CP... its confusing.

Xenon 01-27-2003 01:49 PM

you can also make a new profilefield say they have to enter no if they don't want to see it, and in functions just use if($post[fieldX]!="no") { bla..

Ember 01-27-2003 01:55 PM

I still dont get how to show it or not show it using that code :(

Would it just be

PHP Code:

if($post[fieldX]!="no") {
all pet hack stuff here
}
else 
{


??? :confused:

Xenon 01-27-2003 06:44 PM

exactly like that..

Ember 01-28-2003 06:03 AM

Thanks Xenon :) I will try that out!


All times are GMT. The time now is 02:36 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.01147 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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