In order to add a cookie bar to your own installation of WHMCS:

  • copy somewhere on your WHMCS directory this file: https://cookieinfoscript.com/js/cookieinfo.min.js
  • in your current footer.tpl file, add following code just before of </body>:

    <script type="text/javascript" id="cookieinfo"
        src="/widgets/cookieinfo.min.js"
        data-message="We use cookies for better user experience. By continuing to visit this site you agree to our use of cookies."
        data-linkmsg="More info"
        data-moreinfo="My-Cookie-Policy.html"
        data-cookie="chhose-your-cookie-name"
    >
    </script>

     

Note:  this cookie bar is realized using this free service: https://cookieinfoscript.com/

Y
ou can further customize your cookie bar using following data- attributes:

font-size - text size of the message and the link (default: 14px)
font-family - font family of the message and the link (default: verdana, arial, sans-serif)
text-align - position of the text (default: center)
height - banner height (default: 31 pixels)
fg - banner text color (default: #333)
bg - banner background color (default: #eee)
link - link text color (default: #31A8F0)
divlink - button text color (default: #000)
divlinkbg - button background color (default: #F1D600)
position - banner position, top or bottom (default: bottom)
message - message text (default: We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.)
linkmsg - link text (default: More info)
moreinfo - where the visitor can read more about cookies (default: https://wikipedia.org/wiki/HTTP_cookie
close-text - the text/symbol for the close button (default: ✖)
effect - effect to use (default: null)
cookie - name for the cookie to store the cookiebanner acceptance information (default: we-love-cookies)
expires - cookie expiry date/time (default is Infinity aka "Fri, 31 Dec 9999 23:59:59 GMT").
cookie-path - Path to set for the cookie
mask - whether to create a mask over the viewport (default: false). Clicking anywhere on the mask is considered as acceptance.
mask-opacity - the opacity to use for the window mask (default: 0.5)
mask-background - optional background style you wish to apply to the mask (default: #999)
zindex - z-index to set on the notice (default: 255). If mask is used, the notice's z-index is automatically incremented by 1 so it appears above the mask)
accept-on-scroll - when is set true window scrolling is considered as acceptance. (default: false)
tracking - Tracking pixel (default: Off - To enable you will need to enter a (image) tracking url or script. Example: http://www.yourdomain.com/tracking.php?pixel)


 

Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • WHMCS
  • 1 uporabniku/om je bi članek v pomoč
Vam je bil odgovor v pomoč?

Povezani članki

 How to add a favicon in WHMCS

To add a favicon to your WHMCS install: copy your favicon (es. myfavicon.ico) in WHMCS folder...

 How to comment in template (.tpl) files

If you need to insert a comment in a .tpl file, or comment a block of code to disable it, you...

 How to insert a Youtube video in WHMCS knowledgebase article

To insert a YouTube video in an article of the WHMCS knowledge base, you need to insert following...

 How to disable a customer to pay invoices partly with credit balance

in WHMCS if a customer has not enough credit balance for full payment of an invoice, WHMCS allows...

 How to insert a link in a language variable

To insert a link in a language variable in an override language file, use following sample...