ok, :-)
After studying this section of code for awhile i have figured out how you made them link to the form topic. :-)
I understand to add the fields in the string:
$result = $db->query('SELECT t.id, t.subject, FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL AND '.$forum_sql.'f.admmod_only=0 ORDER BY '.$order_by.' DESC LIMIT '.$show)
I would add this as such:
$result = $db->query('SELECT t.id, t.subject, <b>((Somthing)))</b> FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL AND '.$forum_sql.'f.admmod_only=0 ORDER BY '.$order_by.' DESC LIMIT '.$show)
From the looks of this, it looks like that there had been a joining of tables.
ok the only real problem I have is the echo thing.
In the script I do not see any echo for the ' t.id, t.subject ' ?
Im very sorry for all the questions guys, I am tring to learn PHP so i want have to ask so many :-)
Could someone please use this script and put an example in it how to add a different field? Then i can build on that information .
// Fetch $show topics
$result = $db->query('SELECT t.id, t.subject, FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL AND '.$forum_sql.'f.admmod_only=0 ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
while ($cur_topic = $db->fetch_assoc($result))
{
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
if (pun_strlen($cur_topic['subject']) > $max_subject_length)
$subject_truncated = trim(substr($cur_topic['subject'], 0, ($max_subject_length-5))).' ...';
else
$subject_truncated = $cur_topic['subject'];
echo '<b>·</b> <a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.pun_htmlspecialchars($subject_truncated).'</a><br>'."\n";
}
}
exit;
Thanks so much
Daryl