Solved

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

Posted on 2009-05-15
10
419 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 4

Expert Comment

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

HTH
manavsi
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 11

Accepted Solution

by:
j-b-t earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
j-b-t's method works.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

"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,…
This article discusses four methods for overlaying images in a container on a web page
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.
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.

743 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

11 Experts available now in Live!

Get 1:1 Help Now