![]() |
Adding Settings to the AdminCP
Hello,
I am working for an update to a product of mine, and I cannot figure out for the life of me how to add a setting to the AdminCP that is in the form of a dropdown menu. If anyone could please explain to me how this works, it'd be much appreciated. For example, here is how to do it for a boolean setting: PHP Code:
|
1 Attachment(s)
The easiest way is just to find a dropdown in the regular vBulletin options, click on "Edit" link next to it and copy the code :)
For example, the "Enable Forum Leaders" dropdown option in vB->Options has an option code of: Code:
<select name=\"setting[$setting[varname]]\" tabindex=\"1\" class=\"bginput\"> Thanks, Alan. |
Thanks! I got that part to work, but now I have another problem.
I have added this setting to my product: PHP Code:
PHP Code:
|
That code should work fine. Are you using it within a function or class? If so, you might need to global $vbulletin.
Thanks, Alan. |
Yes, it is within a function. That would explain why a similar conditional I used works elsewhere in the code. How do you global $vbulletin?
|
At the top of the function, put:
PHP Code:
Thanks, Alan. |
A million thanks to you! It worked, and you are now my hero.
Thanks, A fellow Alan. :) |
Hi!
I am trying to enable debug mode to be able to add settings via a vBulletin system. I added $debug=1; on top of the config.php file but I don't see any option to add settings. Please help! |
Enabling debug mode changed from $debug=1. Use the following in your config.php file:
PHP Code:
|
All times are GMT. The time now is 08:34 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|