picowiki
picowiki copied to clipboard
Cannot make plugin
Hi, I wanted to create a seo plugin, but whenever I try to do something, I get a 500 server error, why?
Here is just some code for the demonstration (PluginSeo.php)
<?php
/**
* Seo Plugin
* This plugin auto-generates meta tags for SEO
* Author: JMcrafter26
*/
class PluginSeo {
static $version = '1.0.0';
static function run( $wiki ) {
$wiki->event('view_after', NULL, function($wiki) {
// replace all <a> tags with rel="nofollow"
$wiki->html = preg_replace('/<a(.*?)>/i', '<a$1 rel="nofollow">', $wiki->html);
return $wiki;
});
}
}
What am I doing wrong? I just copied this from another plugin.
Please respond