]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/IncludeSiteMap.php
No %s in plugin description
[SourceForge/phpwiki.git] / lib / plugin / IncludeSiteMap.php
1 <?php
2
3 /**
4  * Copyright 2003,2004 $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  * http://sourceforge.net/tracker/?func=detail&aid=537380&group_id=6121&atid=306121
25  *
26  * Submitted by: Cuthbert Cat (cuthbertcat)
27  * Redesigned by Reini Urban
28  *
29  * This is a quick mod of BackLinks to do the job recursively. If your
30  * site is categorized correctly, and all the categories are listed in
31  * CategoryCategory, then a RecBackLinks there will produce one BIG(!)
32  * contents page for the entire site.
33  * The list is as deep as the recursion level ('reclimit').
34  *
35  * 'includepages': passed verbatim to the IncludePage plugin. Default: "words=50"
36  *                 To disable words=50 use e.g. something like includepages="quiet=0"
37  * 'reclimit':     Max Recursion depth. Default: 2
38  * 'direction':    Get BackLinks or forward links (links listed on the page)
39  * 'firstreversed': If true, get BackLinks for the first page and forward
40  *                 links for the rest. Only applicable when direction = 'forward'.
41  * 'excludeunknown': If true (default) then exclude any mentioned pages
42  *                 which don't exist yet.  Only applicable when direction='forward'.
43  */
44
45 require_once 'lib/PageList.php';
46 require_once 'lib/plugin/SiteMap.php';
47
48 class WikiPlugin_IncludeSiteMap
49     extends WikiPlugin_SiteMap
50 {
51     function getDescription()
52     {
53         return _("Include recursively all linked pages starting at [pagename].");
54     }
55
56     function getDefaultArguments()
57     {
58         return array('exclude' => '',
59             'include_self' => 0,
60             'noheader' => 0,
61             'page' => '[pagename]',
62             'description' => $this->getDescription(),
63             'reclimit' => 2,
64             'info' => false,
65             'direction' => 'back',
66             'firstreversed' => false,
67             'excludeunknown' => true,
68             'includepages' => 'words=50'
69         );
70     }
71
72     function run($dbi, $argstr, &$request, $basepage)
73     {
74         return WikiPlugin_SiteMap::run($dbi, $argstr, $request, $basepage);
75     }
76 }
77
78 // Local Variables:
79 // mode: php
80 // tab-width: 8
81 // c-basic-offset: 4
82 // c-hanging-comment-ender-p: nil
83 // indent-tabs-mode: nil
84 // End: