jm_cookie_control & GDPR

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
Tata
Posts: 2954
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

jm_cookie_control & GDPR

Post by Tata » Fri Oct 26, 2018 4:50 pm

I have slightly simplyfied the use of the plugin.
1. added the folder jm_cookie_control/data
2. saved files GDPR-(lang).html
3. adjusted the function (added the path to the GDPR file and added the class "zoom_i" for opening the file in hi_fancybox <shall be also installed>)

Code: Select all

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

    $ptx = $plugin_tx['jm_cookie_control'];
    // folder /data shall contain the GDPR file
    $pdata = $pth['folder']['plugin'].'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;
	
	}
So, it is now simpler to add only the GDPR file name in language files.
Have a look at https://cmsimple.sk/
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply