2 rcs_id('$Id: IncludeSiteMap.php,v 1.1 2004-02-17 12:11:36 rurban Exp $');
4 Copyright 2003,2004 $ThePhpWikiProgrammingTeam
6 This file is part of PhpWiki.
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.
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.
18 You should have received a copy of the GNU General Public License
19 along with PhpWiki; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * http://sourceforge.net/tracker/?func=detail&aid=537380&group_id=6121&atid=306121
26 * Submitted by: Cuthbert Cat (cuthbertcat)
27 * Redesigned by Reini Urban
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').
35 * 'includepages': This will be verbatim to the IncludePage plugin. Default: words=50
37 * 'reclimit': Max Recursion depth. Default: 2
39 * 'direction': Get BackLinks or forward links (links listed on the page)
41 * 'firstreversed': If true, get BackLinks for the first page and forward
42 * links for the rest. Only applicable when direction = 'forward'.
44 * 'excludeunknown': If true (default) then exclude any mentioned pages
45 * which don't exist yet. Only applicable when direction = 'forward'.
48 require_once('lib/PageList.php');
49 require_once('lib/plugin/SiteMap.php');
51 class WikiPlugin_IncludeSiteMap
52 extends WikiPlugin_SiteMap
55 return _("IncludeSiteMap");
58 function getDescription () {
59 return sprintf(_("Include recursively all linked pages starting at %s"),
62 function getDefaultArguments() {
63 return array('exclude' => '',
66 'page' => '[pagename]',
67 'description' => $this->getDescription(),
70 'direction' => 'back',
71 'firstreversed' => false,
72 'excludeunknown' => true,
73 'includepages' => 'words=50'
77 function run($dbi, $argstr, &$request, $basepage) {
78 return WikiPlugin_SiteMap::run($dbi, $argstr, $request, $basepage);
81 // $Log: not supported by cvs2svn $
88 // c-hanging-comment-ender-p: nil
89 // indent-tabs-mode: nil