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.
Adding a tab to the menu
One of the items in the update is:
"Tabs can now be added to the menu and forced into a particular position."
Where do I do this?
0
This discussion has been closed.
Comments
if (in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))) { $Menu->AddTab("Family Photos", "family_photos", "./images/", "PhotosTab"); }
that's the code to do it... though i don't know the new method for specifying the order of the tabs.
$Menu->AddTab($Text, $Value, $Url, $CssClass, $Attributes = "", $Position = "0", $ForcePosition = "0")
that's the new syntax
so what do all the variables represent? specifically, $Variables $Value and $Name
I turned that into
$Menu->AddTab(Users, Users, "search.php?PostBackAction=Search&Keywords=&btnSubmit=Search&Type=Users", UsersTab, $Attributes = "", $Position = "4", $ForcePosition = "1")
$Menu->AddTab("Users", "Users","search.php?PostBackAction=Search&Keywords=&btnSubmit=Search&Type=Users", "UsersTab", $Attributes = "", $Position = "4", $ForcePosition = "1")
thanks anyway
It adds a tab to the menu linked to a search for all users.
/* Extension Name: Ben's Alter Menu Extension Extension Url: http://soul-scape.com/ Description: Adds extra tabs to the menu. Version: 1.0 Author: Ben Author Url: http://www.soul-scape.com/ */ if (in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))) { $Menu->AddTab("Users", "Users", "search.php?PostBackAction=Search&Keywords=&btnSubmit=Search&Type=Users", "UsersTab", $Attributes = "", $Position = "4", $ForcePosition = "1"); }
EDIT: just added it to the Vanilla Wiki under Extensions