Link to home
Start Free TrialLog in
Avatar of mpaert
mpaert

asked on

How to add "Last updated on xx/xx/xx" in Joomla

I need to add a site-wide "last updated on xx/xx/xx", meaning that if any pages would have been edited or added, the PHP script would display the most recent article. Is this possible? Yes or no? If yes, then how?
Avatar of markh789
markh789

You want to check when a file was last edited?

<?php
// if windows use C:/path/to/the/file.php
$get_file_time = filectime("/full/path/to/the/file.php");
$formateddate = date("F j, Y", $s);
echo("Las Updated on " . $formateddate);
?

Open in new window

Avatar of mpaert

ASKER

Dear Markh,

Thank you, but I'm not looking for file date, but last change date of a MySQL database.
in that case you need to add a timestamp field to your database.

then select the most recent timestamp:

"select timestamp from table order by timestamp" - where timestamp is the name of your timestamp column.
try lookin in this thread... may be it will help you...
Link: http://forum.joomla.org/viewtopic.php?t=28343

HTH
manavsi
ASKER CERTIFIED SOLUTION
Avatar of j-b-t
j-b-t
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mpaert

ASKER

Hi jbt,

Thank you, I am aware of this function. What I want is a PHP script that looks at all "Last modivied" dates on the database from specific categories. I want to display on the homepage, when the site was last modified.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
j-b-t's method works.