Page 1 of 2

[NEW PLUGIN] jm_cookie_control

Posted: Fri Dec 12, 2014 6:27 pm
by maeg
Hi

jm_cookie_control is a simple cookie control solution.
From the admin you can change:
- the infotext to your visitor
- accept buttom text
- URL to your cookie info site
- linktext

It only works in cmsimple version 1.6 and newer, i don't know why it don't work in version 1.5

Demo and download

Re: [NEW PLUGIN] jm_cookie_control

Posted: Sat Dec 13, 2014 12:58 pm
by cmb
Hi maeg,

nice one! :)

It should be noted in the help file, that it requires jQuery, so that Plugins -> JQuery -> Config -> Autoload has to be enabled (unless jQuery is already enabled otherwise), and that the plugin call <?php echo jm_cookie_control();?> has to be placed after <?php echo head();?>. If that is done, the plugin works under CMSimple_XH 1.5 as well (tested with XH 1.5.10).

However, I suggest to change the default language string "button". Now it says "I accept", but that might be misleading. A visitor might think if they do not click the button, that no cookies will be set, but that still can happen (test, for instance, with XH 1.6.4 where a cookie named PHPSESSID is set as soon as the site is requested). Maybe it's better to label the button "I have acknowledged the use of cookies" or so.

Please note, that there's also Privacy_XH, which tries to help complying with the "EU cookie law" (even if it is still not clear to me, what the actual requirements are). However, that would require more cooperation from the plugin developers; at least the list in the Wiki would have to be completed and kept up-to-date. I would prefer a fully automated solution, but I'm not sure that is possible. I'll investigate.

Christoph

PS:
cmb wrote:I'll investigate.
εὕρηκα :!:

Re: [NEW PLUGIN] jm_cookie_control

Posted: Mon Sep 03, 2018 4:16 pm
by Tata
I have adjusted the plugin to work properly with CMSimple_XH 1.7.2 + onepage and have found this problem:
1. Is the "GDPR" page removed from navigation, the link to #GDPR doesn't work.
2. Is the "GDPR" page listed in navigation, the link works only if there is set

Code: Select all

$plugin_cf['onepage']['url_numeric']="true";
If the "GDPR" page listed in navigation, the link in the jm_cookie_control message is redundant.
Have look at http://carwash.cmsimple.sk

Re: [NEW PLUGIN] jm_cookie_control

Posted: Tue Sep 04, 2018 9:20 am
by lck
Tata wrote:
Mon Sep 03, 2018 4:16 pm
1. Is the "GDPR" page removed from navigation, the link to #GDPR doesn't work.
Versteckte Seiten können nicht angesprungen werden, das ist normal.
Tata wrote:
Mon Sep 03, 2018 4:16 pm
2. Is the "GDPR" page listed in navigation, the link works only if there is set

Code: Select all

$plugin_cf['onepage']['url_numeric']="true";
Bei mir funktioniert es auch ohne numerischen Link.
- Seite erstellt mit Seitennamen "GDPR"
- In der Seite Seitentitel erstellt "<h1>Zásady spracovania a ochrany osobných údajov</h1>"
- Im Plugin jm_cookie_control unter Sprache > Link: #GDPR eingetragen

Re: [NEW PLUGIN] jm_cookie_control

Posted: Tue Sep 04, 2018 9:41 am
by lck
Tata wrote:
Mon Sep 03, 2018 4:16 pm
If the "GDPR" page listed in navigation, the link in the jm_cookie_control message is redundant.
Den Link könntest du per CSS ausblenden:

Code: Select all

.menulevel1 li a[href*="#GDPR"] {
	display: none;
	margin: 0;
	padding: 0;
}

Re: [NEW PLUGIN] jm_cookie_control

Posted: Tue Sep 04, 2018 9:55 am
by Tata
Super Lösung. Danke.

Re: [NEW PLUGIN] jm_cookie_control

Posted: Sun Sep 30, 2018 3:00 pm
by Tata
The modified plugin works fine with CMSimple_XH 1.7.2, except of this debug warning:
NOTICE: Undefined index: jm_cookie_control
/Users/tata/webpages/fytofyto/cmsimple/classes/PluginConfig.php:84
And I can't find the reason.
jm_cookie_control_mod.zip

Re: [NEW PLUGIN] jm_cookie_control

Posted: Sun Sep 30, 2018 4:18 pm
by cmb
Tata wrote:
Sun Sep 30, 2018 3:00 pm
The modified plugin works fine with CMSimple_XH 1.7.2, except of this debug warning:
NOTICE: Undefined index: jm_cookie_control
/Users/tata/webpages/fytofyto/cmsimple/classes/PluginConfig.php:84
And I can't find the reason. jm_cookie_control_mod.zip
The plugin references $plugin['jm_cookie_control'], but doesn't provide a config.php at all. Removing line 16 in index.php should be sufficient.

Re: [NEW PLUGIN] jm_cookie_control

Posted: Sun Sep 30, 2018 4:34 pm
by Tata
Das wars. Danke.
Weil ich den Plugin auf meinen Seiten mit der "GDPR" Seite durch

Code: Select all

$plugin_tx['jm_cookie_control']['link']
verbinde, habe ich als mehr praktisch es mit einer "StandardGDPRdatei" zu verbinden und in einem Fancybox zu öffnen. Dafür braucht man z.B. hi_fancybox Plugin installiert haben. Dafür habe ich noch eine kleine Modifikation in der index.php Datei gemacht.

Code: Select all

<div id="cookie-text">
    <button id="accept">'.$ptx['button'].'</button>'.$ptx['text'].' 
        <a class="zoom_i" href="'.$ptx['link'].'">'.$ptx['linkbutton'].'</a>
</div>
In der Sprachdatei braucht man dann nur den Link definieren

Code: Select all

$plugin_tx['jm_cookie_control']['link']="./userfiles/GDPR.html";

Re: [NEW PLUGIN] jm_cookie_control

Posted: Wed Oct 03, 2018 3:18 pm
by Tata
Ich habe noch einiges erweitert, um den Plugin noch mehr bequem zu nutzen.
1. jm_cookie_control/data erstellt mit GDPR_??.htm Dazeien drin.
2. inde.php:

Code: Select all

function jm_cookie_control() {
    global $hjs, $pth, $plugin_cf, $plugin_tx, $sl;

    $pcf = $plugin_cf['jm_cookie_control'];
    $ptx = $plugin_tx['jm_cookie_control'];
    // following path shall be simplyfied
    $pdata = $pth['folder']['base'].'plugins/jm_cookie_control/data/'.$ptx['link'];
	
    $o = ' <script src="'.$pth['folder']['plugins'].'jm_cookie_control/jm_cookie_control.js"></script>
	<div id="cookie-space"></div>                
            <div id="cookie-consent">
                <div id="cookie-inner">
                    <div id="cookie-text">
                        <button id="accept">'.$ptx['button'].'</button>'
                        .$ptx['text'].' 
                        <a class="zoom_i" href="'.$pdata.'" target="_blank">'
                            .$ptx['linkbutton'].'
                        </a>
                    </div>   
                </div>
             </div>';
   
    return $o;
	
	}
3. Sprachdatei:

Code: Select all

	$plugin_tx['jm_cookie_control']['button']="Verstanden und zugestimmt";
	$plugin_tx['jm_cookie_control']['text']="Die Webseite benutzt cookies. Lesen Sie mehr hier ";
	$plugin_tx['jm_cookie_control']['link']="GDPR-sk.html";
	$plugin_tx['jm_cookie_control']['linkbutton']="\"GDPR\" &raquo;";
Der Plugin soll zusammen mit hi_fancybox instelliert werden. In dem Fall öffnet sich die GDPR Datei im Fancybox.
Es bleibt mir jetzt nur noch eine Frage. Ist es irgendwie möglich die Sprachdatei im Backend editieren?