2021-03-20, 05:17 PM
2021-03-20, 07:09 PM
That isn't really a practical way for thread view control. Unless a person has a static ip, it could change any time. What would be better is to log user ids that have viewed a thread instead.
2021-03-21, 12:50 PM
(2021-03-20, 07:09 PM)dragonexpert Wrote: [ -> ]That isn't really a practical way for thread view control. Unless a person has a static ip, it could change any time. What would be better is to log user ids that have viewed a thread instead.
Thank you for your reply,
I agree with you, Its better to log user ids, Do you have any idea how to do it?
2021-03-21, 01:42 PM
It exists, it's the
mybb_threadsread
table.2021-03-22, 04:18 PM
I found this one by @Omar
showthread.php
If you don't want thread authors to increase the thread views count,Anyone know how to make it for everyone? I mean for guests+members+ thread authros to give only 1 view
showthread.php
if(!$session->is_spider && $mybb->user['uid'] != $thread['uid'])
{
if($mybb->settings['delayedthreadviews'])
{
$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}'");
}
}
If you don't want thread authors to increase the thread views count,Anyone know how to make it for everyone? I mean for guests+members+ thread authros to give only 1 view