* <> * <> * <> */ // Constants are defined before the class. if (!defined('THE_END')) define('THE_END', "!"); class WikiPlugin_HelloWorld extends WikiPlugin { function getDescription() { return _("Simple Sample Plugin."); } // Establish default values for each of this plugin's arguments. function getDefaultArguments() { return array('salutation' => "Hello,", 'name' => "World"); } function run($dbi, $argstr, &$request, $basepage) { extract($this->getArgs($argstr, $request)); // Any text that is returned will not be further transformed, // so use html where necessary. $html = HTML::tt(fmt('%s: %s', $salutation, WikiLink($name, 'auto')), THE_END); return $html; } } // Local Variables: // mode: php // tab-width: 8 // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: