Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2011, 07:24 PM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How Do I Change The Links On The Navigation Tabs?

I don't want to use the 'Blogs' and 'Whats New' pages, but I do want to have 2 new pages, 'About Us', and 'Sponsors'. I just want to have some text on these pages that provides info for my visitors and members. I've created these from CMS pages.

As I'm not using the 'Blogs' and 'Whats New' navigation tabs, I've changed the phrases on them to 'About Us' and 'Sponsors' as you can see here: http://www.theroaringseason.com/cont...p?136-About-Us

How can I now change the links on these navigation tabs to direct people to these pages rather than as they're currently set, which directs them to 'Blogs' and 'Whats New' pages?

Thanks in advance.
Reply With Quote
  #2  
Old 04-20-2011, 07:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do not just rename them and try to change the link. Remove them and then add new tabs. There are articles in the vB4 articles forum on how to remove them and how to add new ones. There are also modifications to add new ones.
Reply With Quote
  #3  
Old 04-20-2011, 08:13 PM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne for your reply. Is this the tread I should be using for adding the new tabs? https://vborg.vbsupport.ru/showthread.php?t=228313

When it says "Create a plugin at the hook process_templates_complete", what does that mean? What is a Hook and where is the process_templates_complete? This is all very new to me, so I'm struggling with some of these issues, so any help is much appreciated.
Reply With Quote
  #4  
Old 04-20-2011, 08:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That article is fine. Plugin System If you aren't comfortable doing plugins, you may want to search for a modification.
Reply With Quote
  #5  
Old 04-20-2011, 08:30 PM
Steve038 Steve038 is offline
 
Join Date: Apr 2011
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again for your help Lynne. Are plugins preferable over modifications? I assume they're also more difficult for novices like me?

--------------- Added [DATE]1303341902[/DATE] at [TIME]1303341902[/TIME] ---------------

OK, I've messed this thing up completely and now my Home page tab has vanished. I changed the existing Plugin Manager, and I'm guessing I was supposed to create a new one. This is so frustrating! All I want to do is change my tab targets, and I've ended up messing things up completely. I wish this process was easier. Hopefully someone can help me with this. Here is how my Plugin PHP Code now looks, what have I done wrong and how do I get my Home page tab back?

if (defined('CMS_SCRIPT') AND class_exists('vBCms_Navbar'))
{
$vbulletin->options['selectednavtab'] = 'vbcms';
$template_hook['navtab_start'] .= vBCms_NavBar::renderView();
}

else
{

if (can_see_cms())
{
$template_hook['navtab_start'] .= vB_Template::create('vbcms_navbar_links')->render();
$template_hook['navbar_getnew_menu'] .= vB_Template::create('vbcms_navbar_whatsnew_link')->render();
}
}
Reply With Quote
  #6  
Old 04-21-2011, 02:55 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There was a reason I said to delete the tabs and add new ones - it is waaaaay to easy to mess things up by just changing the existing ones to do something else.

The default code for that plugin is:
PHP Code:
if (defined('CMS_SCRIPT') AND class_exists('vBCms_Navbar')) 

    
$vbulletin->options['selectednavtab'] = 'vbcms'
    
$template_hook['navtab_start'] .= vBCms_NavBar::renderView(); 


else 


    if (
can_see_cms()) 
    { 
    
$template_hook['navtab_start'] .= vB_Template::create('vbcms_navbar_link')->render(); 
        
$template_hook['navbar_getnew_menu'] .= vB_Template::create('vbcms_navbar_whatsnew_link')->render(); 
    } 

Please start using the code tags.
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 06:27 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.05066 seconds
  • Memory Usage 2,218KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (6)postbit
  • (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_postinfo_query
  • fetch_postinfo
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete