Hallo!!
Verwende das ez-Portal und den Mod "top 5 topics, top 5 recent, top 5 viewed"
Jetzt würde ich gerne eine Forum(oder mehrere) davon ausschließen. Wie stelle ich das am besten an??
Es sollen weiterhin die 5 neuesten, die 5 meist gelesenen und die 5 am meisten beantworteteten angezeigt werden, aber von einem Forum eben nichts.
Habe gleich zur Sicherheit den Mod mitgepostet.
danke schon mal für eure Hilfe..
Top 5 topics - ein oder mehrere Foren ausschließen
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Top 5 topics - ein oder mehrere Foren ausschließen
Es tanzt ein Bi Ba Butzemann.
Code: Alles auswählen
##############################################################
## MOD Title: Top 5 ezPortal blocks
## MOD Author: Antony, antony_bailey@lycos.co.uk, Antony Bailey, http://rapiddr3am.slackslash.net
## MOD Description: Top 5 Topics, Top 5 Viewed, Last 5 topics
## MOD Version: 1.0.0
##
## Installation Level: Easy.
## Installation Time: 5 Minutes
## Files To Edit: portal.php, portal_body.tpl
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes: Just a few more pointless portal blocks.
## Just adds more to your pages. ;)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
portal.php
#
#-----[ FIND ]------------------------------------------
#
// Generate the page
#
#-----[ BEFORE ADD ]------------------------------------------
#
// Let's add some more code, this will be fun. ;)
$active_topics_sql="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_last_post_id DESC
LIMIT 5";
$active_topics = $db->sql_query($active_topics_sql);
$active_topics_sql2="SELECT a.topic_id,a.topic_title, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_replies DESC
LIMIT 5";
$active_topics2 = $db->sql_query($active_topics_sql2);
$active_topics_sql3="SELECT a.topic_id,a.topic_title, a.topic_views, a.topic_replies, a.topic_last_post_id, c.post_time
FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d
where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
and d.forum_id=a.forum_id
and d.auth_view=0
ORDER BY topic_views DESC
LIMIT 5";
$active_topics3 = $db->sql_query($active_topics_sql3);
while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3)))
{
if (strlen($line['topic_title']) > 40)
{
$line_topic_title = substr($line['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title = $line['topic_title'];
}
if (strlen($line2['topic_title']) > 40)
{
$line_topic_title2 = substr($line2['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title2 = $line2['topic_title'];
}
if (strlen($line3['topic_title']) > 40)
{
$line_topic_title3 = substr($line3['topic_title'], 0, 40)." ...";
}
else
{
$line_topic_title3 = $line3['topic_title'];
}
$lastpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line['topic_id'] . "\" title=\"" . $line['topic_title'] ."\">" . $line_topic_title . "</a>";
$poppost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line2['topic_id'] . "\" title=\"" . $line2['topic_title'] ."\">" . $line_topic_title2 . "</a>";
$poppostc = $line2['topic_replies'];
$popviewpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line3['topic_id'] . "\" title=\"" . $line3['topic_title'] ."\">" . $line_topic_title3 . "</a>";
$popviewpostc = $line3['topic_views'];
$template->assign_block_vars('topicrecentpopular', array(
'TOPICSPOPULAR' => $poppost,
'TOPICSPOPULARC' => $poppostc,
'TOPICSPOPULARVIEW' => $popviewpost,
'TOPICSPOPULARVIEWC' => $popviewpostc,
'TOPICSRECENT' => $lastpost)
);
}
// You added more pointless code, go you!
#
#-----[ OPEN ]------------------------------------------
#
portal_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_POLL}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<form method="post" action="{S_POLL_ACTION}">
<center><b>{S_POLL_QUESTION}</b></center><br />
<!-- BEGIN poll_option_row -->
<input type="radio" name="vote_id" value="{poll_option_row.OPTION_ID}">{poll_option_row.OPTION_TEXT} [{poll_option_row.VOTE_RESULT}]<br />
<!-- END poll_option_row -->
<br />
<!-- BEGIN switch_user_logged_out -->
<center>{L_LOGIN_TO_VOTE}</center>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<center><input type="submit" class="mainoption" name="submit" value="{L_VOTE_BUTTON}" {DISABLED}></center>
<input type="hidden" name="topic_id" value="{S_TOPIC_ID}">
<input type="hidden" name="mode" value="vote">
<!-- END switch_user_logged_in -->
{S_HIDDEN_FIELDS} </form><br />
</span></td>
</tr>
</table>
<br />
#
#-----[ BEFORE ADD ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cathead" colspan="4" align="left" height="25"><span class="genmed"><b>Top 5 Topics</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSRECENT}</span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cathead" colspan="4" align="left" height="25"><span class="genmed"><b>Top 5 Topics</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<tr>
<td width="31%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULAR}</span></td>
<td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARC}</span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cathead" colspan="4" align="left" height="25"><span class="genmed"><b>Top 5 Viewed</b></span></td>
</tr>
<!-- BEGIN topicrecentpopular -->
<tr>
<td width="29%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEW}</span></td>
<td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEWC}</span></td>
</tr>
<!-- END topicrecentpopular -->
</table>
<br />
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Es tanzt ein Bi Ba Butzemann.
ok ich antworte mir mal gleich selber.
Habe das top 5 recent von smartor statt dessen reingegeben -
aber gleich 2 schönheitsfehler bemerkt:
1. es wird offenbar auf die englische lang_main zurückgegriffen - » Jugendheim
by Samael on 01.02.2004 17:20
wie kann man das ändern?
2. wenn ein anonymer Poster einen artickel geschrieben hat, bekommt man auch einen Hyperlink auf den - wo dann steht "dieser Benutzer existiert nicht". Kann man das ändern, sodass bei Gästen gar kein Hyperlink kommt?
Habe das top 5 recent von smartor statt dessen reingegeben -
aber gleich 2 schönheitsfehler bemerkt:
1. es wird offenbar auf die englische lang_main zurückgegriffen - » Jugendheim
by Samael on 01.02.2004 17:20
wie kann man das ändern?
2. wenn ein anonymer Poster einen artickel geschrieben hat, bekommt man auch einen Hyperlink auf den - wo dann steht "dieser Benutzer existiert nicht". Kann man das ändern, sodass bei Gästen gar kein Hyperlink kommt?
Es tanzt ein Bi Ba Butzemann.