Rotating banner - is daily rotation possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • AliB
    Corporal

    • Sep 2009
    • 18

    Rotating banner - is daily rotation possible?

    Hi there
    If it is possible, please help with tips to do the following:
    I would like to add a rotating banner containing 7 pictures (each of which need an external link) - the banner only needs to rotate every 24 hours. Is there such an application?
    Thanks in advance!
    Alison
    http://www.where-to-stay-southafrica.com

    sigpic
  • wysiwyg4
    Major

    • Nov 2007
    • 477

    #2
    Re: Rotating banner - is daily rotation possible?

    Is the 24 hour-gap between the seven images.

    For example, if you display one image today,
    the next in line will get displayed after 24 hours.

    So the first one will get its turn again after 7 days.

    Is that what you meant?

    If not, then could you explain in more detail?
    Doable Personal Finance

    Comment

    • wysiwyg4
      Major

      • Nov 2007
      • 477

      #3
      Re: Rotating banner - is daily rotation possible?

      Or

      You want to display one image for the whole 24 hours.
      And that would be one image for the whole Internet world to see
      for that day?

      And then the second day, the second one.

      and so on. So on the 8th day, the process repeats itself.
      Doable Personal Finance

      Comment

      • AliB
        Corporal

        • Sep 2009
        • 18

        #4
        Re: Rotating banner - is daily rotation possible?

        yes, that's exactly what I mean - each of the seven images are viewed one per day for 7 days.........all starts over again on day 8 - same images in same rotation!!!!
        Alison
        http://www.where-to-stay-southafrica.com

        sigpic

        Comment

        • AliB
          Corporal

          • Sep 2009
          • 18

          #5
          Re: Rotating banner - is daily rotation possible?

          Please help - can nyone let me know if this is possible?
          Tx
          Alison
          http://www.where-to-stay-southafrica.com

          sigpic

          Comment

          • Collectors-info
            General

            • Feb 2006
            • 8703

            #6
            Re: Rotating banner - is daily rotation possible?

            Place the script below in a html box on your page. Then change the parts in red for your image url's.
            Only the 20th & 21st will work at the moment.

            <script>
            <!--
            var today_obj=new Date()
            var today_date=today_obj.getDate()

            var tips=new Array()
            //Configure the below variable to contain the "header" of the tip
            var tiptitle=''

            //Configure the below array to hold the 31 possible tips of the month
            tips[1]='Tip for day 1 here'
            tips[2]='Tip 2 goes here'
            tips[3]='Tip 3 goes here'
            tips[4]='Tip 4 goes here'
            tips[5]='Tip 5 goes here'
            tips[6]='Tip 6 goes here'
            tips[7]='Tip 7 goes here'
            tips[8]='Tip 8 goes here'
            tips[9]='Tip 9 goes here'
            tips[10]='Tip 10 goes here'
            tips[11]='Tip 11 goes here'
            tips[12]='Tip 12 goes here'
            tips[13]='Tip 13 goes here'
            tips[14]='Tip 14 goes here'
            tips[15]='Tip 15 goes here'
            tips[16]='Tip 16 goes here'
            tips[17]='Tip 17 goes here'
            tips[18]='Tip 18 goes here'
            tips[19]='Tip 19 goes here'
            tips[20]='<img src="http://www.vodahost.com/vodatalk/vb3bluesaint/misc/logo.gif" alt="">'
            tips[21]='<img src="http://www.vodahost.com/vodatalk/vb3bluesaint/misc/logo.gif" alt="">'
            tips[22]='Tip 22 goes here'
            tips[23]='Tip 23 goes here'
            tips[24]='Tip 24 goes here'
            tips[25]='Tip 25 goes here'
            tips[26]='Tip 26 goes here'
            tips[27]='Tip 27 goes here'
            tips[28]='Tip 28 goes here'
            tips[29]='Tip 29 goes here'
            tips[30]='Tip 30 goes here'
            tips[31]='Tip 31 goes here'

            document.write(tiptitle)
            document.write(tips[today_date])
            </script>
            Regards Chris.

            Collectables, Collecting, collectors-info.com

            www.chrismorris.co.uk

            House build project

            Comment

            • wysiwyg4
              Major

              • Nov 2007
              • 477

              #7
              Re: Rotating banner - is daily rotation possible?

              Another flavor of what you need, perhaps?

              You can tweak it to your liking.

              I will test it tomorrow and the next day to see if it correctly
              picks up the day and displays the image accordingly.

              Obviously you have to change the images and URL.

              As you can see, target is set to _blank for all URLs.

              You can remove the document.writeln two statements if you want.

              As you can see new date is picked up ONLY when the page is refreshed.

              Otherwise, you can bring it into the loop. However, that would be an
              overkill.

              I modified BlueVoda logic for rotating images.

              <script language="JavaScript" type="text/javascript">

              var RotatingImage1_Images = new Array(1);
              var RotatingImage1_URLs = new Array(1);
              var RotatingImage1_Targets = new Array(1);
              var weekday = new Array(1);

              var RotatingImage1_Index = 1;

              RotatingImage1_Targets[1] = "_blank";

              var d=new Date();
              var dnum=d.getDay();


              switch (dnum)
              {
              case 0 :
              RotatingImage1_Images[1] = "http://www.mywebsiteworkout.com/ad-rotator-bv.gif";
              RotatingImage1_URLs[1] = "http://www.vodahost.com/partner/idevaffiliate.php?id=8418_1_1_69";
              weekday[1]="Sunday";
              break;

              case 1 :
              RotatingImage1_Images[1] = "http://www.mywebsiteworkout.com/ad-rotator-vh.gif";
              RotatingImage1_URLs[1] = "http://www.vodahost.com/partner/idevaffiliate.php?id=8418_0_1_139";
              weekday[1]="Monday";
              break;

              case 2 :
              RotatingImage1_Images[1] = "http://www.mywebsiteworkout.com/ad-rotator-gp.gif";
              RotatingImage1_URLs[1] = "http://www.vodahost.com/partner/idevaffiliate.php?id=8418_10_1_90";
              weekday[1]="Tuesday";
              break;

              case 3 :
              RotatingImage1_Images[1] = "http://www.mywebsiteworkout.com/ad-rotator-sb.gif";
              RotatingImage1_URLs[1] = "http://www.seobook.com/3578-1-1-26.html";
              weekday[1]="Wednesday";
              break;

              case 4 :
              RotatingImage1_Images[1] = "http://www.mywebsiteworkout.com/ad-rotator-wc.gif";
              RotatingImage1_URLs[1] = "http://www.webceo.com/cgi-bin/go/clickthru.cgi?id=wysiwyg4";
              weekday[1]="Thursday";
              break;

              case 5 :
              RotatingImage1_Images[1] = "http://www.mywebsiteworkout.com/ad-rotator-bv.gif";
              RotatingImage1_URLs[1] = "http://www.vodahost.com/partner/idevaffiliate.php?id=8418_1_1_69";
              weekday[1]="Friday";
              break;

              default :
              RotatingImage1_Images[1] = "http://www.mywebsiteworkout.com/ad-rotator-vh.gif";
              RotatingImage1_URLs[1] = "http://www.vodahost.com/partner/idevaffiliate.php?id=8418_0_1_139";
              weekday[1]="Saturday";
              }

              function RotatingImage1ShowNext()
              {
              eval("document.RotatingImage1.src = RotatingImage1_Images[" + RotatingImage1_Index + "]");
              RotatingImage1ShowNext();
              }

              function onRotatingImage1Click()
              {
              targetwin = RotatingImage1_Targets[RotatingImage1_Index];
              eval("window.open(url = RotatingImage1_URLs[RotatingImage1_Index],'" + targetwin +"');");
              }

              document.writeln("<PRE>Image for " + weekday[1]);
              document.writeln("</PRE>");

              </script>
              <a href="#" onClick="onRotatingImage1Click();return false;">
              <img src="http://www.mywebsiteworkout.com/ad-rotator-bv.gif" id="RotatingImage1" border="0" align="top" width="468" height="60" name="RotatingImage1"></a>

              <script>
              RotatingImage1ShowNext();
              </script>
              Doable Personal Finance

              Comment

              • USMarine
                Private

                • Dec 2009
                • 1

                #8
                Re: Rotating banner - is daily rotation possible?

                I had issues running this in IE. Everything else worked but in IE I get an "Out of memory at line" error. In my case it's line 189. That code is as follows:

                eval("document.RotatingImage1.src = RotatingImage1_Images[" + RotatingImage1_Index + "]");

                Anything you can advise me on would be much appreciated.

                Thanks,
                Kenny

                Comment

                • mjshort
                  Sergeant

                  • Jun 2009
                  • 23

                  #9
                  Re: Rotating banner - is daily rotation possible?

                  Hi I'm not an expert but can u not add a baner rotator with 7 pictures and then put the pause time as 86400 seconds?

                  Regards,

                  Martin

                  Comment

                  Working...
                  X