Author Topic: GDPR - adding cookie warning on main page  (Read 2839 times)

Offline raj@ad4u.co.uk

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-0
    • View Profile
GDPR - adding cookie warning on main page
« on: December 10, 2018, 10:54:51 AM »
Hi,

Where can I add the following code so that the warning appears and stay on all the pages:

echo '<div style="text-align:center; font-size:90%">
This site uses cookies. <a href="https://www.google.com">Click <button class="blink" style="border:red 1px solid; font-size:90%;">
Exit
</button> to leave the site.
</a>
</div>';

Including the code at the top of "search.php" does work, but it does not appear on index.php.

I just want the user to read the warning and leave if they have an issue with cookies.

Raj

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: GDPR - adding cookie warning on main page
« Reply #1 on: December 10, 2018, 11:32:29 AM »
Use this code in tpl that runs on every page like head.tpl and if you want to load this after page is loaded you can use it in footer.tpl

Offline raj@ad4u.co.uk

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-0
    • View Profile
Re: GDPR - adding cookie warning on main page
« Reply #2 on: December 10, 2018, 01:46:07 PM »
Thanks for your reply.

I have installed the code in home.php and head.php.

Make sure the code is added after the header function as sending data before the header will stop the site
functioning properly.

Raj

 

Powered by SMFPacks Social Login Mod