Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-05-15
10
Medium Priority
?
432 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Ready to get certified? Check out some courses that help you prepare for third-party exams.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

886 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