Changing Links Daily

Discussion in 'HTML' started by Alric Knebel, Oct 7, 2004.

  1. Alric Knebel

    Alric Knebel Guest

    I'm relatively new to HTML, and my coding at present is very fundamental. I
    have a page on my website on which ten different buttons link to an MP3.
    But the MP3 could change frequently, almost daily. Now, I've been looking
    at CSS, but so far I haven't incorporated a single CSS into any of my pages.
    Maybe I'm jumping to the wrong conclusion, but I was thinking that CSS is
    the answer to my problem. Follow me a moment, and some of you guys probably
    already have a solution to this.

    Here's the deal. I have a short MP3. Rarely will they be more than a
    minute long. I have a jpeg button you click on to activate the MP3. Now,
    tomorrow, I might want to change that MP3. So far, with my limited
    knowledge of HTML, I'll have to open the code in an editor and change the
    name of the MP3, save the changed HTML file, then upload it to the site,
    where the new code will overwrite the old code. This hardcoding is a clunky
    way to do this. I know there's got to be a better way to do this than the
    way I just described. Here's what I was thinking.

    I was thinking that I'd have a generic name for the link in the HTML. For
    example, I'll reference the MP3 in the HTML code as simply, say,
    "current_sound.mp3." There are several buttons on this page with a
    different sound associated with each button; you can imagine that this could
    get very awkward and take up a lot of time if I wished for my site to stay
    current. As in CSS, somewhere in the hardcoded page would be a reference to
    some external file that would assign a value to "current_sound.mp3". The
    external text file might have a line that says,
    "current_sound.mp3"="C-SPAN-100504.mp3".

    I would like to know two things. First, is what I'm suggesting possible?
    Second, if it's possible, can you give me a hint as to what direction to go
    in? What code am I looking for, what's it called?

    In conclusion, I haven't worked yet in JavaSript, but I was thinking that
    I'd create a small script that would list on one side the hardcoded filename
    and in another column the actual file associated with each file name, which
    would then write them all to the text file, then upload that text file to
    the website, where the HTML page would access the information.

    I hope I made this clear. Thanks for any help. For clarity, I've included
    the page I'm talking about in the link below.

    Alric Knebel
    http://www.ironeyefortress.com/C-SPAN_loon.html
    Alric Knebel, Oct 7, 2004
    #1
    1. Advertising

  2. Alric Knebel

    brucie Guest

    In alt.html Alric Knebel said:

    > I have a page on my website on which ten different buttons link to an
    > MP3. But the MP3 could change frequently, almost daily. Now, I've
    > been looking at CSS,


    html describes a document and css adds styling to it so they're not what
    you need. you need to use some giggly bits of sexy php

    > Here's the deal. I have a short MP3. Rarely will they be more than a
    > minute long. I have a jpeg button you click on to activate the MP3. Now,
    > tomorrow, I might want to change that MP3.


    the easiest i can think of off the top of my head is to name your mp3s
    the days of the week you want them to play.

    sunday.mp3, monday.mp3, tuesday.mp3 etc etc etc

    place them in the same directory as the html page that uses them.

    in your html document use the following line:

    <a href="<?echo strtolower(date(l)).'.mp3'; ?>">play my mp3</a>

    save the html document with a .php extension so the server knows to
    prase the above php before sending the page to the visitors browser.
    the html page they receive will have the above php replaced with this:

    <a href="thursday.mp3">play my mp3</a>

    (obviously it will depend on what the day of week is)

    all done automatically with no intervention from you. easy peasy

    --
    l i t t l e v o i c e s m a k e m e
    brucie, Oct 7, 2004
    #2
    1. Advertising

  3. Alric Knebel

    brucie Guest

    In alt.html brucie said:

    > you need to use some giggly bits of sexy php


    just noticed your server is IIS so chances are you cant use young hip
    and sexy PHP, you're probably stuck with bills dirty old whore ASP


    --
    l i t t l e v o i c e s m a k e m e
    brucie, Oct 7, 2004
    #3
  4. While the city slept, Alric Knebel () feverishly typed...

    > I'm relatively new to HTML, and my coding at present is very
    > fundamental. I have a page on my website on which ten different
    > buttons link to an MP3. But the MP3 could change frequently, almost
    > daily. [...]


    How about you don't change the name of the mp3? Upload your mp3 file, then
    change its name to something like "mp3oftheday.mp3" then the link <a
    href="mp3oftheday.mp3">MP3 of the day</a> will always play the most recent
    one. To keep an online archive, before you ftp the current mp3oftheday.mp3,
    rename the exisiting one with its original filename.

    Hope that helps,
    Nige

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
    nice.guy.nige, Oct 7, 2004
    #4
  5. Alric Knebel

    WebcastMaker Guest

    In article <>,
    says...
    > > you need to use some giggly bits of sexy php

    > just noticed your server is IIS so chances are you cant use young hip
    > and sexy PHP, you're probably stuck with bills dirty old whore ASP


    why? just use it on iis.
    --
    WebcastMaker
    Webcasting for free
    http://www.webentations.com
    http://www.webcastmaker.com (CBT)
    WebcastMaker, Oct 7, 2004
    #5
  6. On Thu, 07 Oct 2004 15:08:47 +1000, brucie wrote:

    > just noticed your server is IIS so chances are you cant use young hip
    > and sexy PHP, you're probably stuck with bills dirty old whore ASP


    Technically, of course, PHP predates ASP:

    <http://en.wikipedia.org/wiki/Php#History>
    <http://support.microsoft.com/default.aspx?id=fh;%5Bln%5D;lifeprodi>
    (Note the life cycle of IIS 3 -- which was the first to ship with ASP)

    later...
    --
    Jeffrey D. Silverman |
    Website | http://www.newtnotes.com

    Drop "PANTS" to reply by email
    Jeffrey Silverman, Oct 7, 2004
    #6
  7. Alric Knebel

    Alric Knebel Guest

    "nice.guy.nige" <> wrote in message
    news:...
    > While the city slept, Alric Knebel () feverishly
    > typed...
    >
    >> I'm relatively new to HTML, and my coding at present is very
    >> fundamental. I have a page on my website on which ten different
    >> buttons link to an MP3. But the MP3 could change frequently, almost
    >> daily. [...]

    >
    > How about you don't change the name of the mp3? Upload your mp3 file, then
    > change its name to something like "mp3oftheday.mp3" then the link <a
    > href="mp3oftheday.mp3">MP3 of the day</a> will always play the most recent
    > one. To keep an online archive, before you ftp the current
    > mp3oftheday.mp3,
    > rename the exisiting one with its original filename.
    >
    > Hope that helps,
    > Nige


    Yes, I did think of that. I can just access it via FTP and rename the files
    as I need them. But I was hoping it would be an opportunity to learn
    something . . . SEXY (as Bruce put it). I did think of that first, just
    naming the files according to the line I want them on, the most current file
    in the code titled "current.mp3," and so on. As the files are named now,
    they day of the call is embedded in the title. I was hoping to retain that
    convention, just so I can avoid any mix-ups. But you guys have been a lot
    of help.

    Alric Knebel
    Alric Knebel, Oct 7, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. matt
    Replies:
    1
    Views:
    9,663
    =?Utf-8?B?cm9iX2Jvc3Rvbg==?=
    Apr 6, 2004
  2. i. Wiin

    Daily Graphs of activity

    i. Wiin, Sep 30, 2004, in forum: ASP .Net
    Replies:
    13
    Views:
    717
    Lucas Tam
    Oct 6, 2004
  3. ree32

    Running a Daily Routine/Process

    ree32, Apr 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    423
    Curt_C [MVP]
    Apr 29, 2005
  4. Steve Richter

    Running daily process on hosted web site

    Steve Richter, May 3, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    519
    Steve Richter
    May 6, 2005
  5. K.S.Sreeram

    daily python url - gmane links dead?

    K.S.Sreeram, Jun 13, 2006, in forum: Python
    Replies:
    0
    Views:
    258
    K.S.Sreeram
    Jun 13, 2006
Loading...

Share This Page