2 rcs_id('$Id: HelloWorld.php,v 1.8 2002-01-21 06:55:47 dairiki 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 // Four required functions in a WikiPlugin.
23 return _("HelloWorld");
26 function getDescription () {
27 return _("Simple Sample Plugin");
30 // Establish default values for each of this plugin's arguments.
31 function getDefaultArguments() {
32 return array('salutation' => "Hello,",
36 function run($dbi, $argstr, $request) {
37 extract($this->getArgs($argstr, $request));
39 // Any text that is returned will not be further transformed,
40 // so use html where necessary.
41 $html = HTML::tt(fmt('%s %s', $salutation, _LinkWikiWord($name)),
52 // c-hanging-comment-ender-p: nil
53 // indent-tabs-mode: nil