Laufschrift für PHPBB Plus 1.3
Verfasst: Sa 15 Mai, 2004 20:33
Im PHPBB Plus 1.2 was die Laufschrift vorne im protal noch da.
Wem diese Laufschrift fehlt der solte sie sich ruhig wieder einfügen.
In unserem Portal haben wir sie jetzt auch eingefügt unter 'Letzte Beiträge'.
Hier das Script.
Öffne die portal.php und suche:
[php]//
// Start output of page
// [/php]
DAVOR das hier einfügen:
[php]//
// Recent Topics
//
$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);
if( $CFG['exceptional_forums'] == '' )
{
$except_forum_id = '\'start\'';
}
else
{
$except_forum_id = $CFG['exceptional_forums'];
}
for ($i = 0; $i < count($forum_data); $i++)
{
if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
{
if ($except_forum_id == '\'start\'')
{
$except_forum_id = $forum_data[$i]['forum_id'];
}
else
{
$except_forum_id .= ',' . $forum_data[$i]['forum_id'];
}
}
}
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC
LIMIT " . $CFG['number_recent_topics'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
}
$number_recent_topics = $db->sql_numrows($result);
$recent_topic_row = array();
while ($row = $db->sql_fetchrow($result))
{
$recent_topic_row[] = $row;
}
for ($i = 0; $i < $number_recent_topics; $i++)
{
$template->assign_block_vars('recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
'L_TITLE' => $recent_topic_row[$i]['topic_title'],
'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),
'S_POSTER' => $recent_topic_row[$i]['username'],
'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
)
);
}
//
// END - Recent Topics
//[/php]
Öffne die portal_body.tpl und füge zum Beispiel hiernach:
[php]<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_STATISTICS}</th>
</tr>
<tr>
<td class="row1"><span class="gensmall">{TOTAL_USERS}<br />
{NEWEST_USER}<br />
<br/>
{TOTAL_POSTS} {TOTAL_TOPICS}</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />[/php]
das ein:
[php]<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th>Letzte Beiträge</th>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<marquee id="recent_topics" behavior="scroll" direction="up" height="150" scrolldelay="100" scrollamount="2">
<!-- BEGIN recent_topic_row -->
» <a href="{recent_topic_row.U_TITLE}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.L_TITLE}</a><br />
by <a href="{recent_topic_row.U_POSTER}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.S_POSTER}</a> on {recent_topic_row.S_POSTTIME}<br /><br />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />[/php]
Dann wünsche ich noch viel Spaß mit siesem Script.
Quelle http://www.phpbb2.de/viewtopic.php?t=7997
Wem diese Laufschrift fehlt der solte sie sich ruhig wieder einfügen.
In unserem Portal haben wir sie jetzt auch eingefügt unter 'Letzte Beiträge'.
Hier das Script.
Öffne die portal.php und suche:
[php]//
// Start output of page
// [/php]
DAVOR das hier einfügen:
[php]//
// Recent Topics
//
$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);
if( $CFG['exceptional_forums'] == '' )
{
$except_forum_id = '\'start\'';
}
else
{
$except_forum_id = $CFG['exceptional_forums'];
}
for ($i = 0; $i < count($forum_data); $i++)
{
if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
{
if ($except_forum_id == '\'start\'')
{
$except_forum_id = $forum_data[$i]['forum_id'];
}
else
{
$except_forum_id .= ',' . $forum_data[$i]['forum_id'];
}
}
}
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC
LIMIT " . $CFG['number_recent_topics'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
}
$number_recent_topics = $db->sql_numrows($result);
$recent_topic_row = array();
while ($row = $db->sql_fetchrow($result))
{
$recent_topic_row[] = $row;
}
for ($i = 0; $i < $number_recent_topics; $i++)
{
$template->assign_block_vars('recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
'L_TITLE' => $recent_topic_row[$i]['topic_title'],
'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),
'S_POSTER' => $recent_topic_row[$i]['username'],
'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
)
);
}
//
// END - Recent Topics
//[/php]
Öffne die portal_body.tpl und füge zum Beispiel hiernach:
[php]<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_STATISTICS}</th>
</tr>
<tr>
<td class="row1"><span class="gensmall">{TOTAL_USERS}<br />
{NEWEST_USER}<br />
<br/>
{TOTAL_POSTS} {TOTAL_TOPICS}</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />[/php]
das ein:
[php]<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th>Letzte Beiträge</th>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<marquee id="recent_topics" behavior="scroll" direction="up" height="150" scrolldelay="100" scrollamount="2">
<!-- BEGIN recent_topic_row -->
» <a href="{recent_topic_row.U_TITLE}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.L_TITLE}</a><br />
by <a href="{recent_topic_row.U_POSTER}" onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{recent_topic_row.S_POSTER}</a> on {recent_topic_row.S_POSTTIME}<br /><br />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />[/php]
Dann wünsche ich noch viel Spaß mit siesem Script.
Quelle http://www.phpbb2.de/viewtopic.php?t=7997