MyBB Community Forums

Full Version: Possible to See WHO Visited a Specific Thread ??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know that MyBB registers the number of "views" to a particular thread - does it also LOG the IP of the viewer - or is there some other way to see which IP/user has viewed a particular thread??

TIA
DHC Wrote:I know that MyBB registers the number of "views" to a particular thread - does it also LOG the IP of the viewer - or is there some other way to see which IP/user has viewed a particular thread??

TIA
No, there is no feature that currently does that.

I think that would take up a lot of server resources.
AFAIK, it just has a counter and doesn't keep track of unique views. i guess implementing it wouldn't be too hard. just need to attach another field to each thread and write the id of any user that loads the page.

should only take 1 more SQL query.
* DrPoodle bows down to DennisTT's knowledge of SQL...
$db->query("INSERT IGNORE INTO mybb_whoreadthreads (uid, tid, dateline, ip) VALUES ('$uid', '$tid', '".time()."', '".$session->ipaddress."')");

You just need to create a table called mybb_whoreadthreads, and make uid a primary key (no auto-increment), with tid, dateline, and ip as normal columns.

Then you can just search up the tid when you want to look at who read the thread.

I think that will work, but I haven't tested it.

* Dennis Tsang reserves the right to make this idea into a plugin.
OH yes, Please make it into a plug in, Dennis! on knees begging LOL
Yeah, make it please. Smile