Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with Coppermine Gallery #28

flapane opened this issue Jun 13, 2015 · 3 comments


None yet
2 participants
Copy link

commented Jun 13, 2015

The cookie aren't blocked on Coppermine Gallery CMS:

I think that the problem is related to
in eucookielaw-header.php

In fact, Coppermine already uses:
$return = ob_get_contents();

to include a header.

Also, if you look the source code, the HTML code somehow becomes broken, and the HTML tags that are supposed to be at the top of the document (<html itemscope...[...]) are moved from line 1 to line 36
I can't even login, as there's a message saying: "your browser doesn't accept cookies"


This comment has been minimized.

Copy link

commented Jun 13, 2015

I've nevert tested it with Coppermine Gallery.
If someone would to make a guide is welcome!


This comment has been minimized.

Copy link

commented Jun 13, 2015

I also tried removing:
from eucookielaw-header.php
and substituting it to
in Coppermine Gallery source code, but the result is the same.

@diegolamonica diegolamonica added question and removed help wanted labels Jul 11, 2015

@diegolamonica diegolamonica self-assigned this Jul 11, 2015


This comment has been minimized.

Copy link

commented Jul 11, 2015

Hi @flapane,
here are the instructions on how I made the EUCookieLaw working with Coppermine Gallery 1.5.36 (maybe something could change with other versions but I trust that it should work with all other versions too):

  1. download the following files from the repository

    • EUCookieLaw.js
    • eucookielaw.css
    • eucookielaw-header.php
  2. in the Coppermine Gallery installation root ( in my case is /var/www/copperminegallery/ ) create a directory named eucookielaw

  3. in the installation root ( in my case is /var/www/copperminegallery/ ) open the file index.php and replace the first <?php with the follogin rows of code:

    define( 'EUCOOKIELAW_BANNER_ADDITIONAL_CLASS', 'fixedon-top floating' );
    define( 'EUCOOKIELAW_BANNER_TITLE', 'Titolo banner' );
    define( 'EUCOOKIELAW_BANNER_DESCRIPTION', 'Descrizione banner' );
    define( 'EUCOOKIELAW_BANNER_AGREE_BUTTON', 'Consento' );
    define( 'EUCOOKIELAW_IFRAME_DEFAULT_SOURCE', 'eucookielaw/blocked/default.html' );
    define( 'EUCOOKIELAW_LOOK_IN_SCRIPTS', true );  
    require 'eucookielaw/eucookielaw-header.php';  
  4. open the template file in your theme (as for default installation Coppermine Gallery uses curve so the file I mean is /var/www/copperminegallery/themes/curve/template.html) and find the <head> section of your page then just after it add the following bunch of code:

    <!-- EUCOOKIELAW -->
    <link rel="stylesheet" href="eucookielaw/eucookielaw.css" type="text/css" />
    <script type="text/javascript" src="eucookielaw/EUCookieLaw.js"></script>
    <script type="text/javascript">
      new EUCookieLaw( {
          "bannerTitle":"Banner title",
          "message":"Banner short description",
          "agreeLabel":"I agree",
          "disagreeLabel":"I disagree",
          "agreeOnScroll": true,
          "agreeOnClick": true,
    <!-- EUCOOKIELAW -->

    Consider that the Javascript part could be configured as you want.

And you have done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.