Hi there..
I have been working on a rewrite of this module..
final step is to get this new indicator working properly..
(View in action
www.balsfjord.com)
extensions.joomla.org/component/option,c...k_id,4227/Itemid,35/
The thing is,, When a new post is posted, the new indicator shows up.. When a user reads the topic/post, it disappears.. but then, after some time, it suddenly are unread again.. (next login or something)... I do not know why this is? Could it be a cookie or db thing?
If there are some developers that could help me out with this, I would be grateful..
[code:1]// Loads the latest posts from the Fireboard database
//
function fblatest_loadposts( $num_posts, $only_categories, $child_categories, $within_thread, $show_public, $show_registered, $show_special )
{
global $database, $my;
$fbcookie = $_COOKIE['fboard_settings'];
$prevvisit = 0;
$readtopics = null;
// If a registered user is logged in, look for their last board session
if ($my->id != 0) {
$database->setQuery( "SELECT * FROM #__fb_sessions WHERE userid = ".$my->id );
$sessions = $database->loadObjectList();
if ($sessions && $sessions[0]->userid) {
$prevvisit = $sessions[0]->lasttime;
$readtopics = $sessions[0]->readtopics;
}
else
$prevvisit = time() - 1314000; // One year ago
// If there is a valid value in the cookie, use it instead
if ($fbcookie['prevvisit'])
$prevvisit = $fbcookie['prevvisit'];
}
//echo date("d-m-y H:i", $prevvisit)."";
// Select latest posts / topics from database
$sqlselect = "SELECT a.id, a.name, a.userid, a.subject, a.catid, a.time AS posttime, c.name AS catname";
// Categorize as unread depending on last visit and list of read topics
if ($readtopics && $prevvisit)
$sqlselect .= ", (a.time > $prevvisit AND a.thread NOT IN ($readtopics)) AS unread";
else if ($prevvisit)
$sqlselect .= ", (a.time > $prevvisit) AS unread";
else
$sqlselect .= ", 0 AS unread"; [/code:1]