vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Plugin development: Guide on how to add custom AdminCP Menus? (https://vborg.vbsupport.ru/showthread.php?t=250756)

Disasterpiece 09-18-2010 02:06 PM

Plugin development: Guide on how to add custom AdminCP Menus?
 
Hi

I'm looking for a guide or tutorial on how I can manage to add own adminCP menus with my plugin related stuff.

For example I want to provide a own box for my plugin in the adminCP menu, make a list where I can add elements and such.

I checked the articles section, but didn't find anything about it.
Any help on this?

(I already know how to develop plugins for vb, but this was limited to some generic preferences within the plugin file rather than real own plugin setting pages)

-d

Carnage 09-18-2010 02:37 PM

You need to create a cpnav xml file for your product. This is done by creating a file in includes/xml called cpnav_yourproductid.xml The contents of the file define the admincp menus heres an example from one of my products:

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<navgroups product="imhotek_pbpgaming" master="true">

        <navgroup phrase="imhotek_pbpgaming_menu" displayorder="25">

                <navoption displayorder="1">
                        <phrase>imhotek_pbpgaming_main</phrase>
                        <link>pbpgadmin.php</link>
                </navoption>

        </navgroup>
       
</navgroups>


Disasterpiece 09-18-2010 04:20 PM

Oh cool, this will help me with the menu.

Is there any way to get easy access to the default vb AdminCP styled lists or tables and such?

Carnage 09-18-2010 05:13 PM

Take a look at adminfunctions.php in the includes directory; most of the functions used for rendering things are in there


All times are GMT. The time now is 03:53 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.00968 seconds
  • Memory Usage 1,711KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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