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
Ziyphr
New
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.
Can anyone explain this or suggest an alternative method?
When I try both of the following lines the Discussions tab strangely disappears.
$Menu->RemoveTab('account');
$Menu->RemoveTab('http://mydomain.com/forum/account.php');
Can anyone explain this or suggest an alternative method?
0
This discussion has been closed.
Comments
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 inappg/init_vanilla.php
. Only problem with this is any tabs added by other extensions must be added after you do the clearing/replacing.I presume the fix for RemoveTab will be applied in 1.0.4.