Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Views Don't Count If Done By Guest Or Thread Starter Unless Replying Details »»
Views Don't Count If Done By Guest Or Thread Starter Unless Replying
Version: 1.00, by 007 007 is offline
Developer Last Online: Apr 2020 Show Printable Version Email this Page

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.

Comments
  #2  
Old 03-09-2003, 11:30 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will check it out. Sounds good.
Reply With Quote
  #3  
Old 03-09-2003, 11:51 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found a bug in this. It works for a while and then stops. For no reason that I could see....

I posted a thread here if anyone knows what I should do. :ermm:

https://vborg.vbsupport.ru/showthrea...threadid=49874
Reply With Quote
  #4  
Old 03-10-2003, 04:11 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting concept

- miSt
Reply With Quote
  #5  
Old 05-02-2003, 02:03 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well this is now working fine now. I found the problem.
Reply With Quote
  #6  
Old 05-02-2003, 02:44 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 10:03 AM 006 said this in Post #5
Well this is now working fine now. I found the problem.
Did you update the first post with the fix? If so, what is the update for those who already had it installed?
Reply With Quote
  #7  
Old 05-02-2003, 02:53 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

And yes, I have updated the first post.
Reply With Quote
  #8  
Old 05-02-2003, 03:11 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 
Reply With Quote
  #9  
Old 05-02-2003, 03:45 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found the problem. I renamed it. Try clearing your history and then opening it, or opening it by "SHIFT+Clicking."

The line to remove in the first part of step 3 looks like this:

PHP Code:
else if ($lastposter['userid'] != $bbuserinfo['userid']) {
  
$DB_site->query("UPDATE thread SET views=views WHERE threadid='$threadid'");} 
There is a similar line in the second part of step 3.

I also changed the last line. Just try opening the install file again and see if it is different.

There are NO changes to newreply.php

Hope that works.
Reply With Quote
  #10  
Old 05-02-2003, 04:14 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, got it now. I will make the changes and let you know how it goes. Thank you, sir.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04616 seconds
  • Memory Usage 2,307KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete