[How-To] Add entries to AdminCP Navigation Menu
by
09 Jun 2005
Rating: (1 vote
- 5.00 average)
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:
Example HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <navgroups product="vbulletin"> <navgroup phrase="demohack_settings" hr="true"> <navoption> <phrase>demohack_foo</phrase> <link>demohack.php?do=foo</link> </navoption> <navoption> <phrase>demohack_modcp</phrase> <link>../{$vbulletin->config[Misc][modcpdir]}/foobar.php</link> </navoption> </navgroup> <navgroup text="Demohack Settings"> <navoption> <text>Demohack Foo</text> <link>demohack.php?do=foo</link> </navoption> <navoption> <text>Demohack ModCP</text> <link>../{$vbulletin->config[Misc][modcpdir]}/foobar.php</link> </navoption> </navgroup> </navgroups> 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> 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. |