]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/BoxRight.php
getName should not translate
[SourceForge/phpwiki.git] / lib / plugin / BoxRight.php
1 <?php
2
3 /**
4  * Copyright 2006 $ThePhpWikiProgrammingTeam
5  *
6  * This file is part of PhpWiki.
7  *
8  * PhpWiki is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * PhpWiki is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22
23 /**
24  * A simple plugin for <div class="boxright"> with wikimarkup
25  */
26 class WikiPlugin_BoxRight
27     extends WikiPlugin
28 {
29     function getDescription()
30     {
31         return _("A simple plugin for <div class=boxright> with wikimarkup.");
32     }
33
34     function getDefaultArguments()
35     {
36         return array();
37     }
38
39     function managesValidators()
40     {
41         // The plugin output will only change if the plugin
42         // invocation (page text) changes --- so the necessary
43         // validators have already been handled by displayPage.
44         return true;
45     }
46
47     function run($dbi, $argstr, &$request, $basepage)
48     {
49         if (!$basepage) {
50             return $this->error("$basepage unset?");
51         }
52         include_once 'lib/BlockParser.php';
53         $page = $request->getPage($basepage);
54         return HTML::div(array('class' => 'boxright'), TransformText($argstr));
55     }
56
57 }
58
59 // Local Variables:
60 // mode: php
61 // tab-width: 8
62 // c-basic-offset: 4
63 // c-hanging-comment-ender-p: nil
64 // indent-tabs-mode: nil
65 // End: