![]() |
Admin CP
I am looking to learn how to code pages and options for the admin control panel.
So far, I have: Hack Enabled - Yes | No Which Layout - Layout 1 | Layout 2 Submit. I can't seem to work out how to submit it (as there is no location to submit to) and how to actually get the hack to enable if enable is selected etc. I have read the article here But now I am still really stuck. Can anyone offer any guidance? |
Are you just talking about adding settings for your product? If so, you just go into debug mode and add them.
|
I'm in Debug mode.
Added the product Uploaded cpnav_xxxx.xml Uploaded profiles_admin.php into admincp/ Just stuck on how to get the features working. For instance - Hack enabled (yes) turns it on Hack enabled (no) turns it off Profile Layout 1 - Uses layout 1 Profile Layout 2 - Uses layout 2 Profile Layout Unchanged - Uses vBulletin Layout |
Well, now you need to use those variables to do what you want. They are settings like any other setting in vbulletin. So, you have $vbulletin->options['youroptions'] in your php and $vboptions['youroptions'] in your templates.
|
All my php file has is:
PHP Code:
|
You also don't seem to be doing anything with the inputs from your form. You have a form with a submit button that does nothing.
|
This is what I am asking.
How do I get it to do things? Is there anymore articles out there that help with this kind of thing? Same with plugins / hooks etc. |
Best way to learn is to find a modification that does something similar (in this case, does something in the admin cp) and then see what they did.
|
Coding in the Admin CP is very different to "normal" coding in vBulletin. It is very much like "beginner PHP", where you echo one thing, process the next, then echo it again.
|
Quote:
|
Why not use the default "vBulletin Options" functionality?
|
Quote:
At the mo, I've always got someone else to do it for me but I need the above for a new mod that I'm working on |
My advice would be to look at the Admin CP, find a page you would like to replicate. Then look at that PHP file to see how it's done.
|
All times are GMT. The time now is 05:03 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:
|