What is the best way to setup a system that checks if a user has not viewed a thread since that has new posts since there last visit, so that the icon can be changed next to the thread? Would it be a good idea to use config files for this?

I would think this is a SQL query issue.

I learned the hard way to put 'lastvisit' and 'lastlogon' attributes in my all user tables. On top of that, I often put 'lastmodified' attributes in my entity tables like the posts table.

So you logic would be something like this;

$userlastvisit = {SQL query to capture lastvisit attribute from user table}
$lastpost      = {SQL query to capture time of last post in thread}
if ($lastpost > $userlastvisit) {
  echo "<img src='new_posts_icon.gif' />";
} else {
  echo "<img src='no_new_posts_icon.gif' />";
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.