Broken thread view counter caused by old plugin MyTracker
#1
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:

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
Reply


Messages In This Thread
Broken thread view counter caused by old plugin MyTracker - by remus - 2021-08-11, 05:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)