Solved

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

Posted on 2009-05-15
10
423 Views
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?
0
Comment
Question by:mpaert
  • 2
  • 2
  • 2
  • +2
10 Comments
 
LVL 3

Expert Comment

by:markh789
ID: 24400822
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

0
 

Author Comment

by:mpaert
ID: 24401737
Dear Markh,

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

Expert Comment

by:adamjimenez
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.
0
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 4

Expert Comment

by:manavsi
ID: 24402225
try lookin in this thread... may be it will help you...
Link: http://forum.joomla.org/viewtopic.php?t=28343

HTH
manavsi
0
 
LVL 11

Accepted Solution

by:
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 yoursite.com/administrator/content (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
0
 

Author Comment

by:mpaert
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.
0
 
LVL 11

Assisted Solution

by:j-b-t
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
0
 
LVL 3

Expert Comment

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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

806 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