Author Topic: [SOLVED] Tutorial Views  (Read 1009 times)

0 Members and 1 Guest are viewing this topic.

Offline gevansTopic starter

  • Addict
  • Posts: 2,649
  • Gender: Male
  • don't shoot the messanger
    • View Profile
    • Guernsey Web Design
[SOLVED] Tutorial Views
« on: January 22, 2009, 06:49:59 PM »
I've just noticed that Tutorial Views increment on every page of that tutorial, so if 100 people read a 5 page tutorial it gets 500 views.

I'd suggest only incrementing the tutorial when the first page is accessed. I'm now on page 3 of the Regular Expressions (which is a good read), but still on my first view of the tutorial....
I like starting my code with session_start();

Code: [Select]
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
Son of a biscuit eating bulldog
Use [code][/code] tags!!

Offline .josh

  • Administrator
  • 'Insane!'
  • *
  • Posts: 13,159
  • Grumpy Old Man
    • View Profile
Re: Tutorial Views
« Reply #1 on: January 22, 2009, 08:08:03 PM »
We talked about this at some point in time.  The reason why we continue to allow it is because of the ability to link directly to specific pages (from external links, etc...).

Did I help you? Feeling generous? Donate to me! | Donate to phpfreaks!

Offline gevansTopic starter

  • Addict
  • Posts: 2,649
  • Gender: Male
  • don't shoot the messanger
    • View Profile
    • Guernsey Web Design
Re: Tutorial Views
« Reply #2 on: January 22, 2009, 08:12:15 PM »
Fair point, personally even if I went directly to page 3, the chances are I'd find my way on page 1 rather than going through from a mid way point.

An over the top solution would be to only allow an ip to increment the total once within say a 30 minute period. In all fairness this isn't a hugely important point, just something I noticed!
I like starting my code with session_start();

Code: [Select]
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
Son of a biscuit eating bulldog
Use [code][/code] tags!!

Offline .josh

  • Administrator
  • 'Insane!'
  • *
  • Posts: 13,159
  • Grumpy Old Man
    • View Profile
Re: Tutorial Views
« Reply #3 on: January 22, 2009, 08:28:42 PM »
I recall something along those lines being mentioned, as well.  I don't remember why that was rejected, nor can I think of anything off the top of my head why it should be.  As someone who has submitted several tutorials, I too think that the numbers are kind of bloated, and would rather see more realistic numbers.

Did I help you? Feeling generous? Donate to me! | Donate to phpfreaks!

Offline Daniel0

  • Administrator
  • 'Insane!'
  • *
  • Posts: 11,815
  • Gender: Male
  • ^bb|[^b]{2}$
    • View Profile
Re: Tutorial Views
« Reply #4 on: January 23, 2009, 08:39:13 AM »
I'll see if I can put a cookie somewhere to only update if it doesn't exist.

Offline gevansTopic starter

  • Addict
  • Posts: 2,649
  • Gender: Male
  • don't shoot the messanger
    • View Profile
    • Guernsey Web Design
Re: Tutorial Views
« Reply #5 on: January 23, 2009, 01:15:25 PM »
Cheers Daniel
I like starting my code with session_start();

Code: [Select]
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
Son of a biscuit eating bulldog
Use [code][/code] tags!!