Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Remove discussion and categories tabs?

edited November 2009 in Vanilla 2.0 - 2.8
Hi I wondered whether it was possible to remove the discussions and categories navigation at the top of the forum.

http://www.julianknott.com/vanilla.jpg

Regards

Julian

Comments

  • edited November 2009
    If anyone knew how to move those to the panel on the left hand side, that would be good too.

    ;>
  • @Julian_Knott: Open /themes/menu.php and change lines 29-31 from:

    while (list($Key, $Tab) = each($this->Tabs)) { echo '<li'.$this->TabClass($this->CurrentTab, $Tab['Value']).'><a href="'.$Tab['Url'].'" '.$Tab['Attributes'].'>'.$Tab['Text'].'</a></li>'; }

    To:

    while (list($Key, $Tab) = each($this->Tabs)) { if ($Tab['Text'] != "Discussions" && $Tab['Text'] != "Categories" ) { echo '<li'.$this->TabClass($this->CurrentTab, $Tab['Value']).'><a href="'.$Tab['Url'].'" '.$Tab['Attributes'].'>'.$Tab['Text'].'</a></li>'; } }
  • @yann: To "move" them to the left you could just use the code I gave to Julian_Knott but also open themes/panel.php and add the following to line 5 or 14 (depending on if you want the link above or below the "start a new discussion" link):

    echo ' <ul> <li> <h2>Forum Navigation</h2> <ul id="ForumNavigationPanel"> <li><a href="/" title="Latest Discussions">Discussions</a></li> <li><a href="/categories.php" title="Categories">Categories</a></li> </ul> </li> </ul> ';

    You will probably want to style the links in a different way to differentiate them from the other panel links too, so you would probably add something like this to the bottom of /themes/vanilla/styles/default/vanilla.css:

    #ForumNavigationPanel a { font-weight: bold; font-size: 12px; color: #c00; }
  • Great, it worked. Thanks.
  • You're welcome :)
  • You're welcome :)
Sign In or Register to comment.