vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adding a usercp option? (Not bitfield) (https://vborg.vbsupport.ru/showthread.php?t=223706)

Brother Malachi 09-21-2009 10:20 PM

Adding a usercp option? (Not bitfield)
 
I need to add several options under UserCP's "editoptions" page.

These will be simple checkboxes that enable/disable features of our site.
I looked at bitfields...but from what I understand, those are only for permissions?

I know how to add them to the template, i just don't know how to handle the database portion...so that those checkboxes get added to $bbuserinfo[].

Lynne 09-21-2009 10:23 PM

Use User Profile Fields. You can read about those in the manual.

Brother Malachi 09-21-2009 10:27 PM

I guess that will work. Thanks.

Lynne 09-21-2009 10:30 PM

I am pretty sure that when the user information is grabbed, the usertextfields are grabbed also. I have used these in several places on my site successfully.

Brother Malachi 09-21-2009 10:57 PM

Not on all pages.
showgroups page doesn't grab anything other than the location field.

Lynne 09-22-2009 01:41 AM

There is a distinction here that needs to be made. Are you trying to get the user profile field of someone who is viewing the page or a page that is about someone (like a profile page or a post is about someone else)? If it is about the viewer, that information is available on every page.

Brother Malachi 09-22-2009 02:35 AM

The one that is viewing the page.
One of the things I'm trying to do with this, is to allow each user to enable/disable a certain feature from their user CP and then based on their preference, show/hide that feature throughout the board.

Basically, add a "Do you this feature enabled?" Yes/No
Then be able to access that from $bbuserinfo['feature1']

Lynne 09-22-2009 02:50 PM

If it's the user viewing the forum, then you should be able to do it with a User Profile Field and then use $bbuserinfo['fieldx'] in your templates.


All times are GMT. The time now is 02:47 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.00940 seconds
  • Memory Usage 1,714KB
  • 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