public function SettingsController_MentionsPlus_Create($Sender)
 {
     $Sender->Permission('Garden.Settings.Manage');
     $Sender->SetData('Title', T('Mentions+ Settings'));
     $Sender->AddSideMenu('dashboard/settings/plugins');
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('Garden.User.ValidationRegex' => array('LabelCode' => 'Letters allowed in user name', 'Control' => 'TextBox', 'Default' => '\\d\\w_ äöüß', 'Description' => T('Settings ValidationRegex Description', 'Regular expression that evaluates a valid username (<a href="http://www.php.net/manual/en/ref.pcre.php">regex</a>)')), 'Garden.User.ValidationLength' => array('LabelCode' => 'Min/max length of user names', 'Control' => 'TextBox', 'Default' => '{3,20}', 'Description' => T('Settings ValidationLength Description', 'Minimum and maximum length of user names in <a href="http://www.php.net/manual/en/ref.pcre.php">regex</a> notation')), 'Plugins.MentionsPlus.MentionStart' => array('LabelCode' => 'Beginning escape character', 'Control' => 'TextBox', 'Default' => '"', 'Description' => T('Settings MentionStart Description', 'If using whitespaces in usernames you have to mark what belongs to a username: @"hans wurst".<br /><strong>Enter only one single character!</strong>')), 'Plugins.MentionsPlus.MentionStop' => array('LabelCode' => 'Ending escape character', 'Control' => 'TextBox', 'Default' => '"', 'Description' => T('Settings MentionStop Description', 'If you would like to use different characters for escaping, you could set them separately: @{hans wurst}.<br /><strong>Enter only one single character!</strong>')), 'Plugins.MentionsPlus.MeActionCode' => array('LabelCode' => '/me action code', 'Control' => 'TextBox', 'Default' => '/me', 'Description' => T('Settings MeActionCode Description', 'By default "/me" is not translatable. In theory, you could set it to "->ich" or anything you like with this setting.<br /><strong>This feature is not tested at all!</strong>'))));
     $Conf->RenderAll();
 }
Exemple #2
0
 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_ThemeChooser_Create($Sender)
 {
     $Sender->Permission('Garden.Settings.Manage');
     $Sender->SetData('Title', T('ThemeChooser Settings'));
     $Sender->AddSideMenu('dashboard/settings/plugins');
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('ThemeChooser.DefaultThemeCSS' => array('Control' => 'textbox', 'LabelCode' => 'Default theme CSS file', 'Default' => 'custom'), 'ThemeChooser.DefaultThemeName' => array('Control' => 'textbox', 'LabelCode' => 'Default theme name', 'Default' => 'Custom'), 'ThemeChooser.ThemeFiles' => array('Control' => 'textbox', 'LabelCode' => 'CSS Files separated by a comma without whitespace and without file ending', 'Default' => 'custom,dark,light'), 'ThemeChooser.ThemeNames' => array('Control' => 'textbox', 'LabelCode' => 'Theme names, separated by a comma without whitespace. Must match list above', 'Default' => 'Custom Theme,Dark theme,Light theme'), 'ThemeChooser.Mobile' => array('Control' => 'CheckBox', 'LabelCode' => 'Enable on mobile devices', 'Default' => false)));
     $Conf->RenderAll();
 }
 /**
  * This handles all the core settings for the gamification application.
  */
 public function Settings()
 {
     $this->Permission('Garden.Settings.Manage');
     $this->Title(T('Yaga.Settings'));
     // Get list of actions from the model and pass to the view
     $ConfigModule = new ConfigurationModule($this);
     $ConfigModule->Initialize(array('Yaga.Reactions.Enabled' => array('LabelCode' => 'Yaga.Reactions.Use', 'Control' => 'Checkbox'), 'Yaga.Badges.Enabled' => array('LabelCode' => 'Yaga.Badges.Use', 'Control' => 'Checkbox'), 'Yaga.Ranks.Enabled' => array('LabelCode' => 'Yaga.Ranks.Use', 'Control' => 'Checkbox'), 'Yaga.LeaderBoard.Enabled' => array('LabelCode' => 'Yaga.LeaderBoard.Use', 'Control' => 'Checkbox'), 'Yaga.LeaderBoard.Limit' => array('LabelCode' => 'Yaga.LeaderBoard.Max', 'Control' => 'Textbox', 'Options' => array('Size' => 45, 'class' => 'SmallInput'))));
     $this->ConfigurationModule = $ConfigModule;
     $this->Render();
 }
 public function SettingsController_Voting_Create($Sender)
 {
     $Sender->Permission('Garden.Settings.Manage');
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('Plugins.Voting.ModThreshold1' => array('Type' => 'int', 'Control' => 'TextBox', 'Default' => -10, 'Description' => 'The vote that will flag a post for moderation.'), 'Plugins.Voting.ModThreshold2' => array('Type' => 'int', 'Control' => 'TextBox', 'Default' => -20, 'Description' => 'The vote that will remove a post to the moderation queue.')));
     $Sender->AddSideMenu('settings/voting');
     $Sender->SetData('Title', T('Vote Settings'));
     $Sender->ConfigurationModule = $Conf;
     $Conf->RenderAll();
 }
 public function SettingsController_Solr_Create($Sender, $Args = array())
 {
     $Sender->Permission('Garden.Settings.Manage');
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('Plugins.Solr.SearchUrl' => array('Default' => 'http://localhost:8983/solr/select/?')));
     $Sender->AddSideMenu();
     $Sender->SetData('Title', T('Solr Search Settings'));
     $Sender->ConfigurationModule = $Conf;
     //      $Conf->RenderAll();
     $Sender->Render('Settings', '', 'plugins/Solr');
 }
    public function SettingsController_ImgurUpload_Create($Sender)
    {
        $Sender->Permission('Garden.Plugins.Manage');
        $Sender->AddSideMenu('dashboard/settings/plugins');
        $Sender->Title('ImgurUpload');
        $ConfigurationModule = new ConfigurationModule($Sender);
        $ConfigurationModule->RenderAll = True;
        $Schema = array('Plugins.ImgurUpload.ClientID' => array('LabelCode' => 'Imgur API Client ID', 'Control' => 'TextBox', 'Default' => C('Plugins.ImgurUpload.ClientID', ''), 'Description' => 'Register for Imgur API access at: <a href="https://api.imgur.com/oauth2/addclient">https://api.imgur.com/oauth2/addclient</a>'), 'Plugins.ImgurUpload.ProcessImageURLs' => array('LabelCode' => 'Process image URLs', 'Control' => 'Checkbox', 'Default' => C('Plugins.ImgurUpload.ProcessImageURLs', ''), 'Description' => 'Check the below checkbox to have the plugin attempt to identify when the user is dragging in an image URL.
												This is usually if the user is dragging an image across from another web page.
												If an image URL is detected, it will be wrapped with image markup.'), 'Plugins.ImgurUpload.ResizeImages' => array('LabelCode' => 'Resize images', 'Control' => 'Checkbox', 'Default' => C('Plugins.ImgurUpload.ResizeImages', ''), 'Description' => 'Check the below checkbox to display resized images that link to the original resolution image. Useful for speeding up page load when users are uploading lots of photos from phone cameras etc.'), 'Plugins.ImgurUpload.ShowImagesBtn' => array('LabelCode' => 'Show \'Add Images\' button on desktop', 'Control' => 'Checkbox', 'Default' => C('Plugins.ImgurUpload.ShowImagesBtn', '1'), 'Description' => 'Check the below checkbox to display the \'Add Images\' button on desktop. If not checked, only mobile/touchscreen users will see the button. Desktop users will only be able to upload via drag\'n\'drop.'), 'Plugins.ImgurUpload.EnableDragDrop' => array('LabelCode' => 'Allow drag\'n\'drop', 'Control' => 'Checkbox', 'Default' => C('Plugins.ImgurUpload.EnableDragDrop', '1'), 'Description' => 'Check the below checkbox to allow images to be drag\'n\'dropped onto the comment box.'));
        $ConfigurationModule->Schema($Schema);
        $ConfigurationModule->Initialize();
        $Sender->View = dirname(__FILE__) . DS . 'views' . DS . 'settings.php';
        $Sender->ConfigurationModule = $ConfigurationModule;
        $Sender->Render();
    }
 public function SettingsController_Mollom_Create($Sender, $Args = array())
 {
     $Sender->Permission('Garden.Settings.Manage');
     $Sender->SetData('Title', T('Mollom Settings'));
     $Cf = new ConfigurationModule($Sender);
     $Cf->Initialize(array('Plugins.Mollom.publicKey' => array(), 'Plugins.Mollom.privateKey' => array()));
     $Sender->AddSideMenu('settings/plugins');
     $Cf->RenderAll();
 }
 public function settingsController_signatures_create($Sender)
 {
     $Sender->permission('Garden.Settings.Manage');
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('Plugins.Signatures.HideGuest' => array('Control' => 'CheckBox', 'LabelCode' => 'Hide signatures for guests'), 'Plugins.Signatures.HideEmbed' => array('Control' => 'CheckBox', 'LabelCode' => 'Hide signatures on embedded comments', 'Default' => true), 'Plugins.Signatures.HideMobile' => array('Control' => 'CheckBox', 'LabelCode' => 'Hide signatures on mobile', 'Default' => true), 'Plugins.Signatures.AllowEmbeds' => array('Control' => 'CheckBox', 'LabelCode' => 'Allow embedded content', 'Default' => true), 'Plugins.Signatures.Default.MaxNumberImages' => array('Control' => 'Dropdown', 'LabelCode' => '@' . sprintf(T('Max number of %s'), T('images')), 'Items' => array('Unlimited' => T('Unlimited'), 'None' => T('None'), 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5)), 'Plugins.Signatures.Default.MaxLength' => array('Control' => 'TextBox', 'Type' => 'int', 'LabelCode' => '@' . sprintf(T('Max %s length'), T('signature')), 'Options' => array('class' => 'InputBox SmallInput')), 'Plugins.Signatures.MaxImageHeight' => array('Control' => 'TextBox', 'LabelCode' => '@' . sprintf(T('Max height of %s'), T('images')) . " " . T('in pixels'), 'Options' => array('class' => 'InputBox SmallInput'))));
     $this->SetConfigSettingsToDefault('Plugins.Signatures', $this->overriddenConfigSettings);
     $Sender->AddSideMenu();
     $Sender->SetData('Title', sprintf(T('%s Settings'), T('Signature')));
     $Sender->ConfigurationModule = $Conf;
     $Conf->RenderAll();
     //      $Sender->Render('Settings', '', 'plugins/AmazonS3');
 }
 public function SettingsController_InfiniteScroll_Create($Sender)
 {
     $Sender->Permission('Garden.Settings.Manage');
     $Sender->SetData('Title', T('InfiniteScroll Settings'));
     $Sender->AddSideMenu('dashboard/settings/plugins');
     $Sender->AddJsFile('settings.js', 'plugins/InfiniteScroll');
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('InfiniteScroll.Discussion' => array('Control' => 'CheckBox', 'LabelCode' => 'Enable on discussions', 'Default' => true), 'InfiniteScroll.DiscussionList' => array('Control' => 'CheckBox', 'LabelCode' => 'Enable on discussion lists', 'Default' => true), 'InfiniteScroll.Mobile' => array('Control' => 'CheckBox', 'LabelCode' => 'Enable on mobile devices', 'Default' => false), 'InfiniteScroll.Hotkey' => array('Control' => 'textbox', 'LabelCode' => 'Page Jump Hotkey', 'Default' => 'j', 'Options' => array('maxlength' => '1', 'style' => 'width:15px;')), 'InfiniteScroll.NavPosition' => array('Control' => 'dropdown', 'Items' => array('bottom right', 'top right', 'bottom left', 'top left'), 'LabelCode' => 'Navigation Position'), 'InfiniteScroll.NavStyle' => array('Control' => 'dropdown', 'Items' => array('Basic', 'Discourse-inspired'), 'LabelCode' => 'Navigation Style'), 'InfiniteScroll.ProgressColor' => array('Control' => 'textbox', 'LabelCode' => 'Progress Bar Color', 'Description' => T('Can be any CSS color. If you don\'t want the bar to be visible, simply enter "transparent".'), 'Default' => '#38abe3', 'Options' => array('maxlength' => '35', 'style' => 'width:160px;'))));
     $Conf->RenderAll();
 }
 public function SettingsController_Akismet_Create($Sender, $Args = array())
 {
     // 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);
     $Cf->Initialize(array('Plugins.Akismet.Key' => array('Description' => $KeyDesc), 'Plugins.Akismet.Server' => array('Description' => 'You can use either Akismet or TypePad antispam.', 'Control' => 'DropDown', 'Items' => array('' => 'Aksimet', 'api.antispam.typepad.com' => 'TypePad', 'DefaultValue' => ''))));
     $Sender->AddSideMenu('dashboard/settings/plugins');
     $Cf->RenderAll();
 }
 public function SettingsController_SteamConnect_Create($Sender)
 {
     $Sender->Permission('Garden.Settings.Manage');
     $APIKeyDescription = '<div class="help">' . sprintf(T('A %s is necessary for this plugin to work.'), T('Steam Web API Key')) . ' ' . sprintf(T('Don\'t have a %s?'), T('Steam Web API Key')) . ' <a href="http://steamcommunity.com/dev/apikey">' . T('Get one here.') . '</a>';
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('Plugins.SteamConnect.APIKey' => array('Control' => 'TextBox', 'LabelCode' => 'Steam Web API Key', 'Options' => array('class' => 'InputBox BigInput'), 'Description' => $APIKeyDescription)));
     $Sender->AddSideMenu();
     $Sender->SetData('Title', sprintf(T('%s Settings'), T('Steam Connect')));
     $Sender->ConfigurationModule = $Conf;
     $Conf->RenderAll();
 }
 /**
  * Settings page.
  */
 public function SettingsController_ProfileExtender_Create($Sender)
 {
     $Conf = new ConfigurationModule($Sender);
     $Conf->Initialize(array('Plugins.ProfileExtender.ProfileFields' => array('Control' => 'TextBox', 'Options' => array('MultiLine' => TRUE)), 'Plugins.ProfileExtender.RegistrationFields' => array('Control' => 'TextBox', 'Options' => array('MultiLine' => TRUE)), 'Plugins.ProfileExtender.HideFields' => array('Control' => 'TextBox', 'Options' => array('MultiLine' => TRUE)), 'Plugins.ProfileExtender.TextMaxLength' => array('Control' => 'TextBox')));
     $Sender->AddSideMenu('settings/profileextender');
     $Sender->SetData('Title', T('Profile Fields'));
     $Sender->ConfigurationModule = $Conf;
     $Conf->RenderAll();
 }