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.

Hide / Remove Tab

ZiyphrZiyphr New
edited April 2007 in Vanilla 1.0 Help
library/Vanilla/Vanilla.Control.Menu.php has a function RemoveTab($TabUrl) that I am trying to utilise in an extension to hide the Account tab.

When I try both of the following lines the Discussions tab strangely disappears.

$Menu->RemoveTab('account'); $Menu->RemoveTab('');
Can anyone explain this or suggest an alternative method?


  • Options
    edited January 2007
    RemoveTab is broken. It is fixed in SVN's version of Vanilla.Control.Menu.php.

    If you don't want to replace that file, or are writing an extension and don't want to force your users to download from SVN, you can instead do a $Menu->ClearTabs(); and then add them back in (except for the one you want to omit) like is done in appg/init_vanilla.php. Only problem with this is any tabs added by other extensions must be added after you do the clearing/replacing.
  • Options
    Thanks WallPhone. ClearTabs() and copying the code from appg/init_vanilla.php worked perfectly.

    I presume the fix for RemoveTab will be applied in 1.0.4.
  • Options
    is this new file included in vanilla 1.1.2?
  • Options
    It should be fixed now... Haven't looked directly, but am 99% sure its now fixed in the core.
This discussion has been closed.