Page 1 of 5

[ABD] Max Guest Views Before Login

Posted: Thu May 14, 2009 5:14 pm
by poppertom69
MOD Title: Max Guest Views Before Login
MOD Description: Allows you to set a number of pages before a guest viewing your forum needs to login or register to continue browsing

MOD Version: 1.0.1
phpBB Version: 3.0.4

Author: Poppertom69

Features:
  • All configured in acp just have to say how many number of page they can view in board settings and your done
  • Can be installed using Auto Mod.
MOD Format:
MODX

Screenshots:
Image

Support:
PHPBB Topic

Planned Features:
  • None as of yet
Note:
  • If you would like to suggest a feature, please reply to this topic.
  • it counts towards every page visited e.g. index, search, viewforum, viewtopic so you may want to take that into account when setting the x amount of pages
Download
Download Guest Views

None Issues with 1.0.1
None as of yet

Upgrading from 1.0.0 to 1.0.1
Open - includes/session.php
Find

Code: Select all

if ($this->data['user_id'] == ANONYMOUS)
Replace With

Code: Select all

if ($this->data['user_id'] == ANONYMOUS && $this->page['page_name'] != 'ucp.php')

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 6:23 pm
by Tophon
Great idea, was only asked about this a few weeks back.

Does it work via cookies the same as the VB one?

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 6:28 pm
by poppertom69
No it uses the phpbb sessions table so you can't delete the cookie and carry on viewing hope that explains

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 8:12 pm
by Peter77sx
Great! I will test this out today. great idea :)

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 9:13 pm
by Lisbon
Thei can see x pages or topics? or page in topics?

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 9:17 pm
by poppertom69
it counts towards every page visited e.g. index, search, viewforum, viewtopic so you may want to take that into account when setting the x amount of pages

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 9:21 pm
by Lisbon
Cool. Great mod ;)

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 10:44 pm
by jmjm003
Did some testing.
After viewing 12 pages and being blocked. I couldn't even get to the register page as I remained blocked.

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 10:51 pm
by poppertom69
oops I attached the wrong xml file with that fix damn! sorry will post update 2moz

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 10:59 pm
by poppertom69
jmjm003 wrote:Did some testing.
After viewing 12 pages and being blocked. I couldn't even get to the register page as I remained blocked.
Fix included in first post sorry everyone

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 11:13 pm
by jmjm003
Tested your fix. It does allow me to the register page.

Have something else that's rather odd.
Here's how I repeat the issue. I logout of my forum so I'm a guest. I click on the register link. Everything works fine. After viewing 12 pages and then returning to the register link. I can no longer view the captcha image.

As long as I go to the register link prior to the 12 views it works fine. After viewing 12 pages it no longer works.

I log back in and then out again and it shows.

Is this an issue with your mod?

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 11:44 pm
by poppertom69
jmjm003 wrote:Tested your fix. It does allow me to the register page.

Have something else that's rather odd.
Here's how I repeat the issue. I logout of my forum so I'm a guest. I click on the register link. Everything works fine. After viewing 12 pages and then returning to the register link. I can no longer view the captcha image.

As long as I go to the register link prior to the 12 views it works fine. After viewing 12 pages it no longer works.

I log back in and then out again and it shows.

Is this an issue with your mod?


hmm you seem to be right i'll look into this tomorrow that is very strange.

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 11:46 pm
by poppertom69
ok fixed was to do with other fix read first post

rechange the line with the new line

Re: [RC] Max Guest Views Before Login

Posted: Thu May 14, 2009 11:55 pm
by jmjm003
That appears to have fixed the issue.

Thank you.

Re: [RC] Max Guest Views Before Login

Posted: Fri May 15, 2009 10:09 am
by poppertom69
New release with fix added