Solved

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

Posted on 2009-05-15
10
427 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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Integrating blogs between to separate WordPress websites 4 23
php subtract from date 2 26
PHP SMTP authentication 6 23
How to use 2 ON statements in inner join 3 20
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

713 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