Version: 1.00, by 007
Developer Last Online: Apr 2020
Version: 2.2.x
Rating:
Released: 03-08-2003
Last Update: Never
Installs: 15
No support by the author.
Views Don't Count If Done By Guest Or Thread Starter Unless Replying by 006
What this hack does:
This hack basically keeps your thread views down to only the legit views, and does not add a vew for each refresh unless you are viewing somebody elses thread and are not the last poster in the thread. When a guest views a thread this also does not add a view unless the guest is allowed to reply and does so. In that case one view will be added. This hack makes it easier to tell if somebody has viewed your threads, because after posting, even if you go look at your thread to make sure it "looks right," the view count will still be 0. Your own views will not count.
Benefits of this hack:
The main reason I made this hack was because of the Lesane "Store Hack." If you use the store hack, then you know that points can be awarded to people after so many views of their thread. Well, this hack creates the following variables when calculating the views for each thread:
Views by the thread starter don't count unless they are replying. This way people cannot view their own thread over and over to get points. If the thread starter replies, one view will be added. This was there isn't a possibility of more replies than views.
Views by guests don't count unless guest posting is enabled, then the views will only count when guests reply. This way thread starters cannot simply log in as guests to get their thread view numbers up. Guests can still view the threads of course (unless you have this disabled with the "Restrict Guest Viewing Threads in a Forum" hack by PPN), but their views will not be added to the total thread views.
Views Don't Count If Done By Guest Or Thread Starter Unless Replying
by 006
INSTALLATION:
It shouldn't take any more than 5 minutes to install. (3 steps, 2 file edits)
It has been tested and works fine in 2.2.9
Any questions? Feel free to ask in this thread.
If you use this hack, please click "INSTALL." Thanks
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Well, if someone DID have it installed, I just removed all the elseif lines where it referred to $lastposter['userid'] in the THIRD step, since that caused problems.
I don't think anyone installed it though since it didn't work.
Well, I had it installed but had to uninstall it when you reported the problem with it. I have re-installed it and it seems to be working fine so far. Good job!
Edit: I was just looking at the file and the $lastposter['userid'] is still in there. Is this how it is supposed to be?
PHP Code:
//Start Views Don't Count based on Variables by 006
if ($noshutdownfunc) {
if ($thread['postuserid']==$bbuserinfo['userid']) {
$DB_site->query("UPDATE thread SET views=views WHERE threadid='$threadid'");}
else if ($lastposter['userid'] != $bbuserinfo['userid']) {
$DB_site->query("UPDATE thread SET views=views WHERE threadid='$threadid'");}
else if (!$bbuserinfo['userid']) {
$DB_site->query("UPDATE thread SET views=views WHERE threadid='$threadid'");}
else if ($thread['postuserid'] <> $bbuserinfo['userid']) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");}
//End Views Don't Count based on Variables by 006