Ejemplo n.º 1
0
    /**
     * 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>')));
    }
Ejemplo n.º 2
0
 /**
  * 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));
 }
Ejemplo n.º 3
0
 /**
  * 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 [[]]'))));
 }
 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));
 }
Ejemplo n.º 5
0
 /**
  * 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));
 }
Ejemplo n.º 6
0
 /**
  * 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);
 }
Ejemplo n.º 7
0
 /**
  * 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)));
 }
Ejemplo n.º 8
0
 /**
  * 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'])));
 }
Ejemplo n.º 9
0
 /**
  * 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.'))));
 }
 /**
  * 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)));
 }
Ejemplo n.º 11
0
 /**
  * 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))));
 }
Ejemplo n.º 12
0
 /**
  * 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))));
 }
Ejemplo n.º 13
0
 /**
  * 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);
 }
 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));
 }
 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));
 }
Ejemplo n.º 16
0
 function get_coll_setting_definitions(&$params)
 {
     $default_params = array_merge($params, array('default_post_rendering' => 'opt-out'));
     $plugin_settings = array('addthis_enabled' => array('label' => T_('Enabled'), 'type' => 'checkbox', 'note' => 'Is the plugin enabled for this collection?'), 'addthis_publisher_id' => array('label' => T_('Addthis PubID'), 'size' => 70, 'defaultvalue' => '', 'note' => T_('The ID that you get from your social sharing service.')));
     return array_merge($plugin_settings, parent::get_coll_setting_definitions($default_params));
 }