Jump to content

kimber

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by kimber

  1. <script>
    function myFunction() {
      var x = document.lastModified;
      document.getElementById("demo").innerHTML = x;
    }
    </script>

    Can I attach this javascript to a html download link so it shows the last time the link (file) was updated?  The links are like this:

    <a href="http://url.com">News.mp3</a>

    Link is: News.mp3
    Last Updated:Fri Jun 14, 2020 05:20:13 pm

    Ever time the audio file is replaces it shows the last updated.

    I assume I can't but I'm getting desperate and figured I'd ask.

    Thank you
    Kim

  2. 19 minutes ago, Ingolme said:

    If you are loading the file from another website, you have no way to know when it was last modified. To find out the modification time of a file, it has to be on your server.

    The ?ver=2.0 probably is just there so that older versions of the file are not loaded from the browser cache.

    Thank you for your time, I can put the file any place I want it.  

  3. 21 hours ago, Ingolme said:

    That's not a tutorial, it is a reference page. References provide technical details about a function for somebody who already knows how to use functions. The reference expects your code to have access to a getID3 object, which does not appear in the reference manual, so it probably is an external resource.

    If you just want to know when a file was modified, PHP has a built in function filemtime() which returns a UNIX timestamp. the date() function can turn the UNIX timestamp into a meaningful string.

    Thanks, I will look at these links.  I'm also looking at timeStamp Event Property to see if it can be used to create a Last Updated: Date and Time using html codes. 

    The links before rebuilding the website are:  (Last update on this website was 2015) 
    The links come from a folder outside of wordpress. I have a plugin that can forward all mp3 to another folder in the same cpanel.

    <a href="http://sitename.com/programs/news011.mp3?ver=2.0">News011.mp3</a>

    File Link: News011.mp3
    Last Updated:Tue Jun 16, 2020 03:06:17 pm

    I can't figure out what this ?ver="2.0 means and thought maybe it a html code.  I 

    Sorry for the rambling. I'm really want to learn this so if there is an future issue with this, I can understand it. It a new client. 

    Thanks for listening
    Kimberly

     

     

  4. Hi, I've been trying to find a tutorial that will tell me how to add a timestamp (Last updated: date and time) of a mp3 audio link or next tot he link in wordpress. I'm using "link to media file" type of audio link. The files are often overwritten so the timestamp needs to date each time the file replaced by our overwrite plugin.  Anyways, while looking for tutorials I found  https://developer.wordpress.org/reference/functions/wp_get_media_creation_timestamp/  but it really doesn't explain must to the reader. If this article suppose to tell me how to do something? If so, I sure can't figure out what. I have no probably editing the php files if I can find a tutorial but on this subject I can't. 

    Thank you for your time
    Kimberly

     

  5. Hi, kind of new here. I use to be member several years ago.  Anyways, I've worked some with css over the years and can usually find what I need to change using the inspect codes, but not this time. On my website which is wordpress using Divi theme. I need to show the date and time of the last update of a media file. The media files, MP3 files, are updated daily with a media overwrite plugin. I have be researching the issues for week now and having no luck. I hope someone here can tell me if it ever possible to use css to put the metadate under a media html link. 

    The link is

     <a href="URL.mp3">File Name</a>

    On the public side it would show like the below example but the last updated would change each time the file updates.  I thought the css would be a way to also show this.   

    File Link: audio1.mp3
    Last Updated:Fri Jun 12, 2020 03:20:13 pm

    File Link: audio2.mp3
    Last Updated:Fri Jun 14, 2020 05:20:13 pm
     

    Thank you for your time
    Kimberly

×
×
  • Create New...