Results 1 to 11 of 11

Thread: NavBar question / how to

  1. #1
    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 Attached Images

  2. #2
    Senior Member
    Join Date
    Jan 2008
    Location
    Atlanta, GA
    Posts
    444

    Default

    I do not believe that plugin is compatible with CMPS

  3. #3
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    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.

  4. #4
    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.

  5. #5
    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

  6. #6
    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 :/

  7. #7
    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

  8. #8
    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

  9. #9
    Junior Member
    Join Date
    Apr 2012
    Posts
    8

  10. #10
    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 Attached Images

  11. #11
    Junior Member
    Join Date
    Apr 2012
    Posts
    8

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Navbar Tab question
    By JesterP in forum Troubleshooting & Problems
    Replies: 9
    Last Post: 04-04-2010, 03:18 PM
  2. Navbar Question
    By azntfl in forum "How Do I..." Questions
    Replies: 2
    Last Post: 05-02-2006, 02:07 AM
  3. NavBar question
    By Zooktalk in forum Troubleshooting / "How do I..." Questions
    Replies: 1
    Last Post: 05-18-2005, 03:26 PM
  4. Navbar question
    By alex4473 in forum Troubleshooting / "How do I..." Questions
    Replies: 7
    Last Post: 02-01-2005, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •