vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   General Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=189)
-   -   HowTo: Add a section to the admincp nav (https://vborg.vbsupport.ru/showthread.php?t=70343)

luke2kz71 10-07-2004 10:00 PM

HowTo: Add a section to the admincp nav
 
1 Attachment(s)
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..

PHP Code:

construct_nav_spacer(); 

then add this after it:
PHP Code:

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:
PHP Code:

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

PHP Code:

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

Should be:

PHP Code:

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

Quote:

Originally Posted by Dean C
PHP Code:

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

Should be:

PHP Code:

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

Quote:

Originally Posted by miz
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


All times are GMT. The time now is 07:24 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.01055 seconds
  • Memory Usage 1,738KB
  • 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
  • (7)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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