I've pretty much figured out that the problem I'm seeing has to do with the forum_view cookie not being set, thus causing my unread status to fall back to using lastvisit instead. The forum_view cookie is only set in two places in all of the VB3.5 code and in both cases it's only set if you **are not** using threadmarking.
function_bigthree.php
Code:
if ($vbulletin->options['threadmarking'] AND $userid)
{
$db->query_write("
REPLACE INTO " . TABLE_PREFIX . "forumread
(forumid, userid, readtime)
VALUES
($foruminfo[forumid], $userid, $time)
");
if (!$check_parents)
{
return;
}
// check to see if any parent forums should be marked as read as well
$parents = array();
$parents_sql = $db->query_read("
SELECT forum.forumid
FROM " . TABLE_PREFIX . "forum AS forum
LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forum.forumid = forumread.forumid AND forumread.userid = $userid)
WHERE forum.forumid IN ($foruminfo[parentlist])
AND forum.forumid NOT IN ($foruminfo[forumid], -1)
AND (forum.lastpost = 0 OR
IF(forumread.readtime IS NULL, " . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ", forumread.readtime) > forum.lastpost
)
");
while ($parent = $db->fetch_array($parents_sql))
{
$parents[] = "($parent[forumid], $userid, $time)";
}
if ($parents)
{
$db->query_write("
REPLACE INTO " . TABLE_PREFIX . "forumread
(forumid, userid, readtime)
VALUES
" . implode(', ', $parents)
);
}
}
else
{
set_bbarray_cookie('forum_view', $foruminfo['forumid'], $time);
}
So it looks like I may just have to modify the getthreads query for this plugin.