]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/IncludeTree.php
include [all] Include and file path should be devided with single space. File path...
[SourceForge/phpwiki.git] / lib / plugin / IncludeTree.php
1 <?php // -*-php-*-
2
3 /**
4  * Copyright 2003,2004,2009 $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  * Dynamic version of the IncludeSiteMap by Cuthbert Cat (cuthbertcat)
25  * with a category filter.
26  *
27  * Display an initially closed tree of all pages within certain categories. dhtml.
28  * On [+] open the subtree, on leaves (how to decide?) transclude parts of the page.
29  * Leave detection: more content than just plugins.
30  */
31
32 require_once 'lib/PageList.php';
33 require_once 'lib/plugin/SiteMap.php';
34
35 class WikiPlugin_IncludeTree
36 extends WikiPlugin_SiteMap
37 {
38   function getName () {
39     return _("IncludeTree");
40   }
41
42   function getDescription () {
43     return _("Dynamic Category Tree");
44   }
45
46   function getDefaultArguments() {
47       return array('exclude'        => '',
48                    'include_self'   => 0,
49                    'noheader'       => 0,
50                    'page'           => '[pagename]',
51                    'description'    => $this->getDescription(),
52                    'reclimit'       => 2,
53                    'info'           => false,
54                    'direction'      => 'back',
55                    'firstreversed'  => false,
56                    'excludeunknown' => true,
57                    'includepages'   => 'words=100',
58                    'category'       => '',
59                    'dtree'          => true,
60                    );
61     }
62
63     function run($dbi, $argstr, &$request, $basepage) {
64       return WikiPlugin_SiteMap::run($dbi, $argstr, $request, $basepage);
65     }
66 }
67
68 // Local Variables:
69 // mode: php
70 // tab-width: 8
71 // c-basic-offset: 4
72 // c-hanging-comment-ender-p: nil
73 // indent-tabs-mode: nil
74 // End: