Código PHP:
<html>
<body background="http://music-strike.net/images/img12.jpg" background-repeat=no-repeat>
<?php
// Amount of active topics to show
define("TOPIC_COUNT", 3);
// Path to the phpBB 3.0 root directory
$phpbb_root_path = "foro/";
// URL to the phpBB 3.0 installation
define("PHPBB_LOCATION", "http://music-strike.net/foro/");
// Time format to output the date/time (for format see PHP manual)
define("TIME_FORMAT", "d/m/Y");
// php extension using
$phpEx = "php";
// No Editing unless you know what your doing
if ( !defined('IN_PHPBB') )
{
define('IN_PHPBB', true);}
// Get the needed phpbb files, thank you phpbb =]
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// HTML header start
?>
<STYLE type="text/css">
A:link {text-decoration:underline;color:#AAFF00;}
A:visited {text-decoration:underline;color:#AAFF00;}
A:hover {text-decoration:none;color:#ffffff;}
</STYLE>
<?php
// HTML header end
$sql = "SELECT DISTINCT t.topic_title, t.topic_id,t.topic_views,t.topic_replies, t.topic_last_post_id,
p.post_time,p.poster_id, f.forum_name, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f, " . USERS_TABLE . " AS u
WHERE
t.forum_id = f.forum_id
AND p.topic_id = t.topic_id
AND p.poster_id = u.user_id
AND p.post_id = t.topic_last_post_id
ORDER BY p.post_time DESC LIMIT " . TOPIC_COUNT;
$nt_result = $db->sql_query($sql);
if(!$nt_result)
{
die("Failed obtaining list of active topics".mysql_error());
}
else
{
$nt_data = $db->sql_fetchrowset();
}
if ( count($nt_data) == 0 )
{
die("No hay temas nuevos");
}
else
{
$cq = 1;
$cc = 000000;
// $nt_data contains all interesting data
for ($i = 0; $i < count($nt_data); $i++)
{
$title = $nt_data[$i]['topic_title'];
$Turl = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?t=" . $nt_data[$i]['topic_id'];
$LPurl = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?p" . "=" . $nt_data[$i]['topic_last_post_id'] . "#p" . $nt_data[$i]['topic_last_post_id'];
$on_forum = 'Forum ' . $nt_data[$i]['forum_name'];
$post_time = date(TIME_FORMAT, $nt_data[$i]['post_time']);
//Profile profile.php?mode=viewprofile&u=23
$profile = PHPBB_LOCATION . 'memberlist.' . $phpEx . "?mode=viewprofile&u=" . $nt_data[$i]['poster_id'] ;
$usrname = $nt_data[$i]['username'];
// Item HTML start
if($cq%2 == 0){$cc = E8EFF4;$cq++;} else{$cc = E8EFF4;$cq++;}?>
<table style='border-bottom: #F0F8FF 1px solid; border-left: #000000 0px solid; border-top: #333333 0px solid; border-right: #000000 0px solid;' width="100%">
<tr>
<td valing="top" align="left">
<font size="2"><a href="<?php echo $LPurl; ?>" title="<?php echo $on_forum; ?>" target="_black"><?php echo $title; ?></a></font>
<br><font size="1" color="#7F7772">Autor: <a href="<?php echo $profile; ?>" target="_black"><?php echo $usrname?></a> I Respuestas: <?php echo $nt_data[$i]['topic_replies'] ?>
</font>
</td>
</tr>
</table>
<?php
}
}
?>
</body>
</html>
el error que sale es el siguiente:
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /topic.php:3)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /topic.php:3)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /topic.php:3)
aunque los resultados de los post siguen saliendo por debajo de ese error.