Show modal dialog only once a day

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Show modal dialog only once a day

Post by alex4orly »

I started a new project here : https://squadron-125.org.il/home.php

I have a modal dialog showing up on loading the site, but- can I somehow set it so that it only does it once a day for any user visiting the site several times on the same day, otherwise, I feel it becomes a nuisance...

Cheers
User avatar
Pablo
 
Posts: 23590
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Show modal dialog only once a day

Post by Pablo »

There is no standard solution for this but I think this should be possible with cookies.

This template has cookie script.
http://www.wysiwygwebbuilder.com/suppor ... outme.html
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Show modal dialog only once a day

Post by alex4orly »

1) I visited the site from the link, it is not your picture.... Just kidding
2) I though about setting a cookie for 1 days, then checking if it is there

But, I have no idea, how to call from the home page, another html file that has inside it my dialog.
I can go the other way - only if there is no cookie, or it is but expired - only then load this other Modal dialog

But, how do I do that without a redirect, just stay on the home page...

Thanks
User avatar
Pablo
 
Posts: 23590
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Show modal dialog only once a day

Post by Pablo »

The template has a script with a cookie.
You can change the script so the cookie is only valid for a day.

For example:

Code: Select all

document.cookie = "cookienotice=true; max-age=60*60*24; path=/";   
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Show modal dialog only once a day

Post by alex4orly »

Sorry, I am not clear, which template?
There was a url to a page, where can I get the template?
Thanks
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Show modal dialog only once a day

Post by alex4orly »

Thanks again

Will look at it and report back

Cheers
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Show modal dialog only once a day

Post by alex4orly »

Works very well for me

Thanks again
Post Reply