Version: 1.00, by Kentaurus
Developer Last Online: Jul 2014
Version: 3.0.0
Rating:
Released: 02-05-2004
Last Update: Never
Installs: 48
No support by the author.
I know there is already one version of this by Gary W but I already made (and documented) my own so I thought I would post it.
Advantages of my hack:
My hack adds only 1 query to showthread, and it only queries the user table, so it is less server intensive. That is important to any busy board or anyone that wants to save some resources. It integrates with the "thread views" system to update the people that have seen the thread.
Disadvantages:
Well.. with mine even if you browse the forum as "invisible" you would end up showing in the "who read" list.
Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Is this working in 3.0.1? No error messages but the list isn't showing up in my thread view pages.
edit: changed "$bbuserinfo[usergroupid]==6" to "is_member_of($bbuserinfo, 6)" and voila! It worked.
Please remember there is a setting in the ACP in the "Server Settings and Optimization" that reads "Update Thread Views Immediately", by default that is set to "no" and the thread views are updated only in an hourly basis, that would mean that also the whoviewed would be updated in an hourly basis
Quote:
Originally Posted by carter876
Kentaurus compliments for your nice hack, I have a little question:
Is there the possibility to see the last date and time in which the user has read the post? (It's very important for me to know it)
This can be done but it is a little server intensive... if I find a way of doing it without taking a lot of resources I'll add it.
Quote:
Originally Posted by DCX
ok, it is working for me but i have a little problem... for some reason, it's not showing up on ALL threads.... it is showing on a majority of the threads though. any ideas?
If a thread hasn't been seen by anyone then it doesn't appear. Of course, at least you have seen the thread, right. Then just wait an hour for it to be updated, or in the ACP change the setting for thread views to be updated immediately.
Quote:
Originally Posted by Grendel
How is that done, if I want to limit the view to thread-starters only? Any idea?
In the hack, instead of
<if condition="$+++++ad">
use
<if condition="$+++++ad and $threadinfo[postuserid]==$bbuserinfo[userid]">
You can now find in the first post a second version of this hack, the who viewed thread (with time) will show the last date a user viewed the thread, and also that version adds a link to the memberinfo.
If you were using the first version and you want the new features please uninstall the last version, you will need the following queries (please keep in mind you will loose the "who viewed" list for your threads):
ALTER TABLE thread DROP w h o r e a d;
ALTER TABLE threadviews DROP w h o r e a d i d;
ALTER TABLE threadviews DROP w h o r e a d n a m e;
Undo the file changes of the first version and install the second version of the hack.
If you are installing this version for the first time you should go straight for the most recent version. (who viewed thread with time)
How would I go about making it so when you mouseover the name it shows the date and time instead of having it behind the name? If you get enough people viewing the thread, this list would get very long with the date and time behind each name.
How would I go about making it so when you mouseover the name it shows the date and time instead of having it behind the name? If you get enough people viewing the thread, this list would get very long with the date and time behind each name.
It should be a template.. but right now it is hard-coded. In the hack:
Ehm I have another question , the hack signals me the time of the server that is different from mine (I have + 3 hours from the time of the server), Is there the possibility to modify the code of the hack to add for example + 10800 seconds?
Ok i Have modified the code, and now it works but I hope that someone tell me if this change is good or if I have compromised something in VB funtionality
Before
Code:
// update views counter
if ($vboptions['threadviewslive'])
{
if ($bbuserinfo['userid'])
{
$+++++adarray[$bbuserinfo['userid']] = time() ;
$add+++++ad = ",+++++ad='".addslashes(serialize($+++++adarray))."'";
}
After
Code:
// update views counter
if ($vboptions['threadviewslive'])
{
if ($bbuserinfo['userid'])
{
$+++++adarray[$bbuserinfo['userid']] = time() + 10800;
$add+++++ad = ",+++++ad='".addslashes(serialize($+++++adarray))."'";
}
As you can see I have added the numbero of seconds to fill the offset from server time and my time