Topic: From BBcode to html ?
Hi,
I going to make first page by myself, but I have problem with BBcode. What should I do to make change all text with BBcode to HTML ?
page: http://pun.pl/a.php
<?php
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header2.php';
require PUN_ROOT.'include/parser.php';
?>
<div class="blockform">
<h2><span>Aktualnosci</span></h2>
<div class="box">
<fieldset>
<br />
<?
$zapytanie = "SELECT * FROM topics WHERE forum_id=2 ORDER BY id DESC";
$wykonaj = mysql_query ($zapytanie);
while ($wiersz=mysql_fetch_array ($wykonaj))
{
$data = date('d.m.Y',$wiersz['posted']);
echo ("<b>".$wiersz['subject']."</b> - ".$data."<br />Autor: ".$wiersz['poster']."<br /><hr />");
$id=$wiersz['id'];
$zapytanie2 = "SELECT * FROM posts WHERE topic_id=$id LIMIT 1";
$wykonaj2 = mysql_query ($zapytanie2);
while ($wiersz2=mysql_fetch_array ($wykonaj2))
{
echo ($wiersz2['message']."<br /><div style=\"text-align: right;\"><a href=\"http://pun.pl/viewtopic.php?id=".$wiersz['id']."\">komentarze(".$wiersz['num_replies'].")</a></div><br />");
}
}
?>
</fieldset>
</div>
</div>
<?php
require PUN_ROOT.'footer.php';
Darmowe forum - Polish free forum hosting