vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v4.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-02-2012, 10:03 PM
Starwind Starwind is offline
Junior Member
 
Join Date: Apr 2012
Posts: 8
Default NavBar question / how to

Hello there

I am running the latest Vbulletin + Vbadvanced and im struggling with the Navbar


I have an Vbulletin add that let me easy edit the Navbar, what to have there etc

I removed Whats New, and added Vbadvanced on "Home"

altho when i go to "Home" the Whats news comes visible, also shows like the forum is highlited

Is the Navbar addon

Check the images for better explaination.

So basically how do i fix this?
Attached Images
File Type: png On Home.png (14.9 KB, 21 views)
File Type: png On forum.png (10.7 KB, 19 views)
Reply With Quote
  #2  
Old 04-03-2012, 03:24 PM
Dragonsys Dragonsys is offline
Senior Member
 
Join Date: Jan 2008
Location: Atlanta, GA
Posts: 444
Default

I do not believe that plugin is compatible with CMPS
Reply With Quote
  #3  
Old 04-09-2012, 12:52 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

That should be compatible with the CMPS... How exactly did you remove the "What's New" link?
__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
  #4  
Old 04-09-2012, 08:54 PM
Dragonsys Dragonsys is offline
Senior Member
 
Join Date: Jan 2008
Location: Atlanta, GA
Posts: 444
Default

that addon uses a preg_replace to hide the What's New tab

PHP Code:
    if ($vbulletin->options['evbs_sstab_advanced_del_whatsnews'])
    {
        
$vbulletin->templatecache['navbar']= preg_replace(
        
'#(<li>|<li\s*class="selected">)*<a\s*class="navtab"\s*href="search\.php\?\'\s*\.\s*\$session\[\'sessionurl\'\]\s*\.\s*\'do=\w+&amp;contenttype=\w+"\s*accesskey="\d">\'\s*\.\s*vB_Template_Runtime::parsePhrase\("\w*"\)\s*\.\s*\'</a>(</li>)*#i',
        
'',$vbulletin->templatecache['navbar']);
    } 
and I'm pretty sure that it does not play properly with CMPS without modification. Most of the Tab mods don't.

it's easiest to create your own plugin to hide the What's New tab with the below code:
Code:
$vbulletin->templatecache['navbar'] = str_replace('><a class="navtab" href="search.php',' style="display:none"><a class="navtab" href="search.php',$vbulletin->templatecache['navbar']);
in process_templates_complete

This works with CMPS very well.
Reply With Quote
  #5  
Old 04-10-2012, 11:13 AM
Starwind Starwind is offline
Junior Member
 
Join Date: Apr 2012
Posts: 8
Default

the reason why i kinda wanted a mod to edit the navbar was to remove the whats new tab, but also add more stuff to it, an as i have no idea on coding or anything like that im kinda screwed i guess?

Thanks Dragonsys

Will use that to hide What's New tab
Reply With Quote
  #6  
Old 04-10-2012, 11:20 AM
Dragonsys Dragonsys is offline
Senior Member
 
Join Date: Jan 2008
Location: Atlanta, GA
Posts: 444
Default

There are other products on vb.org which work with CMPS, I don't recall which ones off the top of my head, and I think you have to scroll through the comments to find them :/
Reply With Quote
  #7  
Old 04-10-2012, 12:41 PM
Starwind Starwind is offline
Junior Member
 
Join Date: Apr 2012
Posts: 8
Default

damn, i have abit of searching ahead of me then hehe

thank you very much for the help
Reply With Quote
  #8  
Old 04-21-2012, 02:05 PM
Starwind Starwind is offline
Junior Member
 
Join Date: Apr 2012
Posts: 8
Default

So after searching a lot i kinda gave up on the plugins.

so with that code Dragonsys, sorry for beeing abit nub here, but where do i add it? and how hehe

cant really find process_templates_complete
Reply With Quote
  #9  
Old 04-21-2012, 05:11 PM
Starwind Starwind is offline
Junior Member
 
Join Date: Apr 2012
Posts: 8
Default

oh nvm,


Worked for me
Reply With Quote
  #10  
Old 04-24-2012, 11:44 AM
Dragonsys Dragonsys is offline
Senior Member
 
Join Date: Jan 2008
Location: Atlanta, GA
Posts: 444
Default

Quote:
Originally Posted by Starwind View Post
That does work well, but when you upgrade vBulletin, it might overwrite your changes. The best route is to use a plugin:

1. AdminCp -> Plugins & Products -> Add New Plugin
2. Fill in the following info (screenshot attached):
A. Product = vBulletin
B. Hook Location = process_templates_complete
C. Title = Whatever you want (I use hide_tabs)
D. Execution Order = 5
E. Plugin PHP Code =
PHP Code:
$vbulletin->templatecache['navbar'] = str_replace('><a class="navtab" href="search.php',' style="display:none"><a class="navtab" href="search.php',$vbulletin->templatecache['navbar']); 
F. Plugin is Active = Yes
3. Save

This will hide the What's New Tab
Attached Images
File Type: png vb_plugin_hide_tabs.png (32.7 KB, 9 views)
Reply With Quote
  #11  
Old 04-25-2012, 03:07 PM
Starwind Starwind is offline
Junior Member
 
Join Date: Apr 2012
Posts: 8
Default

Ahh sweet, im going to do that, thank you very much Dragonsys
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Navbar Tab question JesterP Troubleshooting & Problems 9 04-04-2010 03:18 PM
Navbar Question azntfl "How Do I..." Questions 2 05-02-2006 02:07 AM
NavBar question Zooktalk Troubleshooting / "How do I..." Questions 1 05-18-2005 03:26 PM
Navbar question alex4473 Troubleshooting / "How do I..." Questions 7 02-01-2005 12:36 PM


All times are GMT -4. The time now is 11:03 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.