how can i edit the frecuency of this pop under?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jcche19
    Registered User
    • Jan 2013
    • 84

    #1

    how can i edit the frecuency of this pop under?

    hi this is a java cookie ublockable pop unders it opens once a day
    how can i change the frecuency to open every 10 minutes?
    hope you guys can help me, i have change the 1 days to many things without luck...

    var stagedPopFrequency = "1 days";
    var stagedCookieName = "__name";

    if (!document.currentStage)
    document.currentStage = 0;
    document.currentStage++;

    if (document.currentStage == 1) {
    function stagedGetCookie(Name) {
    var search = Name + "=";
    var returnvalue = "";
    if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search);
    if (offset != -1) { // if cookie exists
    offset += search.length;
    // set index of beginning of value
    end = document.cookie.indexOf(";", offset);
    // set index of end of cookie value
    if (end == -1)
    end = document.cookie.length;
    returnvalue = unescape(document.cookie.substring(offset, end));
    }
    }
    return returnvalue;
    }

    function stagedSetCookie(Name, Value, Expire) {
    if (Expire != null) {
    var expireDate = new Date();
    expireDate.setDate(expireDate.getDate() + parseInt(Expire));
    document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString();
    } else {
    document.cookie = Name+"="+Value+";path=/";
    }
    }

    function stagedResetCookie(Name) {
    var expireDate = new Date();
    expireDate.setDate(expireDate.getDate() - 10);
    document.cookie = Name+"=;path=/;expires=" + expireDate.toGMTString();
    }

    function stagedPopUnder() {
    if (stagedGetCookie(stagedCookieName) == '') {
    var thisStage = 1;
    var stageFunc = eval('window.popUnderStage'+thisStage);
    if (stageFunc != undefined) {
    stageFunc();
    stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
    }
    } else {
    var thisStage = parseInt(stagedGetCookie(stagedCookieName));
    var stageFunc = eval('window.popUnderStage'+thisStage);
    if (stageFunc != undefined) {
    stageFunc();
    stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
    }
    }
    }

    function stagedAttachBody() {
    if (document.body) {
    if (document.all) {
    document.body.attachEvent('onclick', stagedPopUnder);
    } else {
    document.body.addEventListener('click', stagedPopUnder, false);
    }
    } else {
    setTimeout('stagedAttachBody()', 200);
    }
    } stagedAttachBody();
    }

    if( parseInt(navigator.appVersion) > 3 )
    {
    winWidth = screen.availWidth;
    winHeight = screen.availHeight;
    }
    else
    {
    winWidth = "1024";
    winHeight = "768";
    }

    var stagedTmpFunc = function() {
    var pu = window.open("http://www.youtube.com/watch?v=BRdq0GdkqlE", "_blank", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=1,resizable=1,menubar=1");
    pu.blur();
    window.focus();

    }
    eval('window.popUnderStage'+document.currentStage+ ' = stagedTmpFunc;');
    stagedTmpFunc = null;
  • jcche19
    Registered User
    • Jan 2013
    • 84

    #2
    no one knows about java?

    Comment

    • jcche19
      Registered User
      • Jan 2013
      • 84

      #3
      Originally posted by jcche19
      hi this is a java cookie ublockable pop unders it opens once a day
      how can i change the frecuency to open every 10 minutes?
      hope you guys can help me, i have change the 1 days to many things without luck...

      var stagedPopFrequency = "1 days";
      var stagedCookieName = "__name";

      if (!document.currentStage)
      document.currentStage = 0;
      document.currentStage++;

      if (document.currentStage == 1) {
      function stagedGetCookie(Name) {
      var search = Name + "=";
      var returnvalue = "";
      if (document.cookie.length > 0) {
      offset = document.cookie.indexOf(search);
      if (offset != -1) { // if cookie exists
      offset += search.length;
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
      end = document.cookie.length;
      returnvalue = unescape(document.cookie.substring(offset, end));
      }
      }
      return returnvalue;
      }

      function stagedSetCookie(Name, Value, Expire) {
      if (Expire != null) {
      var expireDate = new Date();
      expireDate.setDate(expireDate.getDate() + parseInt(Expire));
      document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString();
      } else {
      document.cookie = Name+"="+Value+";path=/";
      }
      }

      function stagedResetCookie(Name) {
      var expireDate = new Date();
      expireDate.setDate(expireDate.getDate() - 10);
      document.cookie = Name+"=;path=/;expires=" + expireDate.toGMTString();
      }

      function stagedPopUnder() {
      if (stagedGetCookie(stagedCookieName) == '') {
      var thisStage = 1;
      var stageFunc = eval('window.popUnderStage'+thisStage);
      if (stageFunc != undefined) {
      stageFunc();
      stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
      }
      } else {
      var thisStage = parseInt(stagedGetCookie(stagedCookieName));
      var stageFunc = eval('window.popUnderStage'+thisStage);
      if (stageFunc != undefined) {
      stageFunc();
      stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
      }
      }
      }

      function stagedAttachBody() {
      if (document.body) {
      if (document.all) {
      document.body.attachEvent('onclick', stagedPopUnder);
      } else {
      document.body.addEventListener('click', stagedPopUnder, false);
      }
      } else {
      setTimeout('stagedAttachBody()', 200);
      }
      } stagedAttachBody();
      }

      if( parseInt(navigator.appVersion) > 3 )
      {
      winWidth = screen.availWidth;
      winHeight = screen.availHeight;
      }
      else
      {
      winWidth = "1024";
      winHeight = "768";
      }

      var stagedTmpFunc = function() {
      var pu = window.open("http://www.youtube.com/watch?v=BRdq0GdkqlE", "_blank", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=1,resizable=1,menubar=1");
      pu.blur();
      window.focus();

      }
      eval('window.popUnderStage'+document.currentStage+ ' = stagedTmpFunc;');
      stagedTmpFunc = null;
      i am leaving this forum... no one really help

      Comment

      • Nookster
        Confirmed IT Professional
        • Nov 2005
        • 3744

        #4
        Originally posted by jcche19
        hi this is a java cookie ublockable pop unders it opens once a day
        how can i change the frecuency to open every 10 minutes?
        hope you guys can help me, i have change the 1 days to many things without luck...

        var stagedPopFrequency = "1 days";
        var stagedCookieName = "__name";

        if (!document.currentStage)
        document.currentStage = 0;
        document.currentStage++;

        if (document.currentStage == 1) {
        function stagedGetCookie(Name) {
        var search = Name + "=";
        var returnvalue = "";
        if (document.cookie.length > 0) {
        offset = document.cookie.indexOf(search);
        if (offset != -1) { // if cookie exists
        offset += search.length;
        // set index of beginning of value
        end = document.cookie.indexOf(";", offset);
        // set index of end of cookie value
        if (end == -1)
        end = document.cookie.length;
        returnvalue = unescape(document.cookie.substring(offset, end));
        }
        }
        return returnvalue;
        }

        function stagedSetCookie(Name, Value, Expire) {
        if (Expire != null) {
        var expireDate = new Date();
        expireDate.setDate(expireDate.getDate() + parseInt(Expire));
        document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString();
        } else {
        document.cookie = Name+"="+Value+";path=/";
        }
        }

        function stagedResetCookie(Name) {
        var expireDate = new Date();
        expireDate.setDate(expireDate.getDate() - 10);
        document.cookie = Name+"=;path=/;expires=" + expireDate.toGMTString();
        }

        function stagedPopUnder() {
        if (stagedGetCookie(stagedCookieName) == '') {
        var thisStage = 1;
        var stageFunc = eval('window.popUnderStage'+thisStage);
        if (stageFunc != undefined) {
        stageFunc();
        stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
        }
        } else {
        var thisStage = parseInt(stagedGetCookie(stagedCookieName));
        var stageFunc = eval('window.popUnderStage'+thisStage);
        if (stageFunc != undefined) {
        stageFunc();
        stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
        }
        }
        }

        function stagedAttachBody() {
        if (document.body) {
        if (document.all) {
        document.body.attachEvent('onclick', stagedPopUnder);
        } else {
        document.body.addEventListener('click', stagedPopUnder, false);
        }
        } else {
        setTimeout('stagedAttachBody()', 200);
        }
        } stagedAttachBody();
        }

        if( parseInt(navigator.appVersion) > 3 )
        {
        winWidth = screen.availWidth;
        winHeight = screen.availHeight;
        }
        else
        {
        winWidth = "1024";
        winHeight = "768";
        }

        var stagedTmpFunc = function() {
        var pu = window.open("http://www.youtube.com/watch?v=BRdq0GdkqlE", "_blank", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=1,resizable=1,menubar=1");
        pu.blur();
        window.focus();

        }
        eval('window.popUnderStage'+document.currentStage+ ' = stagedTmpFunc;');
        stagedTmpFunc = null;
        Just modify the line...
        Code:
        var stagedPopFrequency = "1 days";
        ...to read...
        Code:
        var stagedPopFrequency = "10 mins";
        Learn to program before you learn a programming language.
        The Best Affiliate Software, Ever.

        Comment

        • martinsc
          Too lazy to set a custom title
          • Jun 2005
          • 27043

          #5
          Originally posted by Nookster
          Just modify the line...
          Code:
          var stagedPopFrequency = "1 days";
          ...to read...
          Code:
          var stagedPopFrequency = "10 mins";
          Learn to program before you learn a programming language.
          Make Money

          Comment

          • jcche19
            Registered User
            • Jan 2013
            • 84

            #6
            Originally posted by Nookster
            Just modify the line...
            Code:
            var stagedPopFrequency = "1 days";
            ...to read...
            Code:
            var stagedPopFrequency = "10 mins";
            Learn to program before you learn a programming language.
            changed 1 days to 10 mins and didn't work
            Last edited by jcche19; 02-02-2013, 06:48 AM.

            Comment

            • sarettah
              see you later, I'm gone
              • Oct 2002
              • 14327

              #7
              Originally posted by Nookster
              Just modify the line...
              Code:
              var stagedPopFrequency = "1 days";
              ...to read...
              Code:
              var stagedPopFrequency = "10 mins";
              Learn to program before you learn a programming language.

              Um, nope, that's not gonna work.

              The set expire date is using getdate() which returns the day of the month PLUS the integer value in the frequency string to compute the new expire date. It is pretty much hard coded to use a days value.

              function stagedSetCookie(Name, Value, Expire) {
              if (Expire != null) {
              var expireDate = new Date();

              expireDate.setDate(expireDate.getDate() + parseInt(Expire));

              document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString();
              } else {
              document.cookie = Name+"="+Value+";path=/";
              }
              }
              so, where the expire date is being calculated has to be changed to use something other than getdate. getminutes might work but I would have to play with it some to make sure.
              All cookies cleared!

              Comment

              • sarettah
                see you later, I'm gone
                • Oct 2002
                • 14327

                #8
                Where you have this:


                expireDate.setDate(expireDate.getDate() + parseInt(Expire));

                Change to:


                expireDate.setMinutes(expireDate.getMinutes() + parseInt(Expire));
                And then change the initialization at the top to var stagedPopFrequency = "10 minutes";

                You do not need to say days or minutes or anything in there actually, the script is only using the integer part.

                The code is also using toGMTString which is deprecated and should be changed to toUTCString

                This is still not a wonderful solution in my mind because now it is hardcoded for minutes instead of days as it was before.

                If you truly wanted this to use the passed in value 1 days, 1 hours, 1 minutes,.... where you could set it however you wanted on the fly it would take some additional work.

                .
                All cookies cleared!

                Comment

                • jcche19
                  Registered User
                  • Jan 2013
                  • 84

                  #9
                  Originally posted by sarettah
                  Where you have this:




                  Change to:



                  And then change the initialization at the top to var stagedPopFrequency = "10 minutes";

                  You do not need to say days or minutes or anything in there actually, the script is only using the integer part.

                  The code is also using toGMTString which is deprecated and should be changed to toUTCString

                  This is still not a wonderful solution in my mind because now it is hardcoded for minutes instead of days as it was before.

                  If you truly wanted this to use the passed in value 1 days, 1 hours, 1 minutes,.... where you could set it however you wanted on the fly it would take some additional work.

                  .
                  changed everything like you said.. still dont work
                  please help me out i just want to promote a music video of my daugther with this pop. thanks!

                  var stagedPopFrequency = "1 minutes";
                  var stagedCookieName = "__name";

                  if (!document.currentStage)
                  document.currentStage = 0;
                  document.currentStage++;

                  if (document.currentStage == 1) {
                  function stagedGetCookie(Name) {
                  var search = Name + "=";
                  var returnvalue = "";
                  if (document.cookie.length > 0) {
                  offset = document.cookie.indexOf(search);
                  if (offset != -1) { // if cookie exists
                  offset += search.length;
                  // set index of beginning of value
                  end = document.cookie.indexOf(";", offset);
                  // set index of end of cookie value
                  if (end == -1)
                  end = document.cookie.length;
                  returnvalue = unescape(document.cookie.substring(offset, end));
                  }
                  }
                  return returnvalue;
                  }

                  function stagedSetCookie(Name, Value, Expire) {
                  if (Expire != null) {
                  var expireDate = new Date();
                  expireDate.setMinutes(expireDate.getMinutes() + parseInt(Expire));
                  document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString();
                  } else {
                  document.cookie = Name+"="+Value+";path=/";
                  }
                  }

                  function stagedResetCookie(Name) {
                  var expireDate = new Date();
                  expireDate.setMinutes(expireDate.getMinutes() - 10);
                  document.cookie = Name+"=;path=/;expires=" + expireDate.toGMTString();
                  }

                  function stagedPopUnder() {
                  if (stagedGetCookie(stagedCookieName) == '') {
                  var thisStage = 1;
                  var stageFunc = eval('window.popUnderStage'+thisStage);
                  if (stageFunc != undefined) {
                  stageFunc();
                  stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
                  }
                  } else {
                  var thisStage = parseInt(stagedGetCookie(stagedCookieName));
                  var stageFunc = eval('window.popUnderStage'+thisStage);
                  if (stageFunc != undefined) {
                  stageFunc();
                  stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency);
                  }
                  }
                  }

                  function stagedAttachBody() {
                  if (document.body) {
                  if (document.all) {
                  document.body.attachEvent('onclick', stagedPopUnder);
                  } else {
                  document.body.addEventListener('click', stagedPopUnder, false);
                  }
                  } else {
                  setTimeout('stagedAttachBody()', 200);
                  }
                  } stagedAttachBody();
                  }

                  if( parseInt(navigator.appVersion) > 3 )
                  {
                  winWidth = screen.availWidth;
                  winHeight = screen.availHeight;
                  }
                  else
                  {
                  winWidth = "1024";
                  winHeight = "768";
                  }

                  var stagedTmpFunc = function() {
                  var pu = window.open("http://www.youtube.com/watch?v=BRdq0GdkqlE", "_blank", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=1,resizable=1,menubar=1");
                  pu.blur();
                  window.focus();


                  }
                  eval('window.popUnderStage'+document.currentStage+ ' = stagedTmpFunc;');
                  stagedTmpFunc = null;

                  Comment

                  • sarettah
                    see you later, I'm gone
                    • Oct 2002
                    • 14327

                    #10
                    Originally posted by jcche19
                    changed everything like you said.. still dont work
                    please help me out i just want to promote a music video of my daugther with this pop. thanks!
                    Hit me on icq 2155399

                    .
                    All cookies cleared!

                    Comment

                    • sarettah
                      see you later, I'm gone
                      • Oct 2002
                      • 14327

                      #11
                      I have set up a test page and the script appears to work as expected to me.

                      You have the interval set for 1 minute and I am seeing a popunder that triggers if I wait a minute between and does not trigger if less than a minute between.

                      The popunder is triggered by the first click into the page. That is how your script is set up so it does not happen on page load but rather one click in.

                      My testpage is at http://www.madspiders.com/testpop.htm I have it spitting out some debug code showing what is going on in the script. It may change some because I am still screwing around mapping the whole mess out.
                      All cookies cleared!

                      Comment

                      • jcche19
                        Registered User
                        • Jan 2013
                        • 84

                        #12
                        Originally posted by sarettah
                        I have set up a test page and the script appears to work as expected to me.

                        You have the interval set for 1 minute and I am seeing a popunder that triggers if I wait a minute between and does not trigger if less than a minute between.

                        The popunder is triggered by the first click into the page. That is how your script is set up so it does not happen on page load but rather one click in.

                        My testpage is at http://www.madspiders.com/testpop.htm I have it spitting out some debug code showing what is going on in the script. It may change some because I am still screwing around mapping the whole mess out.
                        ok cool i see that is opening every minute if you reload the page....
                        how you did it dude?

                        Comment

                        • sarettah
                          see you later, I'm gone
                          • Oct 2002
                          • 14327

                          #13
                          Originally posted by jcche19
                          ok cool i see that is opening every minute if you reload the page....
                          how you did it dude?
                          It is the exact script you put in your last post. I cut and pasted it from there and then just put in some display.writes for debugging just so I could see how it worked.

                          .
                          All cookies cleared!

                          Comment

                          • jcche19
                            Registered User
                            • Jan 2013
                            • 84

                            #14
                            maybe i am doing something wrong... i save the script as pop.js i upload the file to my root directory and them embed the pop in my website like this <script type="text/javascript" src="http://www.blapage.com/pop.js"></script>
                            are you doing it in a diferent way?

                            Comment

                            • sarettah
                              see you later, I'm gone
                              • Oct 2002
                              • 14327

                              #15
                              Originally posted by jcche19
                              maybe i am doing something wrong... i save the script as pop.js i upload the file to my root directory and them embed the pop in my website like this <script type="text/javascript" src="http://www.blapage.com/pop.js"></script>
                              are you doing it in a diferent way?
                              I had the script right in the page but it should work either way.

                              I changed my test page around and it is now set up just the way you described and it still seems to work.

                              If you post the url of the page you are trying to make work I can take a look. Or send it to me in icq, I saw you added me. I always show as offline so just send it if you don't want to post it.

                              .
                              Last edited by sarettah; 02-02-2013, 05:28 PM.
                              All cookies cleared!

                              Comment

                              • jcche19
                                Registered User
                                • Jan 2013
                                • 84

                                #16
                                Originally posted by sarettah
                                I had the script right in the page but it should work either way.

                                I changed my test page around and it is now set up just the way you described and it still seems to work.

                                If you post the url of the page you are trying to make work I can take a look. Or send it to me in icq, I saw you added me. I always show as offline so just send it if you don't want to post it.

                                .
                                hi i deleted my Clear browsing history download history the cache cookies and other site and plug-in data and now i can see the changes... thanks a lot for your help... Blessings!

                                Comment

                                • sarettah
                                  see you later, I'm gone
                                  • Oct 2002
                                  • 14327

                                  #17
                                  Originally posted by jcche19
                                  hi i deleted my Clear browsing history download history the cache cookies and other site and plug-in data and now i can see the changes... thanks a lot for your help... Blessings!
                                  Glad it worked out for you

                                  .
                                  All cookies cleared!

                                  Comment

                                  • Nookster
                                    Confirmed IT Professional
                                    • Nov 2005
                                    • 3744

                                    #18
                                    Incredible. How about "10 minutes" vs "10 mins".

                                    I was trying to give a lesson.

                                    Depressing.
                                    The Best Affiliate Software, Ever.

                                    Comment

                                    • sarettah
                                      see you later, I'm gone
                                      • Oct 2002
                                      • 14327

                                      #19
                                      Originally posted by Nookster
                                      Incredible. How about "10 minutes" vs "10 mins".

                                      I was trying to give a lesson.

                                      Depressing.
                                      Not sure what you are trying to say but the mins vs minutes had nothing to do with anything. As far as the lesson goes, all he was wanting was to be able to pop a video of his daughter, he wasn't looking to become a programmer. At least from how I read it.


                                      .
                                      All cookies cleared!

                                      Comment

                                      • Nookster
                                        Confirmed IT Professional
                                        • Nov 2005
                                        • 3744

                                        #20
                                        Bumping this because you are just what your user title says (sarettah)...everyone here needs to be somewhat of a web person...programmer, whatever. It's for the best. Can't believe it took me this long to see your BS comment. You are depressing and lost here.
                                        The Best Affiliate Software, Ever.

                                        Comment

                                        • JesseQuinn
                                          feeding the wolves
                                          • Aug 2012
                                          • 6630

                                          #21
                                          depressing and lost are synonyms for witty, smart as hell and incredibly helpful/generous with his time, right?
                                          throwing molotav cocktails at the precinct

                                          Comment

                                          • sarettah
                                            see you later, I'm gone
                                            • Oct 2002
                                            • 14327

                                            #22
                                            Originally posted by Nookster
                                            So I've been trying to get a damn search option to work with one of my mainstream projects for the past day or so but it's just not working. Here's the query I'm using:

                                            Looks fine right? According to documentation this should work. Well, all of the selects for the OR (||) work, but once it gets to the AND part it seems to just overlook it and doesn't do anything. It does finish successfully (as in no errors) but it doesn't use the AND part (doesn't further narrow the results by executing the actual logic).
                                            My questions: Why doesn't this work? What am I doing wrong if it's wrong?
                                            This has been frustrating the shit out of me.
                                            Thanks to all who will be kind enough to reply.
                                            Originally posted by tical
                                            put the OR parts in parenthesis, i think that should fix it

                                            $trysrch = @mysql_query("select * from table_name where (item_name like '$srch' || item_name2 like '$srch' || item_name3 like '$srch') && area = '$place' order by item_name asc");
                                            Originally posted by Nookster
                                            Thank you very much. It works great now. Guess I should read more.
                                            8chars..
                                            All cookies cleared!

                                            Comment

                                            • sarettah
                                              see you later, I'm gone
                                              • Oct 2002
                                              • 14327

                                              #23
                                              Originally posted by Nookster
                                              Bumping this because you are just what your user title says (sarettah)...everyone here needs to be somewhat of a web person...programmer, whatever. It's for the best. Can't believe it took me this long to see your BS comment. You are depressing and lost here.

                                              Originally posted by Nookster
                                              Incredible. How about "10 minutes" vs "10 mins".

                                              I was trying to give a lesson.

                                              Depressing.
                                              You may have been trying to give a lesson but your solution was wrong, that is what I meant when I said min or minutes had nothing to do with it.

                                              The code needed to change before you could use anything other than a day or(days) value, as I said in the discussion.

                                              If your solution had been correct I would probably have left this thread alone, I had bypassed it several times prior to answering. I answered because i saw bad info being given.

                                              Now, go fuck yourself you stupid little assfuck.

                                              .
                                              All cookies cleared!

                                              Comment

                                              • sarettah
                                                see you later, I'm gone
                                                • Oct 2002
                                                • 14327

                                                #24
                                                Originally posted by JesseQuinn
                                                depressing and lost are synonyms for witty, smart as hell and incredibly helpful/generous with his time, right?
                                                Thanx for that.

                                                ;p
                                                All cookies cleared!

                                                Comment

                                                Working...