[RFC] validate topic view count using javascript

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] validate topic view count using javascript

Post by brunoais »

Oleg wrote:I would say a view by a bot still counts as a view.
I would also say that.

ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: [RFC] validate topic view count using javascript

Post by ecwpa »

From what I see the problem here is that some of you don't consider views to be an important stat. So, for a minute just imagine it is, like it is for a lot of people. Do you think Youtube consider bot views part of their actual views?

No user want to know how many times a bot visited anything, it's worse if you mix human and bot views. It makes the stat unreliable.
Slightly better English than it was in 2005, still improving :D

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1836
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] validate topic view count using javascript

Post by DavidIQ »

Maybe a permission for incrementing views that can be set for bots would be enough? We already have a similar permission:
Increment post counter
Please note that this setting only affects new posts.
An additional permission could be "Can increment topic views". Then those that do not want bots incrementing topic views can just set this permission to "Never" for the Bots group.
Image

User avatar
Oyabun1
Former Team Member
Posts: 20
Joined: Thu Mar 31, 2011 9:48 am

Re: [RFC] validate topic view count using javascript

Post by Oyabun1 »

DavidIQ wrote:Maybe a permission for incrementing views that can be set for bots would be enough?
Could be the best solution, making it optional for each board as to whether to include bot views or not.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] validate topic view count using javascript

Post by nickvergessen »

I would say, let's place an event before the code where we increment it, so extensions can modify this, because I don't see much use in adding another permission for stuff like this.

And apart from that, I think that Can increment topic views sounds a bit misleading?!
Member of the Development-TeamNo Support via PM

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] validate topic view count using javascript

Post by Danielx64 »

It not just bots to worry about, the topic author can refresh the page as many times as he want to views counter higher than it really is.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1836
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] validate topic view count using javascript

Post by DavidIQ »

Well...that's technically a view. ;-)
I think adding the event location as nick said will be the best thing here. That way whoever wants to do all sorts of crazy things with topic views, including tracking who viewed the topic and if the views should be incremental based on that then you can knock yourself out.
Image

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] validate topic view count using javascript

Post by Danielx64 »

Ok that would be best then, would hooks support permissions as well?

As with location I'm thinking before and after the increment code

So that one can do some checking, increment view count and then do some after increment events such as adding name to a table of who viewed topic and how many times for example.

User avatar
Oyabun1
Former Team Member
Posts: 20
Joined: Thu Mar 31, 2011 9:48 am

Re: [RFC] validate topic view count using javascript

Post by Oyabun1 »

But, just so it's clear for the OP, adding a hook (event) into the core code isn't going to achieve the feature requested. It may just make it cleaner for someone, at some stage in the future, to add the feature with an extension (MOD). (Although, whether MOD writers find events and listeners easy to work with I would think is still in doubt, but that's a separate issue.)

In the shorter term the OP could make a request in [3.0.x] MOD Requests.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] validate topic view count using javascript

Post by nickvergessen »

with an event in place, an extension for this will have less than 5 lines of actual code
Member of the Development-TeamNo Support via PM

Post Reply