forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: Irondutchess on June 16, 2020, 03:38:07 pm

Title: ZB Block
Post by: Irondutchess on June 16, 2020, 03:38:07 pm
Hi,

Has anyone successfully installed ZB Block https://zb-block.net/ (https://zb-block.net/) into Coppermine? I would like to know how they did it. Basically what I need to know is, is there a .php file that always gets included before any page load?  I can then put the line of code that calls ZB Block at the top of that page so it is implemented before any page is loaded.
Title: Re: ZB Block
Post by: ron4mac on June 16, 2020, 04:10:47 pm
A simpler solution that can be effective is a problem solving captcha (https://forum.coppermine-gallery.net/index.php/topic,79602.msg385895.html#msg385895).

The secret is to have good Q&A's.
See some ideas here: https://www.phpbb.com/community/viewtopic.php?t=2170168
Title: Re: ZB Block
Post by: Irondutchess on June 16, 2020, 04:34:53 pm
Thanks for the reply.

The problem with captcha is it will stop everything that can't solve it.  ZB-Block has a black and a white list so you can choose what can and can't access the site. Also if your site doesn't require a login to view sections of it, then captcha isn't a solution.
Title: Re: ZB Block
Post by: ron4mac on June 16, 2020, 05:26:04 pm
The earliest .php file that you could use is your theme's theme.php file. I see you are using the included curve theme. So you would have to copy it as a different folder (or rename it) so it wouldn't get overwritten by a CPG update.
Title: Re: ZB Block
Post by: Irondutchess on June 16, 2020, 06:32:34 pm
Adding the code to theme.php didn't work. After some experimenting adding the code to include/init.inc.php gets ZB Block working on all pages in the site including the login page.

So if anyone else wants to implement ZB Block that's the file to use.