Topic: Display a post on index
Hello,
I would like to display a specific post on my index. I have tried to do it myself and it works on forums pages.
Outside the forum, in the gallery, or a custom php page, it show an error : all to undefined function: parse_message()
Someone can help me to fix that problem ? I want to keep the parsing
Here is the code :
<?php
define('PUN_ROOT', './');
$result = $db->query('SELECT id, message FROM '.$db->prefix.'posts WHERE id=4735') or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
$data['message'] = parse_message($data['message'], $data['hide_smilies']);
echo $data['message']."\n" ;
}
?>
Thanks a lot !