Version: 4.1.11.0, by Paul M
Developer Last Online: Nov 2023
Category: Show Thread Enhancements -
Version: 4.1.11
Rating:
Released: 12-20-2009
Last Update: 05-23-2012
Installs: 1270
DB Changes Uses Plugins Auto-Templates
Translations
No support by the author.
--------------------------------------------------------------------------------
This modification has been withdrawn.
vBulletin 4.0.x and 4.1.x are no longer supported.
The feature is already built into the core vBulletin 4.2.x code.
--------------------------------------------------------------------------------
This displays who has read a thread, and the time they last looked at it.
The main features of the 4.x version are as follows ;
(Note, items in this colour are those added to vB4.2 core)
1. Turn the system on/off.
2. Restrict the display to certain usergroups
3. Restrict the IP display to certain usergroups.
4. Restrict the display to a set number of days.
5. Option to allow thread author to view who read information.
6. Option to turn on the who read cutoff date (reset) function
7. Restrict use of reset function to certain usergroups.
8. Option to set whoread data records to be cleaned out after xxx days.
9. Clicking on a user will display a page of their thread viewing history, most recent first.
10. Restrict the display to certain forums only.
11. The display can be set as always collapsed on initial page load.
12. Restrict the list of reader names to certain usergroups.
13. Restrict the list of recent threads a member has read to certain usergroups.
The set/reset facility allows members to click on the 'set' link which then sets a personal 'cutoff' time - only showing who has read the thread after that time. The time can be reset as many times wanted, and also completely cleared again.
There is also a link to allow you to view a seperate list of all readers of the thread, this is where the ip will be shown [if you have permission].
Warning: When using the set/reset option - there is only a limited capacity of entries per thread (several thousand) - therefore you should only allow this feature to be used by a limited number of people - typically Staff usergroups. Allowing all members to use it will probably slow down your forum and cause errors if more than about 3000 members set a date on one thread.
Note: When using option 4 or the set/reset facility, the data is still kept beyond this limit, so they can be changed at any time.
All settings are located in vBulletin Options > Who Has Read a Thread
To install, download the zip, extract the XML file and import using the vb Product Manager.
History:
v4.0.1 : 21-Dec-2009 : Initial release for vb 4.0.0 Gold. v4.0.2 : 21-Dec-2009 : Add missing template to cache. v4.0.3 : 22-Dec-2009 : Minor display fix as posted by Raug. v4.0.4 : 24-Dec-2009 : Install code updates. v4.0.5 : 31-Dec-2009 : Fixed bug in forum selection feature. v4.0.6 : 03-Jan-2010 : Fixed template cache bug due to v4.0.5 changes. Display css updates. v4.0.7 : 10-Jan-2010 : Minor display fix. v4.0.8 : 16-Jan-2010 : Added always collapsed option, updated install code. v4.0.9 : 19-Jan-2010 : Fix collapse icon position when thread information block enabled. v4.0.10 : 23-Jan-2010 : Fix minor display issue. Settings updated. Other minor changes. v4.0.11 : 18-Feb-2010 : Installer & code updates. v4.0.12 : 23-Feb-2010 : Fix Author display. v4.0.13 : 27-Feb-2010 : Style code updates for vB 4.0.2. v4.0.14 : 29-May-2010 : Fix error in upgrade section of install code. v4.0.15 : 11-Jul-2010 : Internal ip address changes, not released. v4.0.16 : 22-Oct-2010 : Fixed for style changes in vB 4.0.8. v4.0.17 : 25-Oct-2010 : Fix missing action links, broken by v4.0.16. v4.0.18 : 06-Nov-2010 : Install code updated.
v4.1.0 : 04-Dec-2010 : Updated for vBulletin 4.1. v4.1.1 : 27-Dec-2010 : Fix permission bug. v4.1.2 : 30-Dec-2010 : Fixed small permission bug in set/reset. Added new display permissions.
v4.1.7.0 : 16-Oct-2011 : Updated for vBulletin 4.1.7. v4.1.8.0 : 18-Nov-2011 : Updated for vBulletin 4.1.8 onwards (only). v4.1.11.0 : 03-Mar-2012 : Updated for vBulletin 4.1.11 image changes.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I suppose this whoread table should use InnoDB engine by default if it is available at the system because on busy forums a high number of inserts can be done into this table.
There are already some supporting functions in VBulletin core in install scripts:
I suppose this whoread table should use InnoDB engine by default if it is available at the system because on busy forums a high number of inserts can be done into this table.
Why would Innodb be better ? MyISAM is perfectly able to handle many inserts, and table v row locking is not really an issue as records are not being updated.
In fact, with the current index design, Innodb would be slower, as it stores data in Primary Key order, but the inserts will be in date order, so it would be forever re-ordering the data. MyISAM pretty much stores them in Insert order.
When some registered user opens a thread, REPLACE query is issued effectively blocking all reads from whoread table (in MyISAM writes block as I know except for INSERTs) until it is finished (REPLACE is actually performed as DELETE+INSERT as I know). Queries on whoread table on my 2-3M monthly hits forum are often listed in slow query log.
Yes, you are right, I didn't think about Innodb clustering by primary key... But here are some other performance suggestions:
I don't see how index on ipaddress field is used in addon other than for displaying. It looks, like it can be safely removed because it just slows table inserts
ipaddress is better to be stored as integer and converted there and back using ip2long family (there is MySQL equivalents - INET_ATON family). This effectively decreases table row size by about 16 bytes. This is really important because on my forum this table contains 4,059,351 records and it's data size (without index) on disk is 123Mb. Having it converted to INT UNSIGNED will reduce table data size on disk in half. Also VARCHAR type for ipaddress is ineffective. It forces table format to be dynamic slowing data seek. If you will decide not to convert it to INT, please convert it to CHAR at least
The ipaddress index is not currently used, and probably never will be. As I recall, when I first wrote this (in early 2006), I had intended to add an option to display all threads accessed by an IP address, but later dropped that idea. The index has however remained in all versions. You can delete it if required.
As for it being vchar(20) - Well I guess 20 is a slight overkill as 15 is the max, but since mysql only uses what it actually needs, its not a big issue. A fixed char 15 might just be slightly better on average (taking into account the overhaed for the data length bytes).
Yes Im sure it would be better to store them using ip2long, however, that was not the standard in vbulletin when this was written. Since a lot of people have simply moved from one version to another, changing that would require install routines to update all existing data - not something I intend to do.
hi Paul, just installed onto a 4.0.4 board and got this error:
Code:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/includes/class_bootstrap.php(833) : eval()'d code on line 113
any fix?
ps. i've tried to disable your hack and the error is gone ...
Quote:
Originally Posted by Paul M
Sorry, but as per the other thread, I cannot replicate that on any of my 4.0.4 forums.
I would hazard a guess from the error, and its location, that the (vbulletin) settings for the mod are corrupt or missing - try editing/saving them. Same for the other report.
Just a quick note, I ended up getting the same error, but as Paul suggested, you need to make a small change in your "Who has read a thread" settings. When upgrading from an older version, your ID Display may have been set at 0 (for all forums). Now that this mod is using the usergroup selection option, you will have to click on All (for all forums).