1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71:
<?php
$plugin_is_filter = 5 | ADMIN_PLUGIN;
$plugin_description = gettext('SEO <em>Null</em> filter.');
$plugin_notice = gettext('The only translation performed is one or more <em>white space</em> characters are converted to a <em>hyphen</em>.');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_disable = (zp_has_filter('seoFriendly') && !extensionEnabled('seo_null')) ? sprintf(gettext('Only one SEO filter plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), stripSuffix(get_filterScript('seoFriendly'))) : '';
$plugin_category = gettext('SEO');
zp_register_filter('seoFriendly', 'null_seo::filter');
zp_register_filter('seoFriendly_js', 'null_seo::js');
class null_seo {
function __construct() {
}
function getOptionsSupported() {
}
function handleOption($option, $currentValue) {
}
static function filter($string) {
$string = preg_replace("/\s+/", "-", $string);
return $string;
}
static function js($string) {
$js = "
function seoFriendlyJS(fname) {
fname=fname.trim();
fname=fname.replace(/\s+\.\s*/,'.');
fname = fname.replace(/\s+/g, '-');
return fname;
}\n";
return $js;
}
}
?>