]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/HelloWorld.php
Refactor $WikiPlugin::name and $WikiPlugin::description stuff.
[SourceForge/phpwiki.git] / lib / plugin / HelloWorld.php
1 <?php // -*-php-*-
2 rcs_id('$Id: HelloWorld.php,v 1.4 2001-12-16 18:33:25 dairiki Exp $');
3 /**
4  * A simple demonstration WikiPlugin.
5  */
6 class WikiPlugin_HelloWorld
7 extends WikiPlugin
8 {
9     function getName () {
10         return _("HelloWorld");
11     }
12
13     function getDescription () {
14         return _("Simple Sample Plugin");
15     }
16     
17     function getDefaultArguments() {
18         return array('salutation'       => "Hello,",
19                      'name'             => "World");
20     }
21
22     function run($dbi, $argstr, $request) {
23         extract($this->getArgs($argstr, $request));
24         
25         return sprintf("<tt>%s %s</tt>", $salutation, $name);
26     }
27 };
28
29 // For emacs users
30 // Local Variables:
31 // mode: php
32 // tab-width: 8
33 // c-basic-offset: 4
34 // c-hanging-comment-ender-p: nil
35 // indent-tabs-mode: nil
36 // End:
37         
38 ?>