$ret['text'] .= "<a href='{$suburl}'>" . $tp->toHTML($sub['forum_name']) . '</a>'; $ret['threads'] += $sub['forum_threads']; $ret['replies'] += $sub['forum_replies']; $tmp = explode('.', $sub['forum_lastpost_info']); if ($tmp[0] > $lastpost_datestamp) { $ret['lastpost_info'] = $sub['forum_lastpost_info']; $ret['lastpost_user'] = $sub['forum_lastpost_user']; $ret['lastpost_user_anon'] = $sub['lastpost_user_anon']; $ret['user_name'] = $sub['user_name']; $lastpost_datestamp = $tmp[0]; } } return $ret; } if (e_QUERY == 'track') { if ($trackedThreadList = $forum->getTrackedThreadList(USERID, 'list')) { $trackVars = new e_vars(); $viewed = $forum->threadGetUserViewed(); $qry = "\n\t\tSELECT t.*, p.* from `#forum_thread` AS t\n\t\tLEFT JOIN `#forum_post` AS p ON p.post_thread = t.thread_id AND p.post_datestamp = t.thread_datestamp\n\t\tWHERE thread_id IN({$trackedThreadList})\n\t\tORDER BY thread_lastpost DESC\n\t\t"; if ($sql->gen($qry)) { while ($row = $sql->fetch(MYSQL_ASSOC)) { $trackVars->NEWIMAGE = IMAGE_nonew_small; if ($row['thread_datestamp'] > USERLV && !in_array($row['thread_id'], $viewed)) { $trackVars->NEWIMAGE = IMAGE_new_small; } $url = $e107->url->create('forum/thread/view', $row); // configs will be able to map thread_* vars to the url $trackVars->TRACKPOSTNAME = "<a href='{$url}'>" . $tp->toHTML($row['thread_name']) . '</a>'; $trackVars->UNTRACK = "<a href='" . e_SELF . "?untrack." . $row['thread_id'] . "'>" . LAN_FORUM_0070 . "</a>"; $forum_trackstring .= $tp->simpleParse($FORUM_TRACK_MAIN, $trackVars); }