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.

can't find info about 'Add new settings menus to control my amazing new extensions'

edited October 2007 in Vanilla 1.0 Help
In the More Information section of the getting started for dev things, my appetite got wet enough. But I still can't find infos about Add new settings menus to control your amazing new extensions. Could someone help me ?


  • Options
    Take a look at the example of AddString for the Panel. AddList and AddListItem are also described on that page. You can control the position using the position attribute and also add list items to existing lists.

    Also, it's always instructive to look at the source code of an add-on that does something similar.
  • Options
    Just about every one of Jazzman's extensions have their own settings pages... Inline Images and poll are two that I happen to have installed and have seen their settings pages.
  • Options
    edited October 2007
    Thanks, I thought that there was functions for that in the framework.
    In fact it's a set of instructions (thanks to the framework, eases our lives much, we must:
    // test for settings.php page and permissions if ($Context->SelfUrl == "settings.php" && $Context->Session->User->Permission('PERMISSION_MANAGE_EXTENSIONS')) { // add the list and list item $ExtensionOptions = $Context->GetDefinition("ExtensionOptions"); $Panel->AddList($ExtensionOptions, 20); $Panel->AddListItem($ExtensionOptions, $Context->GetDefinition("SettingItemOfMyExtension"), GetUrl($Context->Configuration, 'settings.php', '', '', '', '', 'PostBackAction=MyExtensionString')); }
    I learned this from Attachments, and must continue for me to understand the PostBack trick.

    EDIT: I remember now reading a post about the string to use for the title of the list that hosts the list items. Some different extensions use different strings and it becomes a mess. Can somebody find this ?
  • Options
    Extension Options is the heading-- looks like you're already on the right track.
  • Options
    MarkMark Vanilla Staff
    It's been a while since I wrote that, but I think I was referring to how you can write a control and add a new "page" to the settings tab. An example is the Custom Styles extension - which adds a new option to the settings tab that allows you to manage the available styles.
This discussion has been closed.