EU Cookie Law – Elgg Extension

Updated on 03 November 2014 with support for Elgg 1.9.X

Elgg-based sites make use of cookies to remember the visiting user preferences. Some sites also make use of Google or Yahoo Analytics that will include some additional cookies to the site. With the new EU cookie regulation law, Elgg-based sites in EU countries are required to acquire consent from the visitor to use cookies.

Cookies Acknowledgement Message

Cookies Acknowledgement Message

EU Cookie Acknowledgement in Header

EU Cookie Acknowledgement before Site Header

To comply with the EU cookies law Download (link at the end of the article), Donate &#x20AC 1 and include the extension in your Elgg site by following the steps below.

Installation

To install the module extract the downloaded archive file into the Elgg base directory. It is important to extract the contents in the base directory as the extension will change the engine/lib/sessions.php file which creates the session cookie.

Admin Menu

Admin Menu

Configuring the extension

The extension can be configured through the Admin > Configure > Settings > EU Cookies section in the admin console, where you can set:

  • The way the acknowledgement message is displayed:
  • Popup – An overlay that blocks the user from accessing the site until the cookies are approved
  • Top of the page – The acknowledgement message is shown in a bar on top of the page
  • The message to show when requesting your visitors to accept the cookies
  • The message to show as a “read about the cookies” link
  • The contents of the page that will provide information about the use of the cookies in the site

Notes:

    • For Elgg version 1.8.0.1 or before please modify the file engine/lib/views.php:
    • The module was tested on Elgg 1.8.0.1, 1.8.1 and Elgg 1.8.6
    • The 1.9.X module was tested on Elgg 1.8.4
  1. // Place in the method elgg_view_page after the line most likely line 621
  2. // $vars['sysmessages'] = $messages;
  3. $vars = elgg_trigger_plugin_hook('output:before', 'page', null, $vars);
EU Cookies Settings Screen

EU Cookies Settings Screen

Update for 1.9.X

In Elgg 1.9.X the sessions.php file has been changed resulting incompatibility between the 1.8.X and 1.9.X versions. A new version of the extension is available for download for Elgg 1.9.X.

Download

Get compliant with the EU cookies law now by Downloading for 1.8.X or by Downloading for 1.9, Donate 1€ and include the extension in your Elgg site.

THIS EXTENSION IS PROVIDED BY THE AUTHOR “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THIS SITE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS EXTENSION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

NOTE: ALWAYS TAKE A BACKUP OF YOUR SITE AND DATABASE BEFORE INSTALLING ANY MODULE

 

Be Sociable, Share!
  • Prasetyo Abu Kaab

    Hello, overwrited engine/lib/sessions.php , and found below error msg :
    Fatal error: Call to undefined function _elgg_session_boot() in /home/xxxxx/public_html/engine/lib/elgglib.php on line 2166

    ———————————–
    Then, I’ve replaced “session_init” with “_elgg_session_boot”, and the error msg has gone. But, I can’t login to the site.

    Any solution?

    • Hi, Sorry for the late reply. I assume you are working with Elgg 1.9 given the function _elgg_session_boot. Please try the new extension. You can find more information on the new extension in the comment to @whitetornado. Thanks

  • whitetornado

    i am running Elgg 1.9.x but when agree, next time the system ask again 🙁

    • Thanks for pointing out the issue with Elgg 1.9.X version. The problem is with the sessions.php file that has been drastically changed. I have uploaded a new version of the extension to work with the 1.9 sessions.php file. Note that the behaviour is slightly different. In the new version the register button will only be shown if they accept the cookies message. I have opted for this approach as not to change the register.php file in the actions. Also if the user tries to log in before accepting the cookie an error message is shown.

      If the register behaviour is not desired, I would suggested to update the register.php file to check if the cookies policy was accepted and show the respective error message. In this case you will need to update the start.php of the eucookies extension to and remove line 12, elgg_set_config(‘allow_registration’, 0); which is the line hiding the register option.

      • whitetornado

        Hi Karlston,

        Great, i installed it, but it stays asking to agree for cookies. Our site is http://www.sidelinehater.com

        any suggestion?

        regards
        Henk

        Disqus schreef op 3-11-2014 om 21:04:

        • Hi, I have checked your site and couldn’t see the problem. Can you please advise if it is related to a specific browser or if the issue was solved? Thanks

          • whitetornado

            Hi, Mobile Works great, but at home on Chrome and Firefox it still asking
            Verzonden van mijn HTC

            —– Reply message —–
            Van: “Disqus”
            Aan:
            Onderwerp: New comment posted on EU Cookie Law – Elgg Extension Datum: di, nov. 4, 2014 08:23

            Settings

            A new comment was posted on Clounce.com Blog

            Karlston D’Emanuele

            Hi, I have checked your site and couldn’t see the problem. Can you please advise if it is related to a specific browser or if the issue was solved? Thanks 2:23 a.m., Tuesday Nov. 4

            Reply

            to Karlston D’Emanuele

            Karlston D’Emanuele’s comment is in reply to

            whitetornado:

            Hi Karlston,Great, i installed it, but it stays asking to agree for cookies. Our site is http://www.sidelinehater.comany suggestion?regardsHenkDisqus … Read more

            You’re receiving this message because you’re signed up to receive notifications about replies to disqus_X8g8yLUdrY.

            You can unsubscribe
            from emails about replies to disqus_X8g8yLUdrY
            by replying to this email with “unsubscribe”
            or reduce the rate with which these emails are sent by
            adjusting your notification settings.

  • whitetornado

    still every visit i made with any browser or mobile, it still ask to agree before going further. Maybe something with https ?