Witam, posiadam forum phpbb by przemo. Napisałem skrypt który pokazuje pierwsze posty w temacie w forum o danym id itp.
Wszystko działa tylko chciałbym żeby ten skrypt pokazywał też bbcode na stronie.
Pisałem na ich forum to podali mi coś takiego
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
$bbcode_uid = $row123['bbcode_uid'];
if ( $bbcode_uid != '' )
{
$message = ($board_config['allow_bbcode']) ? bbencode_second_pass($row123['post_text'], $bbcode_uid,
$userdata['username']) : preg_replace("/\:$bbcode_uid/si", '', $row123['post_text']); }
niby działa, jednak pojawia się tylko 1 news z 3 i pod tym 1 pojawia sie błąd i rozwala pół strony.
cały skrypt wygląda tak :
<?php
include('site/connect.php');
$result = mysql_query("SELECT bbcode_uid, post_time, user_id, username, b.post_id, post_subject, b.post_text FROM phpbb_users, phpbb_posts AS a, phpbb_posts_text AS b, phpbb_topics AS t
WHERE poster_id = user_id AND a.forum_id = 1
AND a.post_id = b.post_id
AND a.post_id = t.topic_first_post_id
ORDER BY a.post_id DESC
LIMIT 3");
{
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
$bbcode_uid = $row123['bbcode_uid'];
if ( $bbcode_uid != '' )
{
$message = ($board_config['allow_bbcode']) ? bbencode_second_pass($row123['post_text'], $bbcode_uid,
$userdata['username']) : preg_replace("/\:$bbcode_uid/si", '', $row123['post_text']); }
$time = date("d-m-Y H:i:s", $row123['post_time']);
echo '<div class="tekst"><table class="table1" cellspacing="0" summary=""><tr><td><h1 class="ng"><a
href=forum/viewtopic.php?p='.$row123['post_id'].'>'.$row123['post_subject'].'</a></h1><code>Post napisany :
<b>'.$time.'</b></code></td></tr><tr><td><p>'.$message.'</p></td></tr><br><br><th>Post napisany przez:<font
color=blue> <a href=forum/profile.php?mode=viewprofile&u='.$row123[user_id].'>'.$row123['username'].'</a></font>
</a>
</a></th></table></div><br><center><img src="images/pasek2.PNG"></center>';
}
}
?>
a tutaj jest treść wyżej wymienionego błędu
Cytat
Fatal error: Cannot redeclare load_bbcode_template() (previously declared in D:\Program Files\WebServ\httpd\forum\includes\bbcode.php:47) in D:\Program Files\WebServ\httpd\forum\includes\bbcode.php on line 45