PDA

View Full Version : HowTo: Add a section to the admincp nav


luke2kz71
10-07-2004, 10:00 PM
i myself have searched and saw alot of people asking about this... how to make a new section in the admincp left navigation window.

well this is the easiest way i found out to do it...

find one of these in the index.php (in accordance to where you want the section to be..

construct_nav_spacer();

then add this after it:
construct_nav_option($vbphrase['phrase1'], 'blah.php?do=phrase1', '|');
construct_nav_option($vbphrase['phrase2'], 'blah.php?do=phrase2', '|');
construct_nav_option($vbphrase['phrase3'], 'blah.php?do=phrase3', '|');
construct_nav_option($vbphrase['phrase4'], 'blah.php?do=phrase4', '|');
construct_nav_option($vbphrase['phrase5'], 'blah.php?do=phrase5', '|');
construct_nav_option($vbphrase['phrase6'], 'blah.php?do=phrase6', '|');
construct_nav_group($vbphrase['Section'], '<hr />');
construct_nav_spacer();

Now where i put blah.php?do=phraseX that is the link for the option

Where it says:
construct_nav_group($vbphrase['Section'], '<hr />');
That is what u call the group phrase.

Now.... you have to name these phrases, otherwise they will show up blank.

Lets assign those pharses some text...

go in your admincp and click languages and phrases.... then click phrase manager.... then the 'add phrase button' leave the phrase type at GLOBAL and then:

varname: phrase1
Text: Option1 (or whatever you would like to have the link to your first option called)

then so on.... this is where u actuall name the options according to the pharse1,2,3,4,5,6 or however many u want..

Then name the group (or section)

varname: Section
text: whatever you would like to call your section of options


I attached some a screen shot. i did a example of a store (which i am working on)


Hopfully i did this right....

now... there are other ways to make the phrases... like mySQL executions but this seemed to be the easiest for the everyday do-it-yourselfer....

Good luck with your projects

Dean C
10-08-2004, 08:09 PM
construct_nav_group("$vbphrase[Section]", '<hr />');


Should be:


construct_nav_group($vbphrase['Section'], '<hr />');


It just means it's read more quickly by PHP itself :)

Tony G
10-09-2004, 01:22 AM
Thanks for sharing this, will be handy to many. :)

luke2kz71
10-09-2004, 05:19 AM
construct_nav_group("$vbphrase[Section]", '<hr />');


Should be:


construct_nav_group($vbphrase['Section'], '<hr />');


It just means it's read more quickly by PHP itself :)


thanks dude, i will go ahead and edit my post accordingly :D

miz
10-22-2004, 12:08 PM
hmm the most importenat part is missing , can_administrator
post how to add sections for that
for exsample
if can administrator(userteams) {

;)

luke2kz71
10-22-2004, 01:58 PM
hmm the most importenat part is missing , can_administrator
post how to add sections for that
for exsample
if can administrator(userteams) {

;)

i actually just made it work off my userid.... i dunno about canadminister