MyBB Community Forums

Full Version: Not count author as viewer ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It appears, on our forum, when the author of a post opens the thread, each time it adds to the count of 'viewers' of that thread.
How to change so it doesnt ?
Sounds (lack of Rolleyes ) like there is no way to do it.
Maybe a later upgrade (or plugin) ?

(2012-10-16, 03:26 AM)akm Wrote: [ -> ]It appears, on our forum, when the author of a post opens the thread, each time it adds to the count of 'viewers' of that thread.
How to change so it doesnt ?

Ps: Only reason for, in this case, is that author goes back often to look at replies/edit/etc posts, and would like to not have visits count as 'views'.
Think it is doable but it would require core edits to achieve.
A core edit in showthread php seems to do it: On or about line 630 of showthread.php change the threadview check to also check for if is thread starter.

// Increment the thread view.
	if($mybb->settings['delayedthreadviews'] == 1 && $thread['uid'] != $mybb->user['uid'])
	{
		$db->shutdown_query("INSERT INTO ".TABLE_PREFIX."threadviews (tid) VALUES('{$tid}')");
	}
	elseif ($thread['uid'] != $mybb->user['uid'])
	{
		$db->shutdown_query("UPDATE ".TABLE_PREFIX."threads SET views=views+1 WHERE tid='{$tid}'");
	}
	++$thread['views'];