was willste für ne fehlermeldung wenn der keine ausgibt? der ersetzt die smilies einfach net..
hier der neue code:
hier der neue code:
PHP-Code:
<?PHP
$sql = "SELECT * FROM ".$table_prefix."postings ORDER by id DESC";
$result = $db->sql_query($sql);
$entries = array();
while ($fetch_entries = mysql_fetch_assoc($result))
{
array_push($entries,array(
"id" => $fetch_entries['id'],
"name" => $fetch_entries['name'],
"mail" => $fetch_entries['mail'],
"homepage" => $fetch_entries['homepage'],
"message" => $fetch_entries['message'],
"date" => $fetch_entries['date'],
"time" => $fetch_entries['time']));
}
$db->sql_freeresult($result);
// replace smilies
$sql = "SELECT * FROM ".$table_prefix."smilies";
$result = $db->sql_query($sql);
$smilies = mysql_fetch_assoc($result);
$how_many = mysql_num_rows($result);
for($i=0; $i>=$how_many; $i++)
{
str_replace($smilies['code'],"<img src=\"images/smilies".$smilies['smile_url']."\" alt=\"".$smilies['emoticon']."\" />",$entries[$i-1]['message']);
}
$db->sql_freeresult($result);
$t->assign("dates",$entries);
$t->display("subBlue/index.tpl");
?>
Kommentar