Seite 2 von 6
Verfasst: 28.04.2004 13:06
von Schwabenpfeil!
Hallo,
meinst Du die grünen Links innerhalb der Beiträge?
Das ist der Akronyme-Mod in leicht veränderter Form.
Hier findet Du den Mod. Ist aber noch nicht zu 100% Fehlerfrei!
http://forum.2lucky.de/topic,488,-mod-v ... esuch.html
Gruß
Schwabenpfeil!
Verfasst: 28.04.2004 13:10
von unTouched
vergesst nicht das dieses mod authorisierung für foren/unterforen nicht berücksichtigt zumindest soweit ich das überblicke... und das ist wohl eher schlecht?

Verfasst: 28.04.2004 13:45
von thompson
ne, das meinte ich nicht.
du veränderst du url´s deines forums in html links. das meinte ich.
Verfasst: 28.04.2004 13:53
von andreasOymann
unTouched hat geschrieben:vergesst nicht das dieses mod authorisierung für foren/unterforen nicht berücksichtigt zumindest soweit ich das überblicke... und das ist wohl eher schlecht?

Stimmt, im Moment noch nicht. Es werden ALLE Foren und Topics angezeigt. Eins nach dem anderen...
Hier mal die "Klapp"-Version:
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 "<h2>Sitemap</h2>";
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>";
$resultc = mysql_query("SELECT cat_title, cat_id FROM " . CATEGORIES_TABLE . " ORDER BY cat_title");
while($rowc= mysql_fetch_assoc($resultc))
{
$actionc = (($f == $rowc["cat_id"]) || ($f == 'all')) ? "<a href='" . $PHP_SELF . "' class='nav'> -</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "' class='nav'>+</a>";
echo $actionc . " <a href='index.php?c=" . $rowc["cat_id"] . "' class='nav'>" . $rowc["cat_title"] . "</a><br>";
if ( ($f == 'all') || ($f == $rowc["cat_id"]) )
{
$resultf = mysql_query("SELECT forum_id, forum_name, forum_desc FROM " . FORUMS_TABLE . " WHERE cat_id =" . $rowc["cat_id"] . " ORDER BY forum_name");
while($rowf= mysql_fetch_assoc($resultf))
{
$actionf = (($t == $rowf["forum_id"]) || ($t == 'all')) ? "<a href='" . $PHP_SELF . "?f=" .$rowc["cat_id"] . "' class='nav'> -</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "&t=" . $rowf["forum_id"] . "' class='nav'>+</a>";
echo " " . $actionf . " <a href='viewforum.php?f=" . $rowf["forum_id"] . "' class='nav'>" . $rowf["forum_name"] . "</a><span class='gensmall'>" . " - " . $rowf["forum_desc"] . "</span><br>";
if ( ($t == 'all') || ($t == $rowf["forum_id"]) )
{
$resultt = mysql_query("SELECT topic_title, topic_id FROM " . TOPICS_TABLE . " WHERE forum_id=" . $rowf["forum_id"] . " ORDER BY topic_title");
while($rowt= mysql_fetch_assoc($resultt))
{
echo " <a href='viewtopic.php?t=" . $rowt["topic_id"] . "' class='nav'>" . $rowt["topic_title"] . "</a><br>";
}
}
}
}
}
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Verfasst: 28.04.2004 15:25
von andreasOymann
Nun sind die Userrechte ebenfalls berücksichtigt:
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 "<h2>Sitemap</h2>";
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>";
$resultc = mysql_query("SELECT * FROM " . CATEGORIES_TABLE . " ORDER BY cat_title");
while($rowc= mysql_fetch_assoc($resultc))
{
$actionc = (($f == $rowc["cat_id"]) || ($f == 'all')) ? "<a href='" . $PHP_SELF . "' class='nav'> -</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "' class='nav'>+</a>";
echo $actionc . " <a href='index.php?c=" . $rowc["cat_id"] . "' class='nav'>" . $rowc["cat_title"] . "</a><br>";
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"] . "' class='nav'> -</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "&t=" . $rowf["forum_id"] . "' class='nav'>+</a>";
echo " " . $actionf . " <a href='viewforum.php?f=" . $rowf["forum_id"] . "' class='nav'>" . $rowf["forum_name"] . "</a><span class='gensmall'>" . " - " . $rowf["forum_desc"] . "</span><br>";
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 " <a href='viewtopic.php?t=" . $rowt["topic_id"] . "' class='nav'>" . $rowt["topic_title"] . "</a><br>";
}
}
}
}
}
}
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Im Moment wird noch die Kategorie angezeigt, auch wenn der User in dieser keinerlei Berechtigungen hat. Foren und Topics sind jedoch nicht mehr sichtbar. Da muss ich nochmal ran...
Verfasst: 28.04.2004 17:34
von andreasOymann
Update: nun habe ich das ganze in eine Tabelle gepackt, passt besser zum phpbb-Design! Die Zugriffsrechte passen jetzt auch! Kategorien ohne Berechtigung werden nicht mehr angezeigt.
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 . "' class='nav'>-</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "' class='nav'>+</a>";
echo "<tr><td width='30' align='center' class='row1'>" . $actionc . "</td><td colspan='3' align='left' class='row1'><a href='index.php?c=" . $rowc["cat_id"] . "' class='nav'>" . $rowc["cat_title"] . "</a></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"] . "' class='nav'>-</a>" : "<a href='" . $PHP_SELF . "?f=" . $rowc["cat_id"] . "&t=" . $rowf["forum_id"] . "' class='nav'>+</a>";
echo "<tr><td width='30' align='center' class='row1'><span class='gensmall'>|</span></td><td width='30' align='center' class='row1'>" . $actionf . "</td><td colspan='2' align='left' class='row1'><a href='viewforum.php?f=" . $rowf["forum_id"] . "' class='nav'>" . $rowf["forum_name"] . "</a><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'><span class='nav'>-</span></td><td align='left' class='row1'><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);
?>
Verfasst: 28.04.2004 18:54
von Schwabenpfeil!
Spitze Andreas!!!
Genau so habe ich mir das ausgemalt! Genial!
Mit den Tabellen sieht das nun optisch auch richtig klasse aus!
Statt der + und - Zeichen könnte man sicher noch kleine Ordner, geschlossen und geöffnet einsetzen. Mal sehen ob ich hinbekomme.
@thompson
Suche mal in dem Forum auf das ich gelinkt habe nach dem SuMa-Mod.
Das ist dann der ModRewrite den ich verwendet habe.
Gruß
Schwabenpfeil!
Verfasst: 28.04.2004 19:32
von andreasOymann
na gut, dann mit Bildchen:
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>";
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%'><a href='index.php?c=" . $rowc["cat_id"] . "' class='nav'>" . $rowc["cat_title"] . "</a></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>";
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%'><a href='viewforum.php?f=" . $rowf["forum_id"] . "' class='nav'>" . $rowf["forum_name"] . "</a><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);
?>
Die Bilder dazu:
www.retriever-hilfe.de/forum/images/icon_closed.gif und
www.retriever-hilfe.de/forum/images/icon_opened.gif in eurem images-Verzeichnis abspeichern...
Eine Demo gibt es unter
www.retriever-hilfe.de/forum/sitemap.php
Verfasst: 28.04.2004 23:35
von andreasOymann
Aufgrund kleiner Ungenauigkeiten in den Tabellenbreiten habe ich mein letztes Posting gerade noch einmal aktualisiert. Jetzt müsste es eigentlich einwandfrei klappen.
Lieben Dank an Markus67 !!!
A.
Verfasst: 28.04.2004 23:48
von Schwabenpfeil!
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!