Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > General Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
HowTo: Add a section to the admincp nav
luke2kz71
Join Date: Dec 2003
Posts: 23

 

Show Printable Version Email this Page Subscription
luke2kz71 luke2kz71 is offline 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..

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
Attached Images
File Type: jpg store1.JPG (7.4 KB, 0 views)
File Type: jpg store2.JPG (10.5 KB, 0 views)
Reply With Quote
  #2  
Old 10-08-2004, 08:09 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 10-09-2004, 01:22 AM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sharing this, will be handy to many.
Reply With Quote
  #4  
Old 10-09-2004, 05:19 AM
luke2kz71 luke2kz71 is offline
 
Join Date: Dec 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 10-22-2004, 12:08 PM
miz miz is offline
 
Join Date: Mar 2003
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm the most importenat part is missing , can_administrator
post how to add sections for that
for exsample
if can administrator(userteams) {

Reply With Quote
  #6  
Old 10-22-2004, 01:58 PM
luke2kz71 luke2kz71 is offline
 
Join Date: Dec 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04560 seconds
  • Memory Usage 2,280KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (2)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete