2 rcs_id('$Id: HelloWorld.php,v 1.11 2002-12-30 23:49:35 carstenklapp Exp $');
4 * A simple demonstration WikiPlugin.
7 * <?plugin HelloWorld?>
8 * <?plugin HelloWorld salutation="Greetings, " name=Wikimeister ?>
9 * <?plugin HelloWorld salutation=Hi ?>
10 * <?plugin HelloWorld name=WabiSabi ?>
13 // Constants are defined before the class.
14 if (!defined('THE_END'))
15 define('THE_END', "!");
17 class WikiPlugin_HelloWorld
20 // Five required functions in a WikiPlugin.
23 return _("HelloWorld");
26 function getDescription () {
27 return _("Simple Sample Plugin");
31 function getVersion() {
32 return preg_replace("/[Revision: $]/", '',
33 "\$Revision: 1.11 $");
36 // Establish default values for each of this plugin's arguments.
37 function getDefaultArguments() {
38 return array('salutation' => "Hello,",
42 function run($dbi, $argstr, $request) {
43 extract($this->getArgs($argstr, $request));
45 // Any text that is returned will not be further transformed,
46 // so use html where necessary.
47 $html = HTML::tt(fmt('%s %s', $salutation, WikiLink($name, 'auto')),
58 // c-hanging-comment-ender-p: nil
59 // indent-tabs-mode: nil