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