The AdminCP Navigation is now controlled through XML files.
To add custom entries, you must create a new file cpnav_yourhack.xml and place it in directory includes/xml.
This XML-File constist of 6 important tags:
<navgroups>
This indicates that this is a XML File containing navgroups.
It has one parameter product that should be set to your product identifier or vbulletin if it does not belong to any product.
<navgroup>
This is the container for one Settings-Group, like Styles & Templates, vBulletin Options, etc.
It has three parameters: phrase/text, permissions and hr.
If you are using phrases, phrase must contain the variable name, if you are using hardcoded text then text must contain the label.
Parameter permissions (optional) can be used to check an administrator permission, like canadminoptions.
Parameter hr (optional) can be used to put a spacer below this navgroup.
<navoption>
This is one Menu-Entry.
<phrase> or <text>
This must contain the varname or hardcoded text for the menuetry.
<link>
Tag link must contain the URL.
You can use {$vbulletin->config[Misc][modcpdir]} to point to the ModCP directory here, no matter how it is actually called
Update for Beta 3
With Beta 3 a new parameter displayorder has been introduced. This parameter is valid for Tags navgroup and navoption.
This way it is possible to control in which order the Navgroups and Links will be displayed, and you can also add custom Links to existing Navgroups.
To do so, your navgroup must have them same displayorder and Phrase Varname as the existing group:
HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?><navgroups product="vbulletin"><navgroup phrase="forums_and_moderators" displayorder="60"><navoption displayorder="1"><text>Top-Link Forums & Moderators</text><link>demohack.php?do=foo</link></navoption></navgroup></navgroups>
Then Top-Link Forums & Moderators will be the first link in Navgroup Forums & Moderators (Displayorder: 60).
To find out the Displayorder for existing groups, take a look at cpnav_vbulletin.xml.
This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent.
So, in doing this, does this take care of the issues with no hooks being included in the AdminCPnavigation menu? I know that it does not take care of not having hooks in the individual modules, just refering to the main selection menu.
So, in doing this, does this take care of the issues with no hooks being included in the AdminCPnavigation menu? I know that it does not take care of not having hooks in the individual modules, just refering to the main selection menu.
Site administrators upload the XML file prepared by the hack author and presto, new items appear in the AdminCP.
The bummer here is that hack authors can't specify which existing group to add a menu item under (for instance, adding a new PM-related funtion or feature under the existing PM AdminCP tree) nor can hack authors specify a group that their hack should appear above or below. A hack author might want to add "Clans" right below Usergroups or Promotions.
I'm guessing that new menus created with this XML technique appear way at the bottom?
Of course to add all the functionality I am talking about, the admincp XML file would need to be cached in a "merged" state.
Site administrators upload the XML file prepared by the hack author and presto, new items appear in the AdminCP.
The bummer here is that hack authors can't specify which existing group to add a menu item under (for instance, adding a new PM-related funtion or feature under the existing PM AdminCP tree) nor can hack authors specify a group that their hack should appear above or below. A hack author might want to add "Clans" right below Usergroups or Promotions.
I'm guessing that new menus created with this XML technique appear way at the bottom?
Of course to add all the functionality I am talking about, the admincp XML file would need to be cached in a "merged" state.
They seem to appear at either the top or bottom, quite randomly...
It is bizzarre to be sure...
I hope the Devs listen to the requests and create some kind of display order feature for the CP Nav