Tech Support Posted June 8, 2020 Share Posted June 8, 2020 This is the code for KVS default theme, but should also work for other themes as well. May need CSS adjustments for popup dialog to be displayed correctly (each theme may use their own CSS styles). Please put this code into Website UI -> Page components -> include_footer_general.tpl right before the closing </body> tag: <div id="ageverify" class="hidden"> <strong class="popup-title">Age confirmation</strong> <div class="popup-holder"> <form> <p style="margin-bottom: 10px"> By using the site, you acknowledge you are at least 18 years old. </p> <div class="bottom"> <input type="button" name="continue" class="submit" value="Continue" style="margin-right: 10px"> <input type="button" name="exit" class="submit" value="Exit"> </div> </form> </div> </div> <script> if ($.cookie('kt_agecheck') != '1') { setTimeout(function () { $.fancybox($('#ageverify').html(), { topRatio: 0.3, closeBtn: false, modal: true, afterShow: function () { this.inner.find('input').click(function () { if ($(this).attr('name') == 'continue') { $.cookie('kt_agecheck', '1', {expires: 365, path: '/', samesite: 'Lax'}); $.fancybox.close(); } else { window.location = 'https://google.com'; } }); } }); }, 10); } </script> If you want this age check to be displayed for visitors from certain countries only, you should move it to an advertising and configure this advertising to be displayed only for the selected countries. First, go to Website UI -> Advertising and create a new advertising spot named Age Verify with external ID = spot_age_verify. Do not specify HTML code for the spot. Then create a new Advertising and choose it into Age Verify spot. Copy-paste the code above into advertising HTML code. Select the countries you want it to be limited to. Finally insert this advertising spot into Website UI -> Page components -> include_footer_general.tpl right before the closing </body> tag: {{insert name="getAdv" place_id="spot_age_verify"}} If your server has GEOIP module installed and can detect countries correctly, visitors from the configured countries should be able to see this age verification warning. 1 Quote Link to comment Share on other sites More sharing options...
mongoose657 Posted October 24, 2020 Share Posted October 24, 2020 How can we make this show less frequently, instead of every session for each user? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted October 26, 2020 Author Share Posted October 26, 2020 On 10/24/2020 at 2:36 PM, dj01039 said: How can we make this show less frequently, instead of every session for each user? Thanks for pointing this out, we fixed code to set cookie for 365 days instead of just session, this line changed: $.cookie('kt_agecheck', '1', {expires: 365, path: '/', samesite: 'Lax'}); Quote Link to comment Share on other sites More sharing options...
phseven Posted February 7, 2023 Share Posted February 7, 2023 How to blur background? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted February 8, 2023 Author Share Posted February 8, 2023 20 hours ago, phseven said: How to blur background? Try adding this CSS: .fancybox-overlay { backdrop-filter: blur(5px); } but it will also affect all popups, not the agecheck. Unfortunately I don't see an option with Fancybox v2 that KVS theme uses to supply custom classname for the given popup, so that CSS can be restricted solely for it. Quote Link to comment Share on other sites More sharing options...
drastic Posted May 2, 2023 Share Posted May 2, 2023 we have 18+ content blurred out on two categories. how can I display a "please login to see this" message on the blurred image instead of the pop? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted May 3, 2023 Author Share Posted May 3, 2023 12 hours ago, drastic said: how can I display a "please login to see this" message on the blurred image instead of the pop? Please create support ticket for this. 1 Quote Link to comment Share on other sites More sharing options...
jungleland Posted January 7 Share Posted January 7 Hi there. Add age verification layer as and advertisement is a great idea. But i write you to ask help / suggest a new feature. I would like hide the layer to bots. In other sites we use the "X-UA-BOT" header to aply this filter. How could i do this in KVS? Maybe in "restrictions and conditions" of the advertisement you could add "bots" as new user filter. Thanks in advance !! Quote Link to comment Share on other sites More sharing options...
Tech Support Posted January 9 Author Share Posted January 9 What exactly do you mean by "Bots" in this context? Quote Link to comment Share on other sites More sharing options...
jungleland Posted January 9 Share Posted January 9 As i said i need to hide the age verification layer (as an advertisement or not) to main bots (googlebot and others). Quote Link to comment Share on other sites More sharing options...
Tech Support Posted January 9 Author Share Posted January 9 OK, we added this to todo list. Quote Link to comment Share on other sites More sharing options...
jungleland Posted January 9 Share Posted January 9 Sounds good !! How much time will you need for it? Could we pay for it and have installed asap? Maybe as betatester Quote Link to comment Share on other sites More sharing options...
Tech Support Posted January 10 Author Share Posted January 10 Could probably be possible, please create support ticket with FTP details. But you must have KVS 6.2.0 installed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.