TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

June 26, 2024, 10:55:13 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,280
  • Total Topics: 21,227
  • Online today: 334
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 326
  • Total: 326

[Block] Guest Page View Limit

Started by Thurnok, November 17, 2006, 04:51:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thurnok

That sounds more like an issue with your server.  There are numerous sites running TP/SMF that have more than 100 simultaneous users online throughout the day without issue.

Either way, this block really isn't for that, though it would be possible to make one that does that.  I'm already behind on other things however, so someone else probably would be able to get to it faster than I would at the moment.

RvG

Thurnok, just I would like to thank you for this code... it is very useful. :)

Thurnok


Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



metal13


JDMhustle

Great snippet Thurnok ;) i've put this in a block an then why i log out it directly showed me the registration page, i changed the numbers in the code to 10

****************************************
*** !! User Configuration Section !! ***
****************************************
****************************************
*/
// Set the maximum number of pages you want to limit a guest to view
$gpvl_MaxPages = 10;

// set the table name you want to use (without a prefix - prefix will be auto added)
$gpvl_table = 'guest_page_limit';
/*
****************************************
****************************************
*/


Thurnok

Sorry, didn't realize it was a question.  Are you saying that you set the code for 10 pages, but it sent you to registration page at the first page view?

  • Did you put into a phpblock?
  • What block location: left/right/center/frontpage/article?
  • Does this block show on all pages of your site?
  • Do you have something that refreshes your page automatically - like in another block somewhere (example the Teamspeak block has this)?
  • Did it create the database table to hold the IP list?
  • What does it say for the number of views for your IP in the table?

JDMhustle

#28
Quote from: Thurnok on December 28, 2006, 11:52:08 PM
Sorry, didn't realize it was a question.  Are you saying that you set the code for 10 pages, but it sent you to registration page at the first page view?

No problem and yes it did take me directly to the registration page.

  • YES
  • LEFT
  • YES
  • NO
  • YES, see attachment
  • 16


Thurnok

hrm.. well, somehow it counted 16 page views for you, which is why it sent you to the registration page.  I haven't seen that happen at all, so not sure why it would do that.

Try resetting the pageviews value to 1 and then visit as a guest again.  If it sends you direct to the registration page again, recheck the pageviews value to see what it is at.  If it is at above 10 again just from a single page view, there must be something causing it to count multiple times for a single view - but only for you I'd say, since in your screenshot I see another IP in the table that listed a single count.