Hiya,
Few weeks ago I've done my own forum, codes are MESSED UP, but works.. 🙂
(trust me it's waste of TIME, installing phpbb is much easier..)
letz see here.. ok, so u want to show if there is a new topic or not, right?
a) List topics (do a query chk, and use list() function to list)
b) chk out this code.. if u have this table ofcourse.. 🙂 (this might not work on ur system, but here is the IDEA..)
//mysql table:
CREATE TABLE `forum_readtopics` (
`id` int(11) NOT NULL auto_increment,
`forum_id` text NOT NULL,
`topic_id` text NOT NULL,
`username` varchar(50) NOT NULL default '',
`new_post` char(1) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=45 ;
<?php
//Chk new/old topics!
$TopicRead = "SELECT * FROM forum_readtopics WHERE username='$Logged_username' AND topic_id='$idA' AND new_post='0'";
if(mysql_num_rows(mysql_query($TopicRead)) > 0)
{
//oldtopic
echo '<img src="images/oldtopic.gif" width="20" height="20">';
}else{
//newtopic
echo '<img src="images/newtopic.gif" width="20" height="20">';
}
?>