1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script only one per 24hrs

Discussion in 'Scripting' started by mafer, Feb 4, 2017.

  1. mafer

    mafer Registered Member

    Joined:
    Mar 25, 2015
    Messages:
    56
    Likes Received:
    3
    Gender:
    Male
    Occupation:
    CPA, Adsense, Affiliate
    Location:
    Balkan
    Hi, can someone give me code which will I add to my popup and popup will be shown only once in 24hrs per one user.
    Thanks and sorry for bad English.
     
    Last edited: Feb 4, 2017
  2. BassTrackerBoats

    BassTrackerBoats Super Moderator Staff Member Moderator Jr. VIP

    Joined:
    Mar 10, 2010
    Messages:
    15,927
    Likes Received:
    29,261
    Occupation:
    Selling CPA Sites
    Location:
    Not England
    Home Page:
  3. mafer

    mafer Registered Member

    Joined:
    Mar 25, 2015
    Messages:
    56
    Likes Received:
    3
    Gender:
    Male
    Occupation:
    CPA, Adsense, Affiliate
    Location:
    Balkan
    I can add my custom popup code to that plugin ?
     
  4. BassTrackerBoats

    BassTrackerBoats Super Moderator Staff Member Moderator Jr. VIP

    Joined:
    Mar 10, 2010
    Messages:
    15,927
    Likes Received:
    29,261
    Occupation:
    Selling CPA Sites
    Location:
    Not England
    Home Page:
    I am not sure about that but I know that the plugins I have seen in order to have a pop up on WP almost always give you the option to set limits.
     
    • Thanks Thanks x 2
  5. chillerfx

    chillerfx Jr. VIP Jr. VIP

    Joined:
    Mar 20, 2012
    Messages:
    218
    Likes Received:
    47
    Occupation:
    Web-developer and Digital Marketer.
    Location:
    Everywhere on net.
    Hi there,

    A lot of ways to achieve it by using database, javascript storage and cookies.

    1. Add an additional field to the user table set and get the values to show popup. If the field doesn't show popup after you set it, use CRON / SCHEDULER jobs to reset that field for entire users in the very first minutes of the day.

    2. Use javascript local storage to store session keys to handle this, and by the same way you got to reset the session timeout to a particular time (24 hours).

    3. Create cookie with the life time of 24 hours to get your requirement done.

    Hope this helps!
     
    • Thanks Thanks x 1
  6. epagos

    epagos Newbie

    Joined:
    Apr 11, 2007
    Messages:
    22
    Likes Received:
    1
    Simplest way is to use cookies, create a cookie with 24hs expire time when you first fire your popup, and when firing the popup check for the cookie, if it already exists don't fire it.