laatste 5 topics op phpBB forum
marc
05/03/2005 16:10:00beste php'ers, heeft iemand het php script om zo de laatste geposte topics of actieve topics op mijn phpBB forum te laten zien
alvast bedankt, marc
alvast bedankt, marc
PHP hulp
21/11/2024 19:01:46Matthijs
05/03/2005 16:40:00Al gekeken bij de downloads van de maker zelf?
die hebben allerlei soorten add-ons voor phpBB
http://www.phpbb.com/phpBB/catdb.php?db=1
die hebben allerlei soorten add-ons voor phpBB
http://www.phpbb.com/phpBB/catdb.php?db=1
marc
05/03/2005 16:49:00nouw... daar staan alleen de mods, ik heb het script nodig wat op de homepage van de site komt te staan.
marc
05/03/2005 16:50:00marc
05/03/2005 16:57:00ales
05/03/2005 18:57:00Jordi
05/03/2005 22:03:00Zo moeilijk is het toch niet?
Gewoon de laatste vijf topictitels uit de db ophalen middels een SQL-query...
Gewoon de laatste vijf topictitels uit de db ophalen middels een SQL-query...
Legolas
05/03/2005 23:16:00Legolas
05/03/2005 23:23:00Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
// PHPBB Latest / Hotest
// Standalone (Legolas)
$posts = "5";
$forum = "1";
$url = "http://www.example.com/forum";
echo("<b>Last Posts</b><br>");
$latestquery = mysql_query("SELECT topic_title, topic_id
FROM phpbb_topics WHERE NOT (topic_status='1') ORDER BY topic_last_post_id DESC LIMIT " . $posts);
$num = 1;
while ($row = mysql_fetch_array($latestquery)) {
$topic = substr($row['topic_title'], 0, 20) . "...";
echo '<b>' . $num . '.</b> <a href="' . $url . '/viewtopic.php?topic=' . $row['topic_id'] . '">' . $topic . '</a><br>';
$num++;
}
echo("<b>Hot Topics</b><br>");
$hotestquery = mysql_query("SELECT topic_title, topic_id
FROM phpbb_topics WHERE NOT (topic_status='1') ORDER BY topic_replies DESC, topic_last_post_id DESC LIMIT " . $posts);
$num = 1;
while ($row = mysql_fetch_array($hotestquery)) {
$topic = substr($row['topic_title'], 0, 20) . "...";
echo '<b>' . $num . '.</b> <a href="' . $url . '/viewtopic.php?topic=' . $row['topic_id'] . '">' . $topic . '</a><br>';
$num++;
}
// PHPBB Latest / Hotest
// Standalone (Legolas)
$posts = "5";
$forum = "1";
$url = "http://www.example.com/forum";
echo("<b>Last Posts</b><br>");
$latestquery = mysql_query("SELECT topic_title, topic_id
FROM phpbb_topics WHERE NOT (topic_status='1') ORDER BY topic_last_post_id DESC LIMIT " . $posts);
$num = 1;
while ($row = mysql_fetch_array($latestquery)) {
$topic = substr($row['topic_title'], 0, 20) . "...";
echo '<b>' . $num . '.</b> <a href="' . $url . '/viewtopic.php?topic=' . $row['topic_id'] . '">' . $topic . '</a><br>';
$num++;
}
echo("<b>Hot Topics</b><br>");
$hotestquery = mysql_query("SELECT topic_title, topic_id
FROM phpbb_topics WHERE NOT (topic_status='1') ORDER BY topic_replies DESC, topic_last_post_id DESC LIMIT " . $posts);
$num = 1;
while ($row = mysql_fetch_array($hotestquery)) {
$topic = substr($row['topic_title'], 0, 20) . "...";
echo '<b>' . $num . '.</b> <a href="' . $url . '/viewtopic.php?topic=' . $row['topic_id'] . '">' . $topic . '</a><br>';
$num++;
}