View Full Version : Adding a usercp option? (Not bitfield)
Brother Malachi
09-21-2009, 10:20 PM
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.