Zurmo is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. Zurmo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com. The interactive user interfaces in original and modified versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License version 3. In accordance with Section 7(b) of the GNU Affero General Public License version 3, these Appropriate Legal Notices must retain the display of the Zurmo logo and Zurmo copyright notice. If the display of the logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices must display the words "Copyright Zurmo Inc. 2015. All rights reserved". ******************************************************************************
상속: extends SecurableModule
 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_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();
 }
예제 #3
0
 /**
  * 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();
 }
 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();
 }
 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();
 }
예제 #6
0
파일: default.php 프로젝트: sitexa/vanilla
 /**
  * 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();
 }
예제 #7
0
 /**
  * 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();
 }
 /**
  * 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();
 }
예제 #10
0
 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();
 }
예제 #11
0
 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');
 }
예제 #12
0
파일: class.hooks.php 프로젝트: austins/VWP
 /**
  * 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_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_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();
    }
예제 #16
0
 /**
  *
  * @param  object $sender SettingsController.
  * @return void.
  * @package Shariff
  * @since 0.1
  */
 public function settingsController_shariff_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $sender->addSideMenu('dashboard/settings/plugins');
     $sender->title(t('Shariff Settings'));
     $sender->setData('Description', t('Shariff Setup Description'));
     // Save values to config.
     if ($sender->Form->authenticatedPostBack()) {
         $formPostValues = $sender->Form->formValues();
         $services = $formPostValues['Shariff.Services'];
         $dataServices = '[&quot;' . implode('&quot;,&quot;', $services) . '&quot;]';
         saveToConfig('Shariff.Services', $services);
         saveToConfig('Shariff.DataServices', $dataServices);
         saveToConfig('Shariff.Theme', $formPostValues['Shariff.Theme']);
     }
     $sender->Form->setData(array('Shariff.Services' => c('Shariff.Services'), 'Shariff.Theme' => c('Shariff.Theme')));
     $configurationModule = new ConfigurationModule($sender);
     // fill in all the info that is needed to build the settings view
     $configurationModule->schema(array('Shariff.Services' => array('Control' => 'CheckBoxList', 'Description' => t('Check services that should be enabled.'), 'Items' => array('facebook' => 'facebook', 'Google+' => 'googleplus', 'LinkedIn' => 'linkedin', t('E-Mail') => 'mail', 'Twitter' => 'twitter', 'Pinterest' => 'pinterest', 'WhatsApp' => 'whatsapp', 'Xing' => 'xing'), 'LabelCode' => 'Services'), 'Shariff.Theme' => array('Control' => 'DropDown', 'Items' => array('standard' => t('Standard'), 'grey' => t('Grey'), 'white' => t('White')), 'LabelCode' => 'Theme', 'Options' => array('IncludeNull' => false))));
     $configurationModule->renderAll();
 }
예제 #17
0
 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();
 }
예제 #18
0
 /**
  * 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();
 }
예제 #19
0
 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();
 }
예제 #21
0
 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();
 }
예제 #22
0
 /**
  *
  *
  * @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();
 }
예제 #23
0
 /**
  * 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();
 }
 /**
  * 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();
 }
 /**
  * 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();
 }
예제 #26
0
 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();
 }
예제 #27
0
 /**
  * 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();
 }
예제 #28
0
 /**
  *
  *
  * @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');
 }
예제 #29
0
 /**
  *
  * @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();
 }
예제 #30
0
 /**
  * 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();
 }