initialize() public méthode

public initialize ( null $Schema = null )
$Schema null
Exemple #1
0
 /**
  * Setup settings page.
  *
  * @param $Sender
  */
 public function settingsController_inThisDiscussion_create($Sender)
 {
     $Sender->permission('Garden.Settings.Manage');
     $Sender->setData('Title', t('In This Discussion Settings'));
     $Sender->addSideMenu('dashboard/settings/plugins');
     $Conf = new ConfigurationModule($Sender);
     $Conf->initialize(array('Plugins.VanillaInThisDiscussion.Limit' => array('Description' => t('User Limit'), 'Default' => 20, 'LabelCode' => t('Enter a limit for the number of users displayed'))));
     $Conf->renderAll();
 }
 public function settingsController_quoteMention_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $sender->addSideMenu();
     $conf = new ConfigurationModule($sender);
     $conf->initialize(['QuoteMention.MaxWidth' => ['Control' => 'textbox', 'LabelCode' => 'Maximum width (px) of the tooltip', 'Default' => 350], 'QuoteMention.Position' => ['Control' => 'dropdown', 'LabelCode' => 'Position of the tooltip', 'Items' => ['bottom' => 'bottom', 'bottom-left' => 'bottom-left', 'left' => 'left', 'top-left' => 'top-left', 'top' => 'top', 'top-right' => 'top-right', 'right' => 'right', 'bottom-right' => 'bottom-right'], 'Default' => 'bottom'], 'QuoteMention.ShowProgress' => ['Control' => 'CheckBox', 'LabelCode' => 'Show a progress indicator when loading contents.', 'Default' => true], 'QuoteMention.MaxLength' => ['Control' => 'textbox', 'LabelCode' => 'Maximum characters shown in the tooltip', 'Default' => 400]]);
     $sender->title(sprintf(t('%s Settings'), 'Quote Mentions'));
     $conf->renderAll();
 }
 public function settingsController_registerCta_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $sender->addSideMenu();
     $conf = new ConfigurationModule($sender);
     $conf->initialize(['registercta.message' => ['Control' => 'textbox', 'LabelCode' => 'Customize the call to action. HTML can be used.', 'Default' => $this->defaultMessage, 'Options' => ['MultiLine' => true]], 'registercta.position' => ['Control' => 'dropdown', 'LabelCode' => 'Position of the message', 'Items' => ['top' => 'above discussion', 'afterdiscussion' => 'below first discussion post', 'bottom' => 'below comments'], 'Default' => 'bottom']]);
     $sender->title(sprintf(t('%s Settings'), 'Register call to action'));
     $conf->renderAll();
 }
 /**
  * The settings page for vanillicon.
  *
  * @param Gdn_Controller $sender
  */
 public function settingsController_vanillicon_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $cf = new ConfigurationModule($sender);
     $items = array('v1' => 'Vanillicon 1', 'v2' => 'Vanillicon 2');
     $cf->initialize(array('Plugins.Vanillicon.Type' => array('LabelCode' => 'Vanillicon Set', 'Control' => 'radiolist', 'Description' => 'Which vanillicon set do you want to use?', 'Items' => $items, 'Options' => array('display' => 'after'), 'Default' => 'v1')));
     $sender->setData('Title', sprintf(t('%s Settings'), 'Vanillicon'));
     $cf->renderAll();
 }
 /**
  * Settings page.
  *
  * @param SettingsController $sender
  */
 public function settingsController_hipChat_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $conf = new ConfigurationModule($sender);
     $conf->initialize(array('HipChat.Account' => array('Control' => 'TextBox', 'Type' => 'string', 'LabelCode' => t('Account Name'), 'Options' => array('class' => 'InputBox LargeInput')), 'HipChat.Room' => array('Control' => 'TextBox', 'Type' => 'int', 'LabelCode' => t('Room ID'), 'Options' => array('class' => 'InputBox SmallInput')), 'HipChat.Token' => array('Control' => 'TextBox', 'Type' => 'string', 'LabelCode' => t('Authorization Token'), 'Options' => array('class' => 'InputBox LargeInput'))));
     $sender->addSideMenu();
     $sender->setData('Title', sprintf(T('%s Settings'), 'HipChat'));
     $sender->ConfigurationModule = $conf;
     $conf->renderAll();
 }
 public function settingsController_baiduurlpush_create($Sender)
 {
     $Sender->permission('Garden.Settings.Manage');
     $Cf = new ConfigurationModule($Sender);
     $Formats = array_combine($this->Formats, $this->Formats);
     $Cf->initialize(array('Plugins.BaiduURLPush.Site' => array('LabelCode' => '域 名', 'Control' => 'TextBox', 'Description' => '<p>请填写百度站长工具对应的域名</p>'), 'Plugins.BaiduURLPush.Token' => array('LabelCode' => 'TOKEN', 'Control' => 'TextBox', 'Description' => '<p>请填写百度站长工具对应的TOKEN</p>'), 'Plugins.BaiduURLPush.Disable' => array('LabelCode' => '禁用该功能', 'Control' => 'CheckBox', 'Description' => '<p>如果有问题,可以钩选该选项禁用此功能</p>')));
     $Sender->addSideMenu();
     $Sender->setData('Title', '百度实时推送插件');
     $Cf->renderAll();
 }
Exemple #7
0
 /**
  * The Index method of the VWP setting page.
  *
  * @param SettingsController $sender
  */
 public function Controller_Index($sender)
 {
     // Set required permission.
     $sender->permission('Garden.Settings.Manage');
     // Set up the configuration module.
     $configModule = new ConfigurationModule($sender);
     $configModule->initialize(array('VWP.Database.User' => array('LabelCode' => 'WordPress Database User', 'Control' => 'TextBox'), 'VWP.Database.Password' => array('LabelCode' => 'WordPress Database Password', 'Control' => 'TextBox'), 'VWP.Database.Name' => array('LabelCode' => 'WordPress Database Name', 'Control' => 'TextBox'), 'VWP.Database.Prefix' => array('LabelCode' => 'WordPress Database Prefix', 'Control' => 'TextBox')));
     $sender->ConfigurationModule = $configModule;
     $sender->title(T('VWP Settings'));
     $sender->addSideMenu('/settings/vwp');
     $sender->View = $sender->fetchViewLocation('vwp', 'settings', 'vwp');
     $sender->render();
 }
 public function settingsController_PostUrl_create($Sender, $args)
 {
     $Sender->permission('Garden.Settings.Manage');
     $Cf = new ConfigurationModule($Sender);
     if (c('Plugins.PostUrl.Display1') == "") {
         Gdn::config()->set('Plugins.PostUrl.Display1', "from: %post_url%", false, false);
     }
     $Description = '<p>可接受下列占位符号,该符号和wordpress兼容: <br />%site_url% - the URI of your site<br />%site_name% - the name of your site<br />%post_url% - the URI of the post where the text is displayed<br />%post_title% - the title of the post where the text is displayed</p>';
     $Cf->initialize(array('Plugins.PostUrl.ItemName1' => array('LabelCode' => '版权名称一', 'Control' => 'TextBox', 'Description' => "该字段用于发布话题时选择方便记忆"), 'Plugins.PostUrl.Display1' => array('LabelCode' => '版权信息一', 'Control' => 'TextBox', 'Description' => $Description, 'Items' => array(), 'Options' => array("MultiLine" => true, "rows" => "20", "cols" => 30)), 'Plugins.PostUrl.ItemName2' => array('LabelCode' => '<hr /><br />版权名称二', 'Control' => 'TextBox', 'Description' => "该字段用于发布话题时选择方便记忆"), 'Plugins.PostUrl.Display2' => array('LabelCode' => '版权信息二', 'Control' => 'TextBox', 'Options' => array("MultiLine" => true, "rows" => "20", "cols" => 30)), 'Plugins.PostUrl.ItemName3' => array('LabelCode' => '<hr /><br />版权名称三', 'Control' => 'TextBox', 'Description' => "该字段用于发布话题时选择方便记忆"), 'Plugins.PostUrl.Display3' => array('LabelCode' => '版权信息三', 'Control' => 'TextBox', 'Options' => array("MultiLine" => true, "rows" => "20", "cols" => 30)), 'Plugins.PostUrl.Default' => array('LabelCode' => '默认版权信息', 'Control' => 'DropDown', 'Description' => "没有选择或者历史文章将会使用该设定", 'Items' => array(0 => '', 1 => '版权一', 2 => '版权二', 3 => '版权三'), 'Options' => array('Value' => c('Plugins.PostUrl.Default')))));
     $c = Gdn::controller();
     $c->addJsFile('settings.js', 'plugins/CDNManager');
     $Sender->addSideMenu();
     $Sender->setData('Title', t('Add Post Url'));
     $Cf->renderAll();
 }
    public function settingsController_cdnmanager_create($Sender, $args)
    {
        $Sender->permission('Garden.Settings.Manage');
        $Cf = new ConfigurationModule($Sender);
        if (c('Plugins.CDNManager.CDNSources') == "") {
            $defaultCDNValue = "jquery.js = \"http://libs.baidu.com/jquery/1.10.2/jquery.min.js\"\r\njquery-ui.js = \"http://apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js\"";
            Gdn::config()->set('Plugins.CDNManager.CDNSources', $defaultCDNValue, false, false);
        }
        $Cf->initialize(array('Plugins.CDNManager.CDNSources' => array('LabelCode' => 'CDN使用源列表', 'Control' => 'TextBox', 'Options' => array('MultiLine' => true, 'rows' => 20, 'cols' => 50), 'Description' => '<p>输入需要用CDN加速的文件和对应的地址,如jquery等国内国外都有开放的CDN源,也可申请<font color="red"><a href="https://portal.qiniu.com/signup?code=3lcqpvqtedfma" target="_blank">七牛</a></font>免费的空间来加速您的网站,<a href="https://portal.qiniu.com/signup?code=3lcqpvqtedfma" target="_blank">点击这里免费申请七牛加速空间</a></p> <p><small><strong>
</strong> </small></p>', 'Items' => array())));
        $c = Gdn::controller();
        $c->addJsFile('settings.js', 'plugins/CDNManager');
        $Sender->addSideMenu();
        $Sender->setData('Title', t('CDN源设置'));
        $Cf->renderAll();
    }
 /**
  *
  *
  * @param $Sender
  * @param $Args
  */
 public function socialController_googlePlus_create($Sender, $Args)
 {
     $Sender->permission('Garden.Settings.Manage');
     $Conf = new ConfigurationModule($Sender);
     $Conf->initialize(array('Plugins.GooglePlus.ClientID' => array('LabelCode' => 'Client ID'), 'Plugins.GooglePlus.Secret' => array('LabelCode' => 'Client secret'), 'Plugins.GooglePlus.SocialReactions' => array('Control' => 'checkbox', 'Default' => true), 'Plugins.GooglePlus.SocialSharing' => array('Control' => 'checkbox', 'Default' => true), 'Plugins.GooglePlus.UseAvatars' => array('Control' => 'checkbox', 'Default' => true), 'Plugins.GooglePlus.Default' => array('Control' => 'checkbox', 'LabelCode' => 'Make this connection your default signin method.')));
     if (Gdn::request()->isAuthenticatedPostBack()) {
         $Model = new Gdn_AuthenticationProviderModel();
         $Model->save(array('AuthenticationKey' => self::ProviderKey, 'IsDefault' => c('Plugins.GooglePlus.Default')));
     }
     $Sender->addSideMenu('dashboard/social');
     $Sender->setData('Title', sprintf(t('%s Settings'), 'Google+'));
     $Sender->ConfigurationModule = $Conf;
     $Sender->render('Settings', '', 'plugins/GooglePlus');
 }
 /**
  *
  *
  * @param $Sender
  * @param array $Args
  */
 public function settingsController_stopForumSpam_create($Sender, $Args = array())
 {
     $Sender->permission('Garden.Settings.Manage');
     $Conf = new ConfigurationModule($Sender);
     $Conf->initialize(array('Plugins.StopForumSpam.IPThreshold1' => array('Type' => 'int', 'Control' => 'TextBox', 'Default' => 5, 'Description' => 'IP addresses reported this many times will be flagged as spam.'), 'Plugins.StopForumSpam.EmailThreshold1' => array('Type' => 'int', 'Control' => 'TextBox', 'Default' => 20, 'Description' => 'Email addresses reported this many times will be flagged as spam.'), 'Plugins.StopForumSpam.IPThreshold2' => array('Type' => 'int', 'Control' => 'TextBox', 'Default' => 20, 'Description' => 'IP addresses reported this many times will be completely rejected.'), 'Plugins.StopForumSpam.EmailThreshold2' => array('Type' => 'int', 'Control' => 'TextBox', 'Default' => 50, 'Description' => 'Email addresses reported this many times will be completely rejected.')));
     $Sender->addSideMenu('dashboard/settings/plugins');
     $Sender->setData('Title', sprintf(t('%s Settings'), 'Stop Forum Spam'));
     $Sender->ConfigurationModule = $Conf;
     $Conf->renderAll();
 }
 /**
  * Settings page.
  *
  * @param unknown_type $Sender
  * @param unknown_type $Args
  */
 public function settingsController_googlePrettify_create($Sender, $Args)
 {
     $Cf = new ConfigurationModule($Sender);
     $CssUrl = asset('/plugins/GooglePrettify/design/prettify.css', true);
     $Languages = array('apollo' => 'apollo', 'clj' => 'clj', 'css' => 'css', 'go' => 'go', 'hs' => 'hs', 'lisp' => 'lisp', 'lua' => 'lua', 'ml' => 'ml', 'n' => 'n', 'proto' => 'proto', 'scala' => 'scala', 'sql' => 'sql', 'text' => 'tex', 'vb' => 'visual basic', 'vhdl' => 'vhdl', 'wiki' => 'wiki', 'xq' => 'xq', 'yaml' => 'yaml');
     $Cf->initialize(array('Plugins.GooglePrettify.LineNumbers' => array('Control' => 'CheckBox', 'Description' => 'Add line numbers to source code.', 'Default' => false), 'Plugins.GooglePrettify.NoCssFile' => array('Control' => 'CheckBox', 'LabelCode' => 'Exclude Default CSS File', 'Description' => "If you want to define syntax highlighting in your custom theme you can disable the <a href='{$CssUrl}'>default css</a> with this setting.", 'Default' => false), 'Plugins.GooglePrettify.UseTabby' => array('Control' => 'CheckBox', 'LabelCode' => 'Allow Tab Characters', 'Description' => "If users enter a lot of source code then enable this setting to make the tab key enter a tab instead of skipping to the next control.", 'Default' => false), 'Plugins.GooglePrettify.Language' => array('Control' => 'DropDown', 'Items' => $Languages, 'Options' => array('IncludeNull' => true), 'Description' => 'We try our best to guess which language you are typing in, but if you have a more obscure language you can force all highlighting to be in that language. (Not recommended)')));
     $Sender->addSideMenu();
     $Sender->setData('Title', t('Syntax Prettifier Settings'));
     $Cf->renderAll();
 }
 /**
  * Configure settings page in dashboard.
  *
  * @param SettingsController $sender
  * @param array $args
  */
 public function settingsController_emojiExtender_create($sender, $args)
 {
     $sender->permission('Garden.Settings.Manage');
     $cf = new ConfigurationModule($sender);
     $items = array();
     foreach ($this->getEmojiSets() as $key => $emojiSet) {
         $manifest = $this->getManifest($emojiSet);
         $selected = '<svg class="icon icon-svg-checkmark" viewBox="0 0 17 17"><use xlink:href="#checkmark" /></svg>';
         $icon = isset($manifest['icon']) ? img($emojiSet['basePath'] . '/' . $manifest['icon'], array('alt' => $manifest['name'], 'class' => 'label-selector-image')) : '';
         $items[$key] = '@<div class="image-wrap">' . $icon . '<div class="overlay">' . '<div class="buttons">' . '<a class="btn btn-overlay">' . t('Select') . '</a>' . '</div>' . '<div class="selected">' . $selected . '</div>' . '</div>' . '</div>' . '<div emojiset-body>' . '<div><b>' . htmlspecialchars($manifest['name']) . '</b></div>' . (empty($manifest['author']) ? '' : '<div class="emojiset-author info">' . sprintf(t('by %s'), $manifest['author']) . '</div>') . (empty($manifest['description']) ? '' : '<p class="emojiset-description">' . Gdn_Format::wysiwyg($manifest['description']) . '</p>') . '</div>';
     }
     $cf->initialize(array('Garden.EmojiSet' => array('LabelCode' => 'Emoji Set', 'Control' => 'radiolist', 'Items' => $items, 'Options' => array('list' => true, 'list-item-class' => 'label-selector-item', 'listclass' => 'emojiext-list label-selector', 'display' => 'after', 'class' => 'label-selector-input', 'no-grid' => true))));
     $sender->setData('Title', t('Choose Your Emoji Set'));
     $cf->renderAll();
 }
 /**
  * The settings page for vanillicon.
  *
  * @param Gdn_Controller $sender
  */
 public function settingsController_vanillicon_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $cf = new ConfigurationModule($sender);
     $items = array('v1' => 'Vanillicon 1', 'v2' => 'Vanillicon 2 (beta)');
     $cachePath = self::getCachePath();
     $writable = is_writable($cachePath);
     $txtNotWritable = '<p style="color: #c00;">' . T('<b>Warning:</b> the cache directory is not writable. If you want to use the cache mechanism, you have to enable write permissions for') . '</p><code>' . $cachePath . '</code><br><br><br>';
     $txtProxyActive = '<p style="color: #090;">' . T('<b>Congratulations: The privacy of your users is respected!</b> All requests to vanillicon.com are made by your server and not by your users.') . '</p><br>';
     $cf->initialize(array('Plugins.Vanillicon.Type' => array('LabelCode' => 'Vanillicon Proxy', 'Control' => 'radiolist', 'Description' => $txtProxyActive . ($writable ? '' : $txtNotWritable) . ' ' . T('Which vanillicon set do you want to use?'), 'Items' => $items, 'Options' => array('list' => true, 'listclass' => 'icon-list', 'display' => 'after'), 'Default' => 'v1')));
     $sender->addSideMenu();
     $sender->setData('Title', sprintf(t('%s Settings'), 'Vanillicon'));
     $cf->renderAll();
 }
 /**
  * Settings page.
  *
  * @param SettingsController $Sender
  */
 public function settingsController_akismet_create($Sender)
 {
     // Allow for master hosted key
     $KeyDesc = 'Enter the key you obtained from <a href="http://akismet.com">akismet.com</a>';
     if (c('Plugins.Akismet.MasterKey')) {
         $KeyDesc = 'No key is required! You may optionally use your own.';
     }
     $Sender->permission('Garden.Settings.Manage');
     $Sender->setData('Title', t('Akismet Settings'));
     $Cf = new ConfigurationModule($Sender);
     // Do key validation so we don't break our entire site.
     // Always allow a blank key, because the plugin turns off in that scenario.
     if (Gdn::request()->isAuthenticatedPostBack()) {
         $key = $Cf->form()->getFormValue('Plugins.Akismet.Key');
         if ($key !== '' && !$this->validateKey($key)) {
             $Cf->form()->addError('Key is invalid.');
         }
     }
     // Settings to be shown.
     $options = ['Plugins.Akismet.Key' => ['Description' => $KeyDesc]];
     // Deprecated TypePad option should go away if it's not already set.
     if (c('Plugins.Akismet.Server')) {
         $options['Plugins.Akismet.Server'] = ['Description' => 'You can use either Akismet or TypePad antispam.', 'Control' => 'DropDown', 'Items' => ['' => 'Akismet', 'api.antispam.typepad.com' => 'TypePad']];
     }
     $Cf->initialize($options);
     $Sender->addSideMenu('settings/plugins');
     $Cf->renderAll();
 }
 /**
  * Settings page.
  *
  * @param SettingsController $sender
  */
 public function settingsController_sprintnotifier_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $conf = new ConfigurationModule($sender);
     $conf->initialize(array('SprintNotifier.Teamwork.BustCacheUrl' => array('Control' => 'TextBox', 'Type' => 'string', 'LabelCode' => t('Remote URL for sprint tracker cache buster'), 'Options' => array('class' => 'InputBox LargeInput')), 'SprintNotifier.Teamwork.Secret' => array('Control' => 'TextBox', 'Type' => 'string', 'LabelCode' => t('Secret Token'), 'Options' => array('class' => 'InputBox LargeInput')), 'Teamwork.Account' => array('Control' => 'TextBox', 'Type' => 'string', 'LabelCode' => t('Teamwork Account Slug'), 'Options' => array('class' => 'InputBox LargeInput')), 'Teamwork.API.Token' => array('Control' => 'TextBox', 'Type' => 'string', 'LabelCode' => t('Teamwork API Token'), 'Options' => array('class' => 'InputBox LargeInput')), 'SprintNotifier.HipChat.Token' => array('Control' => 'TextBox', 'Type' => 'string', 'LabelCode' => t('HipChat API Token'), 'Options' => array('class' => 'InputBox LargeInput')), 'SprintNotifier.HipChat.RoomID' => array('Control' => 'TextBox', 'Type' => 'int', 'LabelCode' => t('HipChat RoomID to notify'), 'Options' => array('class' => 'InputBox LargeInput'))));
     $sender->addSideMenu();
     $sender->setData('Title', sprintf(T('%s Settings'), 'Sprint Notifier'));
     $sender->ConfigurationModule = $conf;
     $conf->renderAll();
 }
 /**
  * This OpenID plugin is requisite for some other sso plugins, but we may not always want the OpenID sso option.
  *
  * Let's allow users to remove the ability to sign in with OpenID.
  */
 public function settingsController_openID_create($Sender)
 {
     $Sender->permission('Garden.Settings.Manage');
     $Conf = new ConfigurationModule($Sender);
     $Conf->initialize(array('Plugins.OpenID.DisableSignIn' => array('Control' => 'Checkbox', 'LabelCode' => 'Disable OpenID sign in', 'Default' => false)));
     $Sender->addSideMenu();
     $Sender->setData('Title', sprintf(t('%s Settings'), t('OpenID')));
     $Sender->ConfigurationModule = $Conf;
     $Conf->renderAll();
 }
 /**
  * Configure settings page in dashboard.
  *
  * @param SettingsController $sender
  * @param array $args
  */
 public function settingsController_emojiExtender_create($sender, $args)
 {
     $cf = new ConfigurationModule($sender);
     $items = array();
     foreach ($this->getEmojiSets() as $key => $emojiSet) {
         $manifest = $this->getManifest($emojiSet);
         $icon = isset($manifest['icon']) ? img($emojiSet['basePath'] . '/' . $manifest['icon'], array('alt' => $manifest['name'])) : '';
         $items[$key] = '@' . $icon . '<div emojiset-body>' . '<div><b>' . htmlspecialchars($manifest['name']) . '</b></div>' . (empty($manifest['author']) ? '' : '<div class="emojiset-author">' . sprintf(t('by %s'), $manifest['author']) . '</div>') . (empty($manifest['description']) ? '' : '<p class="emojiset-description">' . Gdn_Format::wysiwyg($manifest['description']) . '</p>') . '</div>';
     }
     $cf->initialize(array('Garden.EmojiSet' => array('LabelCode' => 'Emoji Set', 'Control' => 'radiolist', 'Description' => '<p>Which emoji set would you like to use?</p>', 'Items' => $items, 'Options' => array('list' => true, 'listclass' => 'emojiext-list', 'display' => 'after'))));
     $sender->addCssFile('settings.css', 'plugins/EmojiExtender');
     $sender->addSideMenu();
     $sender->setData('Title', sprintf(t('%s Settings'), 'Emoji'));
     $cf->renderAll();
 }
 /**
  *
  * @param SettingsController $Sender
  * @param array $Args
  */
 public function settingsController_editor_create($Sender, $Args)
 {
     $Sender->permission('Garden.Settings.Manage');
     $Cf = new ConfigurationModule($Sender);
     $Formats = array_combine($this->Formats, $this->Formats);
     $Cf->initialize(array('Garden.InputFormatter' => array('LabelCode' => 'Post Format', 'Control' => 'DropDown', 'Description' => '<p>Select the default format of the editor for posts in the community.</p> <p><small><strong>Note:</strong> the editor will auto-detect the format of old posts when editing them and load their original formatting rules. Aside from this exception, the selected post format below will take precedence.</small></p>', 'Items' => $Formats), 'Plugins.editor.ForceWysiwyg' => array('LabelCode' => 'Reinterpret All Posts As Wysiwyg', 'Control' => 'Checkbox', 'Description' => '<p>Check the below option to tell the editor to reinterpret all old posts as Wysiwyg.</p> <p><small><strong>Note:</strong> This setting will only take effect if Wysiwyg was chosen as the Post Format above. The purpose of this option is to normalize the editor format. If older posts edited with another format, such as markdown or BBCode, are loaded, this option will force Wysiwyg.</p>'), 'Garden.MobileInputFormatter' => array('LabelCode' => 'Mobile Format', 'Control' => 'DropDown', 'Description' => '<p>Specify an editing format for mobile devices. If mobile devices should have the same experience, specify the same one as above. If users report issues with mobile editing, this is a good option to change.</p>', 'Items' => $Formats, 'DefaultValue' => c('Garden.MobileInputFormatter'))));
     // Add some JS and CSS to blur out option when Wysiwyg not chosen.
     $c = Gdn::controller();
     $c->addJsFile('settings.js', 'plugins/editor');
     $Sender->addCssFile('settings.css', 'plugins/editor');
     $Sender->addSideMenu();
     $Sender->setData('Title', t('Advanced Editor Settings'));
     $Cf->renderAll();
 }
 /**
  * Create settings screen for plugin.
  *
  * @param $sender SettingsController.
  * @return void.
  * @package TwitterBot
  * @since 0.1
  */
 public function settingsController_twitterBot_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $sender->addSideMenu('dashboard/settings/plugins');
     $categories = CategoryModel::categories();
     unset($categories[-1]);
     $roleModel = new RoleModel();
     $userRoles = $roleModel->getArray();
     $configurationModule = new ConfigurationModule($sender);
     $configurationModule->initialize(array('TwitterBot.ConsumerKey' => array('LabelCode' => 'Your applications consumer key', 'Options' => array('class' => 'InputBox BigInput')), 'TwitterBot.ConsumerSecret' => array('LabelCode' => 'The secret for your consumer key', 'Options' => array('class' => 'InputBox BigInput')), 'TwitterBot.OAuthAccessToken' => array('LabelCode' => 'Your oAuth access token', 'Options' => array('class' => 'InputBox BigInput')), 'TwitterBot.OAuthAccessTokenSecret' => array('LabelCode' => 'The secret for your oAuth access token', 'Options' => array('class' => 'InputBox BigInput')), 'TwitterBot.CategoryIDs' => array('Control' => 'CheckBoxList', 'LabelCode' => 'Categories', 'Items' => $categories, 'Description' => 'Tweet discussions from this categories', 'Options' => array('ValueField' => 'CategoryID', 'TextField' => 'Name')), 'TwitterBot.RoleIDs' => array('Control' => 'CheckBoxList', 'LabelCode' => 'User roles', 'Items' => $userRoles, 'Description' => 'Only discussions of this user roles will be published on Twitter', 'Options' => array('ValueField' => 'RoleID', 'TextField' => 'Name')), 'TwitterBot.AnnouncementsOnly' => array('Control' => 'CheckBox', 'LabelCode' => 'Only tweet announcements', 'Default' => true), 'TwitterBot.ShowCheckbox' => array('Control' => 'CheckBox', 'LabelCode' => 'Show checkbox below new discussions', 'Default' => true)));
     $sender->setData('Title', t('TwitterBot Settings'));
     $sender->setData('Description', t('New discussions will automatically appear on your Twitter account. You have to <a href="https://apps.twitter.com/app/new">create a new app</a> and fill the credentials in her to make it work.'));
     $configurationModule->renderAll();
 }