@ -16,7 +16,7 @@ function pun_news($fid='', $show=15, $truncate=1)
if ( $fid ) $forum_sql = 'f.id='.$fid.' AND ';
$show = intval($show);
if ($show <1||$show> $show_max_topics)
$show = 15;
$show = 15;
$saveddate="";
// Fetch $show topics
$result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db_prefix.'topics AS t INNER JOIN '.$db_prefix.'forums AS f ON t.forum_id=f.id WHERE f.id='.$fid.' AND t.moved_to IS NULL ORDER BY '.$order_by.' DESC') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
@ -30,11 +30,11 @@ function pun_news($fid='', $show=15, $truncate=1)
$newsheading = '<ahref="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new"title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.pun_htmlspecialchars($subject_truncated).'</a> - <em>Posté par '.$cur_topic['poster'].' à '.date('H:i:s', $cur_topic['posted']).'</em><br>';
$newsheading = '<ahref="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'"title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.pun_htmlspecialchars($subject_truncated).'</a> - <em>Posté par '.$cur_topic['poster'].' à '.date('H:i:s', $cur_topic['posted']).'</em><br>';
// Group posts by
$thisdate = date('d n Y', $cur_topic['posted']);
$thisdate = date('d n Y', $cur_topic['posted']);
if ($thisdate != $saveddate)
{
if ($saveddate)
{
@ -49,12 +49,12 @@ $thisdate = date('d n Y', $cur_topic['posted']);
$temp .= $newsheading.'</p><p>';
$id = $cur_topic['id'];
$msg = $db->query('SELECT id, poster, poster_id, poster_ip, poster_email, message, posted, edited, edited_by FROM '.$db_prefix.'posts WHERE topic_id='.$id.' LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
if ( !$db->num_rows($msg) ) continue;
if ( !$db->num_rows($msg) ) continue;
$cur_post = $db->fetch_assoc($msg);
// Display first paragraph only (comment out next four lines to turn off)