Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

merge "Discussions"- and "Categories"-Tab to a "Forum"-Tab

edited October 2008 in Vanilla 1.0 Help
Hey, I'd like to merge the "Discussions"-Tab and the "Categories"-Tab to one single Tab called "Forum". With the Page Manager Addon I disabled the "Discussions"-Tab and renamed "Categories" to "Forum". There is only one flaw left :( I want the (new) "Forum"-Tab to be highlighted while I am browsing a discussion. None of the tabs are highlighted right now when browsing the discussions. The "Forum"-Tab is just highlighted when browsing the categories (like its supposed to since its just the renamed "Categories"-Tab ;) ). However, how do I get the tab highlighted when viewing a discussion? thanks

Comments

  • Options
    You probably won't be able to highlight the "Forum" tab for both of your cases (Browsing Discussion & Browsing Categories), but someone here might have a workaround, I'm not aware of.

    I must admit, when I read the subject of this discussion, I immediately thought the Discussion Overview extension would solve the problem. You might want to give it a try.
  • Options
    edited May 2008
    Try this, it should work in conjunction with what you already did (warning untested):

    <?php /* Extension Name: Change Tab Extension Url: n/a Description: Changes the current tab Version: 0.1 Author: Timothy Walters Kleinert (aka timfire) Author Url: N/A */ if ($Context->SelfUrl == 'index.php' || $Context->SelfUrl == 'comments.php' ) { function ChangeTab(&$Menu) { $Menu->CurrentTab = 'categories'; } $Context->AddToDelegate('Menu', 'PreRender', 'ChangeTab'); } ?>

    (Pop the code into a file called "default.php" inside a folder, and place the folder in the "extensions/" directory, and then enable like any other extension.)
  • Options
    hey timfire that works if you add $Context->SelfUrl == 'post.php' for the most sites but here is my problem. I have friendlier urls installed. So the Discussions page is located at http://www.bla.com/discussions/ when I open that url the Discussions tab is highlighted. But when I open http://www.bla.com/index.php witch displays the same content, the Categories tab is highlighted. That is very strange. I hope you or somebody else can help me. elm
  • Options
    RaizeRaize vancouver ✭✭
    Technically, if you got rid of the "discussions" page all together, it would leave you with just the categories page. Clicking on a category would then reveal all the discussions going on under that category heading, like a traditional forum. However, if you find yourself needing to do this I would recommend a different forum software because they are built around the "category" view as opposed to the "all discussions" view. Just for the record I think the approach that Vanilla has taken is more innovative so it's kinda pointless to get rid of it.
This discussion has been closed.