![]() |
Limit guests to viewing 5 threads max.
This hack allows a guest to view 5 threads within the forums. After the 5th
thread, the hack will bring up the error_nopermission_loggedout template to force them to register with the board. This hack was requested by frozt and jjj0923. Templates affected: 0 Files affected: showthread.php and admin/sessions.php Tables affected: session How to install this hack: You need to alter the session table using the following command: alter table session add visitcount smallint(5) unsigned DEFAULT 0; The rest of the instructions are in the attached file. Your comments will be greatly appreciated. |
Thnxz man! its works great i think :-)
|
You're welcome. :)
|
does it re-direct them too register page... im gonna try installing now
|
They get sent to the screen that tells them they need to log in or register. :)
|
thank you - this is great.
- jeff |
Can't he/she just clear the session and continue browsing!!
|
Quote:
|
Remi is right, it's only for the current session. :)
|
Unless your cookie times out, or you kill your browser, you won't be able to read another thread.
|
You will be able 5 threads every 15 minutes, or whatever the admin set the cookie timeout for. :)
|
Membership has its privileges. :D
|
I get parsing errors in "session" when trying to run this on 2.2.6 Please give me a hand to get it right. This is a great hack and I reaaaaallllllllllllyyyyyyy need it! session table altered (visitcount added) and code in both php scripts changed and verified.
Thanks!!!!!! |
Wouldn't it be better to go to a template that says: "You cannot view any more than 5 threads"? :D
|
Quote:
|
Quote:
My Email is edwink@seebeyond.com :) |
how can this be altered to come up with a different template thanerror_nopermission_loggedout template ?
I want to specify a different template.. |
I thought this was a wonderful idea, and installed it. Then I remembered the googlebot and uninstalled it. I think I need to come back some time when I have a few brain cells working and see if I can't code it so that google and other bots that I like can stay and crawl.
Amy |
Is there a way to change the value from say 5 to 10 or 15?
|
Look for all instances of the following code. There are 2 of them:
Code:
if($session[visitcount] > 5) |
Hey would there be any way to base this on an IP basis? So instead of checking for cookies, it would check if the IP had already viewed 5 threads?
|
These visits are remembered per session. A guest does not use a cookie since cookies are given to registered users.
. And to keep track of visits per IP address, you would need to create a brand new table to keep track of individual IP's and increment their visit count.. |
All times are GMT. The time now is 02:45 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|