]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/BoxRight.php
include [all] Include and file path should be devided with single space. File path...
[SourceForge/phpwiki.git] / lib / plugin / BoxRight.php
1 <?php // -*-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 getName () {
30         return "BoxRight";
31     }
32
33     function getDescription () {
34         return _("A simple plugin for <div class=boxright> with wikimarkup");
35     }
36
37     function getDefaultArguments() {
38         return array();
39     }
40
41     function managesValidators() {
42         // The plugin output will only change if the plugin
43         // invocation (page text) changes --- so the necessary
44         // validators have already been handled by displayPage.
45         return true;
46     }
47
48     function run($dbi, $argstr, &$request, $basepage) {
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: