Holzi
"myXOOPs"-Neuling
Gepostet am:12.01.2006 13:44
#21
Dafür habe ich das Sript gefunden für die Sitmap
was muß man da ändern, damit er WiwiHome anzeigt und nicht Das Fachzeichnen des Tischlers.
PDF geht schon auch in deiner Version.
Re: Wiki für xoops
12.01.2006 13:44 Hi Fehler ist immer noch drin.*grgrgr*Dafür habe ich das Sript gefunden für die Sitmap
<?php
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <http://www.xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
// Plugin by gizmhail (http://gizmhail.net)
// To have a clearer wiki tree, I changed the image for the 4th depth.
// You should have received this new image with this file.
// This sitemap modification (the new image), is not mandatory at all for this plugin.
define('SITEMAP_WIWIMOD_MAXDEPTH', 4);
define('SITEMAP_WIWIMOD_INDENT_MAXDEPTH', 4);
define('SITEMAP_WIWIMOD_ROOTPAGE', 'WiwiHome'); // Could be '' to display all orphan pages
function wiwi_block()
{
$sitemap = array();
if (file_exists(XOOPS_ROOT_PATH . '/modules/wiwimod/class/wiwiRevision.class.php'))
{
include_once(XOOPS_ROOT_PATH . '/modules/wiwimod/class/wiwiRevision.class.php');
}
else
{
return $sitemap;
}
$db =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
$sitemap['parent'] = get_child($db,$myts,"WiwiHome");
return $sitemap;
}
function get_child($db,$myts,$keyword,$count = 1)
{
$childs = array();
if($count>SITEMAP_WIWIMOD_MAXDEPTH)
{
return $childs;
}
$url = "index.php?page=";
$sql = "SELECT w1.keyword, w1.title, w1.lastmodified, w1.u_id, w1.parent "
."FROM ".$db->prefix("wiwimod")
." AS w1 LEFT JOIN ".$db->prefix("wiwimod")
." AS w2 ON w1.keyword=w2.keyword AND w1.id<w2.id WHERE w1.parent='".$keyword
."' AND w2.id IS NULL "
."ORDER BY title ASC";
$result = $db->query($sql);
$l = 0;
while ($child = $db->fetcharray($result)) {
$currentPage = new WiwiRevision($child["keyword"]);
if($currentPage->canRead())
{
$l = count($childs);
$childs[$l]['id'] = $child['keyword'];
$childs[$l]['title'] = $myts->makeTboxData4Show( $child['title'] ) ;
$childs[$l]['image'] = (($count >= SITEMAP_WIWIMOD_INDENT_MAXDEPTH) ? SITEMAP_WIWIMOD_INDENT_MAXDEPTH : $count);
$childs[$l]['url'] = $url.urlencode($child['keyword']);
}
$subchilds = get_child($db,$myts,$child['keyword'],$count + 1);
if(count($subchilds)!=0)
{
if($count == 1)
{
$childs[$l]['child'] = $subchilds;
}
else
{
$childs = array_merge($childs,$subchilds);
}
}
}
return $childs;
}
function b_sitemap_wiwimod(){
$xoopsDB =& Database::getInstance();
$block = wiwi_block();
return $block;
}
?>
was muß man da ändern, damit er WiwiHome anzeigt und nicht Das Fachzeichnen des Tischlers.
PDF geht schon auch in deiner Version.