2021-08-11, 05:23 AM
(This post was last modified: 2021-08-11, 05:40 AM by remus. Edited 4 times in total.)
Hi,
I've managed to get MyTracker (1.0.1, didn't find the newer 1.0.2) working under MyBB 1.8.27. Everything works perfectly but today i realized the thread view counter does not work anymore. I figured out that plugins can cause this and yes, right after deactivating MyTracker the thread view counter works again. I tried to fix it by doing the MyTracker upgrade process without success.
Any ideas how this could be fixed?
EDIT:
It seems to be fixed by the following code changes in showthread.php:
Greez
remus
I've managed to get MyTracker (1.0.1, didn't find the newer 1.0.2) working under MyBB 1.8.27. Everything works perfectly but today i realized the thread view counter does not work anymore. I figured out that plugins can cause this and yes, right after deactivating MyTracker the thread view counter works again. I tried to fix it by doing the MyTracker upgrade process without success.
Any ideas how this could be fixed?
EDIT:
It seems to be fixed by the following code changes in showthread.php:
if($mybb->settings['delayedthreadviews'] == 1)
{
$db->shutdown_query("INSERT INTO ".TABLE_PREFIX."threadviews (tid) VALUES('{$tid}')");
}
else
{
//$db->shutdown_query("UPDATE ".TABLE_PREFIX."threads SET views=views+1 WHERE tid='{$tid}'");
$db->query("UPDATE ".TABLE_PREFIX."threads SET views=views+1 WHERE tid='{$tid}'");
}
++$thread['views'];
Greez
remus