SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member
    Join Date
    Sep 2000
    Location
    Melbourne, Australia.
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Guru!

    I am looking for a scripting (CGI / Perl / JavaScripts) that updates the images itself on certain time and day.

    I am currently building a new radio station website. They would like to have a face of radio annoucer / personality on home page when they are currently on air.

    Say, Mon to Fri, there announcer on air from 8am to 10am - put on photo on website. Then change annoucer's face from 10am to 12pm, etc, etc, around the clock. On weekends, different annoucers, etc.

    I have tried looking and searching for scripts on such as 'Earthweb', 'ScriptSearch - CGI', 'JavaScript.com', and 'Matt's Script Archives', etc. Some of them do have them, but only 'time of the day and limited to 5 or 6 images', not including each days as well.

    I've tried looked up on 'Banner Rotator' and nothing good or any luck.

    Do you know where I can get these? Either for free to copy or I can buy scripts at good price? Or is there someone can create it simple and easy?

    It can be Perl / CGI / JavaScripts and I can use it on plain HTML or use ASP.


    Look forward to your reply.

    Best regards,

    LYNDON
    Melbourne - Australia.

  2. #2
    I'm baaaaaaaaaaaaack! Fluffykins's Avatar
    Join Date
    Aug 2000
    Location
    Manchester, UK
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi! I think i've found a JavaScript that could be of help:

    Code:
    <script LANGUAGE="JavaScript">
    <!--
    today = new Date(); if(today.getMinutes() < 10) {pad = "0"} else pad = "";
    if((today.getHours() < 12) && (today.getHours() >= 6)) {document.write("<IMG width='164' height='30' SRC='images/gm.gif'>")}
    
    if((today.getHours() >= 12) && (today.getHours() < 18)) {document.write("<IMG width='164' height='30' SRC='images/ga.gif'>")}
    
    if((today.getHours() >= 18) && (today.getHours() <= 23)) {document.write("<IMG width='164' height='30' SRC='images/ge.gif'>")}
    
    if((today.getHours() >= 0) && (today.getHours() < 4)) {document.write("<IMG width='164' height='30' SRC='images/gme.gif'>")}
    
    if((today.getHours() >= 4) && (today.getHours() <= 6)){document.write("<IMG width='164' height='30' SRC='images/gmve.gif'>")}
    
    if((today.getDate() == 25) && (today.getMonth() == 11)) {document.write("<BR><FONT SIZE=5  FACE='Arial,Helvetica' COLOR=red><B><BLINK>Have a Happy Christmas Day</BLINK></B></FONT>")}
    
    if((today.getDate() > 25) && (today.getDate() <= 31) && (today.getMonth() == 11)){document.write("<BR><FONT SIZE=5  FACE='Arial,Helvetica' COLOR=maroon><B><BLINK>Merry Christmas</BLINK></B></FONT>")}
    
    if((today.getDate() >= 1) && (today.getDate() <= 8) && (today.getMonth() == 0)){document.write("<BR><FONT SIZE=5 FACE='Arial,Helvetica' COLOR=red><B><BLINK>A Prosperous &amp; Happy 1998!</BLINK></B></FONT>")}
    
    // -->
    </script>
    Each of these if statements checks the time and writes some HTML based on what time it is. You can use the HTML to disply an image, or some text depending on the time of day and / or day of year by building up these IF statements and changing them.

    I use a simplified version myself to greet visitors with a good morning, good afternoon or good evening based on the time of day.

    Hope that helps a bit.

    Ady
    v-technologies - Freelance Goodness.

  3. #3
    SitePoint Member
    Join Date
    Sep 2000
    Location
    Melbourne, Australia.
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Adrian,

    Thanks for your reply with JavaScript.

    I have tried and test it - it works well with time of the day - perfect.

    However I have modify little bit to try and make them to update itself when checking the time as well as the day. It is pretty cool, but the problem is to do with correct time and date with other Internet users around the world.

    Now - what I need is to put them on web server side instead of HTML based because the radio station is only located in Melbourne, Australia - and those cities around Australia or the world have different times and day which would be incorrect when radio goes live streaming. Putting them on web server located in Melbourne will have correct local time and day.

    There must be a way doing this like "<!-virtual file....!> to run the script on server side to check the date and time, then put correct GIF image in HTML.

    Does anyone know how to write this or have a copy please? (desprate!)

    Look forward to your or anyone's reply.

    Regards,

    LYNDON

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2000
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good Day,

    Just ran across this forum. Great info. Would like some help with this script. I understand about 50% of this which leaves the other 50%.

    For an example:
    If I wanted to display an image lets say on December 4 2000 between the hours 11 am till 2 pm . If someone could show me an example of how this would look, I would greatly appreciate it.

    Fluffykins if you can remember where you found this script and pass it on to me that would be great.

    Thanks, BrewSkee

  5. #5
    SitePoint Member
    Join Date
    Sep 2000
    Location
    Melbourne, Australia.
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi BrewSkee,

    Thats correct with what I am trying to find a script like you said:

    "For an example:
    If I wanted to display an image lets say on December 4 2000 between the hours 11 am till 2 pm."


    Something like that - same every week including time and day - I would like to see if anyopne has the scripts or program that I can have, please!?

    Fingers crossed....

    Ciao,

    LYNDON


  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2000
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lyndon,

    Just wanted to let you know I'm still working on this. If you find out anything let me know and I'll do the same. Either email me or post here.

    Good Day
    Brewskee

  7. #7
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everyone,

    I believe I have some information on what you are seeking. Is your server capable of ASP programming? This would be a SNAP. Server-side is what ASP is built for, and the methods are so easy that I could translate them from the JavaScript in about 5 minutes. Let me have some input.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  8. #8
    SitePoint Member
    Join Date
    Sep 2000
    Location
    Melbourne, Australia.
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Goober,

    Yes, my server is capable of ASP programming - supports ASP.


    Glad to know and look forward to it, thanks.



    LYNDON

  9. #9
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay,

    First of all, I need a list of all times and dates. Send them to sean@interfall.com. Then, I will make you the ASP Script and you can place it in your file. DJ Names / Crews would be good, too. Do you have any knowledge of ASP? That will give me the proper way to instruct you how to use it.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  10. #10
    SitePoint Enthusiast sadhu's Avatar
    Join Date
    Nov 2000
    Location
    Vancouver, BC
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To: goober

    can you send me the ASP script too! Sounds really useful and i am just getting my feet wet with ASP programming. Just set up an online database easy enough.
    sadhu@coolindian.com
    p.s. spammers leave my email address alone. i dont want you knocking on my door.

    To: everyone
    By the way any EXCELLENT ASP resources out there. i've come across dozens, but nothing EXCELLENT.

    Boom shiva

  11. #11
    SitePoint Member
    Join Date
    Sep 2000
    Location
    Melbourne, Australia.
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Sean (Goober),

    I have just send email to you with all times and day as requested.

    Look forward to the results and much needed help.

    Thanks again.


    LYNDON

  12. #12
    SitePoint Enthusiast
    Join Date
    Nov 2000
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I'm up a creek as can't use ASP at this time. But if someone would be so kind to show me a way that I can do the following:

    Display an image lets say on December 4 2000 between the hours 11 am till 2 pm . If someone could show me an example of how this would look, I would greatly appreciate it.

    The script that was posted above can that be used for this and also in that same script what is pad="0") else pad=""

    thanks
    BrewSkee




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •