Was hab ich schon gemacht .... du hast mal wieder ein Super-Teilchen gemoddet

Markus
Hier ist die Version speziell für dichSchwabenpfeil! hat geschrieben:Perfekt!
Andreas, kannst Du mir noch kurz sagen welchen Teil ich wie abändern müsste, wenn beim klick auf eine Kategorie nicht zur index.php geleitet sondern die Kategorie auf/zugeklappt werden soll.
Ist natürlich reine geschmackssache, aber dann müsste der Besucher nicht "nur" auf den Ordner klicken sondern könnte auch auf den Namen der Kategorie klicken.
Gruß
Schwabenpfeil!
Code: Alles auswählen
<?php
/***************************************************************************
* Save this file as: sitemap.php
* Version: beta, still in development
* Email: webmaster@retriever-hilfe.de
* Purpose of hack: Basically generates a list of topics and
* displays them with link to the topic.
*
* Tested on: phpBB 2.0.8
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
$t=$HTTP_GET_VARS['t'];
$f=$HTTP_GET_VARS['f'];
//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = 'Sitemap';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo "<table width='100%' cellspacing='2' cellpadding='2' border='0' align='center'>
<tr>
<td align='left'><span class='nav'>Sitemap</span></td>
</tr>
</table>";
echo "<center><a href='" . $PHP_SELF . "' class='nav'>Alles einklappen</a> <a href='" . $PHP_SELF . "?f=all&t=all' class='nav'>Alles ausklappen</a></center>";
echo "<table width='100%' class='forumline' border='0' cellspacing='0' cellpadding='0' align='center'>
<tr>
<td width='100%' valign='top' align='center'>
<table width='100%' border='0' cellspacing='1' cellpadding='1'>";
$resultc = mysql_query("SELECT * FROM " . CATEGORIES_TABLE . " ORDER BY cat_title");
while($rowc= mysql_fetch_assoc($resultc))
{
$countf = 0;
$countna = 0;
$resultcf = mysql_query("SELECT * FROM " . FORUMS_TABLE . " WHERE cat_id =" . $rowc["cat_id"] . " ORDER BY forum_name");
while($rowcf= mysql_fetch_assoc($resultcf))
{
$countf = $countf + 1;
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $rowcf[]);
if ((!$is_auth_ary[$rowcf['forum_id']]['auth_read']) or (!$is_auth_ary[$rowcf['forum_id']]['auth_view']))
{
$countna = $countna + 1;
}
}
if ($countf <> $countna)
{
$actionc = (($f == $rowc["cat_id"]) || ($f == 'all')) ? "<a href='" . $PHP_SELF . "'><img src='images/icon_opened.gif' border='0' alt=' - '></a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "'><img src='images/icon_closed.gif' border='0' alt=' + '></a>";
$actionc1 = (($f == $rowc["cat_id"]) || ($f == 'all')) ? "<a href='" . $PHP_SELF . "' class='nav'>" . $rowc["cat_title"] . "</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "'class='nav'>" . $rowc["cat_title"] ."</a>";
echo "<tr><td width='30' align='center' class='row1' nowrap='nowrap'><span class='gensmall'> </span>" . $actionc . "<span class='gensmall'> </span></td><td colspan='3' align='left' class='row1' width='100%'>" . $actionc1 . "</td></tr>";
}
if ( ($f == 'all') || ($f == $rowc["cat_id"]) )
{
$resultf = mysql_query("SELECT * FROM " . FORUMS_TABLE . " WHERE cat_id =" . $rowc["cat_id"] . " ORDER BY forum_name");
while($rowf= mysql_fetch_assoc($resultf))
{
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $rowf[]);
if ((!$is_auth_ary[$rowf['forum_id']]['auth_read']) or (!$is_auth_ary[$rowf['forum_id']]['auth_view']))
{
// nothing to do
}
else
{
$actionf = (($t == $rowf["forum_id"]) || ($t == 'all')) ? "<a href='" . $PHP_SELF . "?f=" .$rowc["cat_id"] . "'><img src='images/icon_opened.gif' border='0' alt=' - '></a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "&t=" . $rowf["forum_id"] . "'><img src='images/icon_closed.gif' border='0' alt=' + '></a>";
$actionf1 = (($t == $rowf["forum_id"]) || ($t == 'all')) ? "<a href='" . $PHP_SELF . "?f=" .$rowc["cat_id"] . "' class='nav'>" . $rowf["forum_name"] . "</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "&t=" . $rowf["forum_id"] . "' class='nav'>" . $rowf["forum_name"] . "</a>";
echo "<tr><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1' nowrap='nowrap'><span class='gensmall'> </span>" . $actionf . "<span class='gensmall'> </span></td><td colspan='2' align='left' class='row1' width='100%'>" . $actionf1 . "<span class='gensmall'>" . " - " . $rowf["forum_desc"] . "</span></td></tr>";
if ( ($t == 'all') || ($t == $rowf["forum_id"]) )
{
$resultt = mysql_query("SELECT * FROM " . TOPICS_TABLE . " WHERE forum_id=" . $rowf["forum_id"] . " ORDER BY topic_title");
while($rowt= mysql_fetch_assoc($resultt))
{
echo "<tr><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1' nowrap='nowrap'><span class='gensmall'> - </span></td><td align='left' class='row1' width='100%'><a href='viewtopic.php?t=" . $rowt["topic_id"] . "' class='nav'>" . $rowt["topic_title"] . "</a></td></tr>";
}
}
}
}
}
}
echo "</table></td></tr></table>";
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Code: Alles auswählen
$resultc = mysql_query("SELECT * FROM " . CATEGORIES_TABLE . " ORDER BY cat_title");
Code: Alles auswählen
$resultc = mysql_query("SELECT * FROM " . CATEGORIES_TABLE . " WHERE cat_id = '1' ORDER BY cat_title");
Code: Alles auswählen
echo "<tr><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1' nowrap='nowrap'><span class='gensmall'> - </span></td><td align='left' class='row1' width='100%'><a href='ftopic" . $rowt["topic_id"] . '.html'. "' class='nav'>" . $rowt["topic_title"] . "</a></td></tr>";
}
}
}
}
}
}
echo "</table></td></tr></table>";
Code: Alles auswählen
# Short-URLs sitemap.php
RewriteCond %{REQUEST_FILENAME} /fsitemap([0-9]*)-([0-9]*).*
RewriteRule (.*) /sitemap.php?f=%1&t=%2
RewriteCond %{REQUEST_FILENAME} /fsitemap([0-9]*)
RewriteRule (.*) /sitemap.php?f=%1
Code: Alles auswählen
<?php
/***************************************************************************
* Save this file as: sitemap.php
* Version: beta, still in development
* Email: webmaster@retriever-hilfe.de
* Purpose of hack: Basically generates a list of topics and
* displays them with link to the topic.
*
* Tested on: phpBB 2.0.8
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
$t=$HTTP_GET_VARS['t'];
$f=$HTTP_GET_VARS['f'];
//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = 'Inhaltsverzeichniss';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo "<br><table width='100%' class='forumline' border='0' cellspacing='0' cellpadding='0' align='center'>
<tr>
<th class='thCornerL'>Inhaltsverzeichnis</th>
</tr>";
// nicht SuMa-Tauglich:
// echo "<center><a href='" . $PHP_SELF . "' class='nav'>Alles einklappen</a> <a href='" . $PHP_SELF . "?f=all&t=all' class='nav'>Alles ausklappen</a></center>";
echo "
<tr>
<td width='100%' valign='top' align='center'>
<table width='100%' border='0' cellspacing='1' cellpadding='1'>";
$resultc = mysql_query("SELECT * FROM " . CATEGORIES_TABLE . " ORDER BY cat_order");
while($rowc= mysql_fetch_assoc($resultc))
{
$countf = 0;
$countna = 0;
$resultcf = mysql_query("SELECT * FROM " . FORUMS_TABLE . " WHERE cat_id =" . $rowc["cat_id"] . " ORDER BY forum_order");
while($rowcf= mysql_fetch_assoc($resultcf))
{
$countf = $countf + 1;
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $rowcf[]);
if ((!$is_auth_ary[$rowcf['forum_id']]['auth_read']) or (!$is_auth_ary[$rowcf['forum_id']]['auth_view']))
{
$countna = $countna + 1;
}
}
if ($countf <> $countna)
{
$actionc = (($f == $rowc["cat_id"]) || ($f == 'all')) ? "<a href='fsitemap.html'><img src='images/icon_opened.gif' border='0' alt=' - '></a>" : "<a href='fsitemap". $rowc["cat_id"] . '.html' . "'><img src='images/icon_closed.gif' border='0' alt=' + '></a>";
$actionc1 = (($f == $rowc["cat_id"]) || ($f == 'all')) ? "<a href='fsitemap.html' class='nav'>" . $rowc["cat_title"] . "</a>" : "<a href='fsitemap". $rowc["cat_id"] . '.html'. "'class='nav'>" . $rowc["cat_title"] ."</a>";
echo "<tr><td width='30' align='center' class='row1' nowrap='nowrap'><span class='gensmall'> </span>" . $actionc . "<span class='gensmall'> </span></td><td colspan='3' align='left' class='row1' width='100%'>" . $actionc1 . "</td></tr>";
}
if ( ($f == 'all') || ($f == $rowc["cat_id"]) )
{
$resultf = mysql_query("SELECT * FROM " . FORUMS_TABLE . " WHERE cat_id =" . $rowc["cat_id"] . " ORDER BY forum_order");
while($rowf= mysql_fetch_assoc($resultf))
{
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $rowf[]);
if ((!$is_auth_ary[$rowf['forum_id']]['auth_read']) or (!$is_auth_ary[$rowf['forum_id']]['auth_view']))
{
// nothing to do
}
else
{
$actionf = (($t == $rowf["forum_id"]) || ($t == 'all')) ? "<a href='fsitemap". $rowc["cat_id"] . '.html'. "'><img src='images/icon_opened.gif' border='0' alt=' - '></a>" : "<a href='fsitemap". $rowc["cat_id"] . "-" . $rowf["forum_id"] . '.html'. "'><img src='images/icon_closed.gif' border='0' alt=' + '></a>";
$actionf1 = (($t == $rowf["forum_id"]) || ($t == 'all')) ? "<a href='fsitemap". $rowc["cat_id"] . '.html'. "' class='nav'>" . $rowf["forum_name"] . "</a>" : "<a href='fsitemap". $rowc["cat_id"] . "-" . $rowf["forum_id"] . '.html'."' class='nav'>" . $rowf["forum_name"] . "</a>";
echo "<tr><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1' nowrap='nowrap'><span class='gensmall'> </span>" . $actionf . "<span class='gensmall'> </span></td><td colspan='2' align='left' class='row1' width='100%'>" . $actionf1 . "<span class='gensmall'>" . " - " . $rowf["forum_desc"] . "</span></td></tr>";
if ( ($t == 'all') || ($t == $rowf["forum_id"]) )
{
$resultt = mysql_query("SELECT * FROM " . TOPICS_TABLE . " WHERE forum_id=" . $rowf["forum_id"] . " ORDER BY topic_time");
while($rowt= mysql_fetch_assoc($resultt))
{
echo "<tr><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1' nowrap='nowrap'><span class='gensmall'> - </span></td><td align='left' class='row1' width='100%'><a href='ftopic" . $rowt["topic_id"] . '.html'. "' class='nav'>" . $rowt["topic_title"] . "</a></td></tr>";
}
}
}
}
}
}
echo "</table></td></tr></table>";
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>