当前位置: 首页>>代码示例>>PHP>>正文


PHP Plugin::get_coll_setting_definitions方法代码示例

本文整理汇总了PHP中Plugin::get_coll_setting_definitions方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::get_coll_setting_definitions方法的具体用法?PHP Plugin::get_coll_setting_definitions怎么用?PHP Plugin::get_coll_setting_definitions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugin的用法示例。


在下文中一共展示了Plugin::get_coll_setting_definitions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

    /**
     * Define here default collection/blog settings that are to be made available in the backoffice.
     *
     * @param array Associative array of parameters.
     * @return array See {@link Plugin::GetDefaultSettings()}.
     */
    function get_coll_setting_definitions(&$params)
    {
        // TODO: Post and comment search/replace lists must be also converted to coll plugin settings
        $default_params = array_merge($params, array('default_comment_rendering' => 'never'));
        return array_merge(parent::get_coll_setting_definitions($default_params), array('coll_post_search_list' => array('label' => $this->T_('Search list for posts'), 'note' => $this->T_('This is the BBcode search array for posts (one per line) ONLY CHANGE THESE IF YOU KNOW WHAT YOU\'RE DOING'), 'type' => 'html_textarea', 'rows' => 10, 'cols' => 60, 'defaultvalue' => '[b] #\\[b](.+?)\\[/b]#is
[i] #\\[i](.+?)\\[/i]#is
[s] #\\[s](.+?)\\[/s]#is
[color] !\\[color=(#?[A-Za-z0-9]+?)](.+?)\\[/color]!is
[size] #\\[size=([0-9]+?)](.+?)\\[/size]#is
[font] #\\[font=([A-Za-z0-9 ;\\-]+?)](.+?)\\[/font]#is
 #\\[quote(=?)](.+?)\\[/quote]#is
 #\\[quote=([^\\]\\#]*?)\\#([cp][0-9]+)](.+?)\\[/quote]#is
[quote] #\\[quote=([^\\]]*?)](.+?)\\[/quote]#is
[list=1] #\\[list=1](.+?)\\[/list]#is
[list=a] #\\[list=a](.+?)\\[/list]#is
[list] #\\[list](.+?)\\[/list]#is
[*] #\\[\\*](.+?)(\\n|\\[/list\\])#is
[bg] !\\[bg=(#?[A-Za-z0-9]+?)](.+?)\\[/bg]!is'), 'coll_post_replace_list' => array('label' => $this->T_('Replace list for posts'), 'note' => $this->T_('This is the replace array for posts (one per line) it must match the exact order of the search array'), 'type' => 'html_textarea', 'rows' => 10, 'cols' => 60, 'defaultvalue' => '<strong>$1</strong>
<em>$1</em>
<span style="text-decoration:line-through">$1</span>
<span style="color:$1">$2</span>
<span style="font-size:$1px">$2</span>
<span style="font-family:$1">$2</span>
<blockquote>$2</blockquote>
<strong class="quote_author">$1 wrote <a href="#$2">earlier</a>:</strong><blockquote>$3</blockquote>
<strong class="quote_author">$1 wrote:</strong><blockquote>$2</blockquote>
<ol type="1">$1</ol>
<ol type="a">$1</ol>
<ul>$1</ul>
<li>$1</li>
<span style="background-color:$1">$2</span>'), 'coll_comment_search_list' => array('label' => $this->T_('Search list for comments'), 'note' => $this->T_('This is the BBcode search array for COMMENTS (one per line) ONLY CHANGE THESE IF YOU KNOW WHAT YOU\'RE DOING'), 'type' => 'html_textarea', 'rows' => 10, 'cols' => 60, 'defaultvalue' => '[b] #\\[b](.+?)\\[/b]#is
[i] #\\[i](.+?)\\[/i]#is
[s] #\\[s](.+?)\\[/s]#is
[color] !\\[color=(#?[A-Za-z0-9]+?)](.+?)\\[/color]!is
[size] #\\[size=([0-9]+?)](.+?)\\[/size]#is
[font] #\\[font=([A-Za-z0-9 ;\\-]+?)](.+?)\\[/font]#is
 #\\[quote(=?)](.+?)\\[/quote]#is
 #\\[quote=([^\\]\\#]*?)\\#([cp][0-9]+)](.+?)\\[/quote]#is
[quote] #\\[quote=([^\\]]*?)](.+?)\\[/quote]#is
[list=1] #\\[list=1](.+?)\\[/list]#is
[list=a] #\\[list=a](.+?)\\[/list]#is
[list] #\\[list](.+?)\\[/list]#is
[*] #\\[\\*](.+?)(\\n|\\[/list\\])#is
[bg] !\\[bg=(#?[A-Za-z0-9]+?)](.+?)\\[/bg]!is'), 'coll_comment_replace_list' => array('label' => $this->T_('Replace list for comments'), 'note' => $this->T_('This is the replace array for COMMENTS (one per line) it must match the exact order of the search array'), 'type' => 'html_textarea', 'rows' => 10, 'cols' => 60, 'defaultvalue' => '<strong>$1</strong>
<em>$1</em>
<span style="text-decoration:line-through">$1</span>
<span style="color:$1">$2</span>
<span style="font-size:$1px">$2</span>
<span style="font-family:$1">$2</span>
<blockquote>$2</blockquote>
<strong class="quote_author">$1 wrote <a href="#$2">earlier</a>:</strong><blockquote>$3</blockquote>
<strong class="quote_author">$1 wrote:</strong><blockquote>$2</blockquote>
<ol type="1">$1</ol>
<ol type="a">$1</ol>
<ul>$1</ul>
<li>$1</li>
<span style="background-color:$1">$2</span>')));
    }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:64,代码来源:_bbcode.plugin.php

示例2: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::get_coll_setting_definitions()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_params = array('default_post_rendering' => 'opt-in');
     if (isset($params['blog_type']) && $params['blog_type'] == 'manual') {
         // Set the default settings depends on blog type
         $default_params['default_post_rendering'] = 'opt-out';
     }
     return parent::get_coll_setting_definitions(array_merge($params, $default_params));
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:15,代码来源:_wikitables.plugin.php

示例3: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::get_coll_setting_definitions()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_values = array('default_post_rendering' => 'opt-in');
     if (!empty($params['blog_type']) && $params['blog_type'] != 'forum') {
         // Set the default settings depends on blog type
         $default_values['default_comment_rendering'] = 'never';
     }
     $default_params = array_merge($params, $default_values);
     return array_merge(parent::get_coll_setting_definitions($default_params), array('link_without_brackets' => array('label' => $this->T_('Links without brackets'), 'type' => 'checkbox', 'defaultvalue' => 0, 'note' => $this->T_('Enable this to create the links from words like WikiWord without brackets [[]]'))));
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:16,代码来源:_wikilinks.plugin.php

示例4: array

 function get_coll_setting_definitions(&$params)
 {
     $addons_settings = array();
     foreach ($this->available_addons as $addon) {
         $classname = $this->class_prefix . $addon[0];
         $addons_settings = array_merge($classname::get_coll_setting_definitions(), $addons_settings);
     }
     $default_params = array_merge($params, array('default_comment_rendering' => 'never', 'default_post_rendering' => 'opt-in'));
     $plugin_settings = array('enabled_addon' => array('label' => T_('Your sharing service'), 'type' => 'radio', 'options' => $this->available_addons, 'field_lines' => true, 'note' => ''));
     return array_merge($plugin_settings, $addons_settings, parent::get_coll_setting_definitions($default_params));
 }
开发者ID:b2evolution,项目名称:socialshare_plugin,代码行数:11,代码来源:_socialshare.plugin.php

示例5: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::GetDefaultSettings()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_params = array('default_comment_rendering' => 'never');
     if (isset($params['blog_type'])) {
         // Set the default settings depending on collection type:
         switch ($params['blog_type']) {
             case 'forum':
             case 'manual':
                 $default_params['default_post_rendering'] = 'never';
                 break;
         }
     }
     return parent::get_coll_setting_definitions(array_merge($params, $default_params));
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:20,代码来源:_widescroll.plugin.php

示例6: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::get_coll_setting_definitions()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_params = array_merge($params, array('default_post_rendering' => 'opt-in'));
     return parent::get_coll_setting_definitions($default_params);
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_smilies.plugin.php

示例7: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::get_coll_setting_definitions()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     return array_merge(parent::get_coll_setting_definitions($params), array('skin' => array('label' => T_('Skin'), 'type' => 'select', 'options' => $this->get_skins_list(), 'defaultvalue' => 'minimalist'), 'width' => array('label' => T_('Video width (px)'), 'note' => T_('100% width if left empty or 0')), 'height' => array('label' => T_('Video height (px)'), 'type' => 'integer', 'defaultvalue' => 300, 'note' => '', 'valid_range' => array('min' => 1)), 'allow_download' => array('label' => T_('Allow downloading of the video file'), 'type' => 'checkbox', 'defaultvalue' => 0), 'disp_caption' => array('label' => T_('Display caption'), 'note' => T_('Check to display the video file caption under the video player.'), 'type' => 'checkbox', 'defaultvalue' => 0)));
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:10,代码来源:_flowplayer.plugin.php

示例8: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::GetDefaultSettings()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_values = array('autolink_defs_coll_db' => '', 'autolink_username' => 1, 'autolink_post_nofollow_exist' => 0, 'autolink_post_nofollow_explicit' => 0, 'autolink_post_nofollow_auto' => 0, 'autolink_comment_nofollow_exist' => 1, 'autolink_comment_nofollow_explicit' => 1, 'autolink_comment_nofollow_auto' => 0);
     if (!empty($params['blog_type'])) {
         // Set the default settings depends on blog type
         switch ($params['blog_type']) {
             case 'forum':
             case 'manual':
                 $default_values['autolink_post_nofollow_exist'] = 1;
                 $default_values['autolink_post_nofollow_explicit'] = 1;
                 break;
         }
     }
     // set params to allow rendering for comments by default
     $default_params = array_merge($params, array('default_comment_rendering' => 'stealth'));
     return array_merge(parent::get_coll_setting_definitions($default_params), array('autolink_defs_coll_db' => array('label' => T_('Custom autolink definitions'), 'type' => 'html_textarea', 'rows' => 15, 'note' => $this->T_('Enter custom definitions above.'), 'defaultvalue' => $default_values['autolink_defs_coll_db']), 'autolink_username' => array('label' => T_('Autolink usernames'), 'type' => 'checkbox', 'note' => $this->T_('@username will link to the user profile page'), 'defaultvalue' => $default_values['autolink_username']), 'autolink_post_nofollow_exist' => array('label' => T_('No follow in posts'), 'type' => 'checkbox', 'note' => $this->T_('Add rel="nofollow" to pre-existings links'), 'defaultvalue' => $default_values['autolink_post_nofollow_exist']), 'autolink_post_nofollow_explicit' => array('label' => '', 'type' => 'checkbox', 'note' => $this->T_('Add rel="nofollow" to explicit links'), 'defaultvalue' => $default_values['autolink_post_nofollow_explicit']), 'autolink_post_nofollow_auto' => array('label' => '', 'type' => 'checkbox', 'note' => $this->T_('Add rel="nofollow" to auto-links'), 'defaultvalue' => $default_values['autolink_post_nofollow_auto']), 'autolink_comment_nofollow_exist' => array('label' => T_('No follow in comments'), 'type' => 'checkbox', 'note' => $this->T_('Add rel="nofollow" to pre-existings links'), 'defaultvalue' => $default_values['autolink_comment_nofollow_exist']), 'autolink_comment_nofollow_explicit' => array('label' => '', 'type' => 'checkbox', 'note' => $this->T_('Add rel="nofollow" to explicit links'), 'defaultvalue' => $default_values['autolink_comment_nofollow_explicit']), 'autolink_comment_nofollow_auto' => array('label' => '', 'type' => 'checkbox', 'note' => $this->T_('Add rel="nofollow" to auto-links'), 'defaultvalue' => $default_values['autolink_comment_nofollow_auto'])));
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:23,代码来源:_autolinks.plugin.php

示例9: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @return array See {@link Plugin::GetDefaultSettings()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_params = array_merge($params, array('default_comment_rendering' => 'never', 'default_post_rendering' => 'opt-out'));
     return array_merge(parent::get_coll_setting_definitions($default_params), array('coll_min_width' => array('label' => 'Min width', 'type' => 'integer', 'size' => 4, 'defaultvalue' => 400, 'note' => T_('Enter the minimum pixel width an image must have for dots to be displayed.'))));
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:10,代码来源:_infodots.plugin.php

示例10: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::get_coll_setting_definitions()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $domain = preg_replace('/^www\\./', '', $_SERVER['HTTP_HOST']);
     //	global $Blog;
     return array_merge(parent::get_coll_setting_definitions($params), array('card_type' => array('label' => T_('Card Type'), 'note' => T_('The card type'), 'type' => 'select', 'options' => array('summary' => T_('Summary Card'), 'summary_large_image' => T_('Summary Card with Large Image')), 'defaultvalue' => 'summary_large_image'), 'site_id' => array('label' => T_('Site ID'), 'size' => 25, 'note' => T_('REQUIRED. @username of website.'), 'defaultvalue' => $domain)));
 }
开发者ID:eminozlem,项目名称:twitter_card_plugin,代码行数:12,代码来源:_twitter_card.plugin.php

示例11: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::get_coll_setting_definitions()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_params = array_merge($params, array('default_comment_rendering' => 'never', 'default_post_rendering' => 'opt-in'));
     return array_merge(parent::get_coll_setting_definitions($default_params), array('links' => array('label' => T_('Links'), 'type' => 'checkbox', 'note' => T_('Detect and convert markdown link markup.'), 'defaultvalue' => 0), 'images' => array('label' => T_('Images'), 'type' => 'checkbox', 'note' => T_('Detect and convert markdown image markup.'), 'defaultvalue' => 0), 'text_styles' => array('label' => T_('Italic & Bold styles'), 'type' => 'checkbox', 'note' => T_('Detect and convert markdown italics and bold markup.'), 'defaultvalue' => 0), 'min_h_level' => array('label' => T_('Top Heading Level'), 'type' => 'integer', 'size' => 1, 'maxlength' => 1, 'note' => T_('This plugin will adjust headings so they always start at the level you want: 1 for &lt;H1&gt;, 2 for &lt;H2&gt;, etc.'), 'defaultvalue' => 1, 'valid_range' => array('min' => 1, 'max' => 6))));
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_markdown.plugin.php

示例12: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @param array Associative array of parameters.
  * @return array See {@link Plugin::get_coll_setting_definitions()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $default_params = array_merge($params, array('default_post_rendering' => 'opt-in'));
     return array_merge(parent::get_coll_setting_definitions($default_params), array('min_h_level' => array('label' => T_('Top Heading Level'), 'type' => 'integer', 'size' => 1, 'maxlength' => 1, 'note' => T_('This plugin will adjust headings so they always start at the level you want: 2 for &lt;H2&gt;, 3 for &lt;H3&gt;, etc.'), 'defaultvalue' => 2, 'valid_range' => array('min' => 2, 'max' => 6))));
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_wacko.plugin.php

示例13: array

 /**
  * Define here default collection/blog settings that are to be made available in the backoffice.
  *
  * @return array See {@link Plugin::GetDefaultSettings()}.
  */
 function get_coll_setting_definitions(&$params)
 {
     $r = array('coll_adsense_block' => array('label' => 'AdSense block', 'type' => 'html_textarea', 'cols' => 60, 'rows' => 10, 'defaultvalue' => $this->Settings->get('adsense_block'), 'note' => 'Copy/Paste your AdSense code from Google into here. You can surround it with some CSS for decoration and/or positionning.'), 'coll_max_blocks_in_content' => array('label' => 'Max # of blocks', 'type' => 'integer', 'size' => 2, 'maxlength' => 2, 'defaultvalue' => $this->Settings->get('max_blocks_in_content'), 'note' => T_('Maximum number of AdSense blocks the plugin should expand in post contents. Google terms typically set the limit to 3. You may wish to set it to less if you add blocks into the sidebar.')));
     return array_merge(parent::get_coll_setting_definitions($params), $r);
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:10,代码来源:_adsense.plugin.php

示例14: array

 function get_coll_setting_definitions(&$params)
 {
     $default_params = array_merge($params, array('default_post_rendering' => 'opt-out'));
     $plugin_settings = array('sharethis_enabled' => array('label' => T_('Enabled'), 'type' => 'checkbox', 'note' => 'Is the plugin enabled for this collection?'), 'sharethis_publisher_id' => array('label' => 'Sharethis ' . T_('Publisher ID'), 'size' => 70, 'defaultvalue' => '', 'size' => 36, 'maxlength' => 36, 'note' => T_('This is you publisher ID in the format &laquo;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&raquo;; which you can find in the code provided by ShareThis'), 'valid_pattern' => '#\\w{8}-(\\w{4}-){3}\\w{12}#'), 'sharethis_usechicklets' => array('label' => T_('Use chicklets'), 'type' => 'checkbox'), 'sharethis_iconsstyle' => array('label' => T_('Style'), 'type' => 'select', 'options' => array('standard' => T_('Standard'), 'large' => T_('Large'), 'button' => T_('Button')), 'defaultvalue' => 'standard'), 'sharethis_services' => array('label' => T_('Services'), 'type' => 'text', 'defaultvalue' => 'sharethis,twitter,facebook,pinterest,linkedin', 'size' => 100));
     return array_merge($plugin_settings, parent::get_coll_setting_definitions($default_params));
 }
开发者ID:b2evolution,项目名称:sharethis_plugin,代码行数:6,代码来源:_sharethis.plugin.php

示例15: array

 function get_coll_setting_definitions(&$params)
 {
     $default_params = array_merge($params, array('default_post_rendering' => 'opt-out'));
     $plugin_settings = array('shareaholic_enabled' => array('label' => T_('Enabled'), 'type' => 'checkbox', 'note' => 'Is the plugin enabled for this collection?'), 'shareaholic_site_id' => array('label' => T_('Site ID'), 'size' => 70, 'defaultvalue' => '', 'note' => T_('The ID that you get from your social sharing service.')), 'shareaholic_applocation_app_id' => array('label' => T_('Location APP ID'), 'size' => 70, 'defaultvalue' => '', 'note' => T_('The Id of the location created for your site in the Shareaholic\'s Dashboard. See documentation for details.')));
     return array_merge($plugin_settings, parent::get_coll_setting_definitions($default_params));
 }
开发者ID:b2evolution,项目名称:shareaholic_plugin,代码行数:6,代码来源:_shareaholic.plugin.php


注:本文中的Plugin::get_coll_setting_definitions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。