/** * Setups the default panel. */ function main() { $qscfg = plugin_getoptions('qspam'); $qscfg['wordlist'] = isset($qscfg['wordlist']) && is_array($qscfg['wordlist']) ? implode("\n", $qscfg['wordlist']) : ''; $qscfg['number'] = isset($qscfg['number']) ? $qscfg['number'] : 1; $this->smarty->assign('qscfg', $qscfg); }
/** * Setups the default panel. */ function main() { $bbconf = plugin_getoptions('bbcode'); // pass sane values to form... is this really needed? $this->smarty->assign('bbchecked', array(isset($bbconf['escape-html']) && $bbconf['escape-html'] ? 1 : 0, isset($bbconf['escape-html']) && $bbconf['comments'] ? 1 : 0, isset($bbconf['escape-html']) && $bbconf['editor'] ? 1 : 0)); $bbconf['number'] = isset($bbconf['url-maxlen']) && is_numeric($bbconf['url-maxlen']) ? $bbconf['url-maxlen'] : 40; $this->smarty->assign('bbconf', $bbconf); }
/** * Setups the plugin. */ function plugin_bbcode_startup() { // defintions part // load options $bbconf = plugin_getoptions('bbcode'); // get defaults if not configured define('BBCODE_ALLOW_HTML', isset($bbconf['escape-html']) ? $bbconf['escape-html'] : true); define('BBCODE_ENABLE_COMMENTS', isset($bbconf['comments']) ? $bbconf['comments'] : false); define('BBCODE_USE_EDITOR', isset($bbconf['editor']) ? $bbconf['editor'] : true); define('BBCODE_URL_MAXLEN', isset($bbconf['url-maxlen']) ? $bbconf['url-maxlen'] : 40); if (!file_exists('getfile.php')) { define('BBCODE_USE_WRAPPER', false); } else { $funcs = explode(',', ini_get('disable_functions')); if (in_array('readfile', $funcs)) { define('BBCODE_USE_WRAPPER', false); } else { define('BBCODE_USE_WRAPPER', true); } } // filter part #add_filter('comment_text', 'plugin_bbcode_comment'); add_filter('title_save_pre', 'wp_specialchars', 1); if (!BBCODE_ALLOW_HTML) { add_filter('content_save_pre', 'wp_specialchars', 1); } add_filter('pre_comment_author_name', 'wp_specialchars'); add_filter('pre_comment_content', 'wp_specialchars'); add_filter('the_content', 'BBCode', 1); add_filter('the_excerpt', 'BBCode', 1); add_filter('the_content', 'plugin_bbcode_undoHtml', 30); if (BBCODE_USE_EDITOR) { add_filter('editor_toolbar', 'plugin_bbcode_toolbar'); } if (BBCODE_ENABLE_COMMENTS) { add_filter('comment_text', 'plugin_bbcode_comment', 1); } }
function setup() { $this->smarty->assign('admin_resource', "plugin:prettyurls/admin.plugin.prettyurls"); $this->_config['mode'] = plugin_getoptions('prettyurls', 'mode'); $this->smarty->assign('pconfig', $this->_config); $blogroot = BLOG_ROOT; $f = ABS_PATH . '.htaccess'; $txt = io_load_file($f); if (!$txt) { $txt = <<<STR # Thanks again WP :) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase {$blogroot} RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . {$blogroot}index.php [L] </IfModule> STR; } $this->smarty->assign('cantsave', !is_writable(ABS_PATH) || file_exists($f) && !is_writable($f)); $this->smarty->assign('htaccess', $txt); }
function main() { $akismetconf = plugin_getoptions('akismet'); $this->smarty->assign('akismetconf', $akismetconf); }
function setup() { $this->smarty->assign('admin_resource', "plugin:blockparser/admin.plugin.blockparser"); $this->smarty->assign('enabledlist', $this->bp_enabled = plugin_getoptions('blockparser', 'pages')); }