News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Get modified time from File

Started by ColinM, 22.03.2015 16:27:39

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ColinM

Arno
Some people overwrite existing files in the downloads with an updated version with same name etc. Using a placeholder like {modified_date_from_file} would be useful.  PHP routine filemtime() seems to get the appropriate info.

Other functions would also be useful such as file size and file type
Similarly php function filesize gets the size.  Maybe using the stat function would be better to get all the info

Colin
Colin M
  •  

Arno

Hi Colin,
when you upload a file on the server he gets always the current date/time from the server.
So when a user need to define a special 'file date', we have already a special field for this. So i think it is not realy useful to add another field for this.
When a user overwrite the file with a newer version, the download modification time is always updated. So he should normally also be the same as the file date /when updated).

Or i have misunderstood you?  ::)
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

ColinM

Arno
I was thinking about people who do updates to files using ftp or their cpanel to overwrite files directly.  Maybe a special 'tool' that would 'refresh' things like dates, file size and so on would be the way to do it rather than having more layout placeholders.  I presume there is some code to handle getting the file info in the auto monitoring.
Colin
Colin M
  •