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

Posted on 2009-05-15
Last Modified: 2013-12-12
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?
Question by:mpaert
  • 2
  • 2
  • 2
  • +2

Expert Comment

ID: 24400822
You want to check when a file was last edited?


// 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


Author Comment

ID: 24401737
Dear Markh,

Thank you, but I'm not looking for file date, but last change date of a MySQL database.

Expert Comment

ID: 24402055
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.

Expert Comment

ID: 24402225
try lookin in this thread... may be it will help you...

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

LVL 11

Accepted Solution

j-b-t earned 500 total points
ID: 24409987
If are you just wanting to show
"last updated on    xxx" - actually by default "last modified on" will show  -
on every page - go to (along top)
click article manager in drop down
in article manager clilick parameters (top right)
in parameters select "show" on Modified Date and Time - click save top right

This sets the default for all articles - within each article you also have the choice to manually set these parameters

Author Comment

ID: 24410018
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.
LVL 11

Assisted Solution

j-b-t earned 500 total points
ID: 24410500
OK - then you just need a module to display last date anything modified - so why not just modify  the newsflash or latest news module to do this

Expert Comment

ID: 24646385
j-b-t's method works.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now