Code: Select all
<?php
//Path to the forum config.php file
include "forum/config.php";
//Forum address, without dash at the end
$forum_address = "http://qc-a.ca/forum/index.php";
//Number of the latest topics
$latest = 25;
$link = $link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
if (!$link)
{
die('Not connected : ' . mysql_error());
}
$db_selected = mysql_select_db("$dbname", $link);
if (!$db_selected)
{
die ('Can\'t use foo : ' . mysql_error());
}
mysql_query("SET NAMES UTF8");
$get_url = "SELECT config_name, config_value FROM $table_prefix".config." WHERE config_name = 'server_name' LIMIT 0,1";
$url = mysql_query($get_url);
$url = mysql_fetch_array($url);
$latest_topics;
//to add excluded forum add "AND forum_id<>$id_to_the_forum" after "topic_approved = '1'"
$latest_topics = "SELECT * FROM $table_prefix".topics." WHERE topic_approved = '1' AND forum_id<>17 ORDER BY topic_last_post_time DESC LIMIT 0,$latest";
$topics = mysql_query($latest_topics);
while($row = mysql_fetch_array($topics))
{
extract($row);
$date = date("d.m.Y", $topic_last_post_time);
?>
<a href="http://<?php $forum_address; ?>/viewtopic.php?f=<?= $forum_id ?>&t=<?= $topic_id ?>" title="<?= $topic_title ?>"><?= $topic_title ?></a> / <?= $date ?> / replies (<?= $topic_replies ?>)<br>
<?php
}
?>
Code: Select all
<iframe src ="lasttopic.php" width="80%" height="130%" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
Thank you so much!