Gentlemen, I have a request for help.
European Commission Cookies Directive
How to customize the script,to the requirements: European Commission Cookies Directive
The script can be found at:
.............
I need to adopt it in my WEBSITE
So please to explain how to do it in my phpwcms.To my site meet the legal requirements.
How to correctly install .js script in my phpWCMS
Please help in this regard
Regards
Bogdan
How to correctly install .js script in my phpWCMS
- Chaffinch<
- Posts: 52
- Joined: Mon 30. Mar 2009, 18:36
- Contact:
How to correctly install .js script in my phpWCMS
Last edited by Chaffinch< on Fri 5. Apr 2013, 18:17, edited 1 time in total.
Best Regards,
P.S. Sorry for my English or Deutsch.
P.S. Sorry for my English or Deutsch.
- Oliver Georgi
- Site Admin
- Posts: 9892
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: How to correctly install .js script in my phpWCMS
Hi Bogdan,
all you have to do is to add the related JavaScript to your template. Best would be to use the replacer, maybe you have placed the "1.5.js" here then it should work like this…
If you have JS script should be loaded by that directive you will need an additional JS function which is called by the cookieDirective script. Do NOT use if nothing to do here or place a ; inside there too!!!
Then this, which will load the cookieDirective script:
And after that the code needed to let the cookieDirective do what it should do (follow the documentation)
And if there is something you want to do/show when the cookie is active/found use a frontend render script, maybe cookieDirective.php. Maybe use a replace for any information about the cookie seting:
all you have to do is to add the related JavaScript to your template. Best would be to use the replacer, maybe you have placed the "1.5.js" here
Code: Select all
template/lib/cookieDirective/1.5.js
If you have JS script should be loaded by that directive you will need an additional JS function which is called by the cookieDirective script. Do NOT use if nothing to do here or place a ; inside there too!!!
Code: Select all
<!-- JS:
function cookiesDirectiveScriptWrapper(){
// Cookie creating scripts etc here....
}
-->
Code: Select all
<!-- JS: {TEMPLATE}lib/cookieDirective/1.5.js -->
Code: Select all
<!-- JS: cookiesDirective('top',5,'privacy.html'); -->
Code: Select all
<?php
// we need a qualified check — see the empty()
if(!empty($_COOKIE['cookiesDirective'])) {
$content['all'] = str_replace('<!-- cookieDirective -->', '<p>Cookie Directive is active, whatever…</p>', $content['all']);
}
?>
- Chaffinch<
- Posts: 52
- Joined: Mon 30. Mar 2009, 18:36
- Contact:
Re: How to correctly install .js script in my phpWCMS
Thanks very much for Yours SUPPORT
It works fantastically, example:
http://www.arsvetkrynica.pl
Regards
Bogdan
It works fantastically, example:
http://www.arsvetkrynica.pl
Regards
Bogdan
Best Regards,
P.S. Sorry for my English or Deutsch.
P.S. Sorry for my English or Deutsch.