Displaying a "Last Updated" timestamp?

Discuss the development and implementation of Joomla! modules here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
taupecat
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Feb 19, 2007 8:56 pm

Displaying a "Last Updated" timestamp?

Postby taupecat » Mon Feb 19, 2007 10:32 pm

I'm creating a module that's a simple announcement banner.  I'd like the display to include a timestamp of when the module was last updated through the administrator interface.

I'd like the final product to look something like this:

---------------------------------------------------------------
|  This is an announcement.                        |
|  Last Updated: February 19, 2007 5:31 PM  |
---------------------------------------------------------------

How can I accomplish this?

Thanks much

-- t

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 21218
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, The Netherlands
Contact:

Re: Displaying a "Last Updated" timestamp?

Postby pe7er » Mon Feb 19, 2007 10:59 pm

taupecat wrote:I'm creating a module that's a simple announcement banner.  I'd like the display to include a timestamp of when the module was last updated through the administrator interface.

I'd like the final product to look something like this:

---------------------------------------------------------------
|  This is an announcement.                        |
|  Last Updated: February 19, 2007 5:31 PM  |
---------------------------------------------------------------

How can I accomplish this?


I created the module "Site Last Modified" ( http://extensions.joomla.org/component/ ... Itemid,35/ ) with the creation and modification date that is stored in the jos_content table.

Unfortunatelly the jos_modules does not contain any date info that is in use (the only datetime field "checked_out_time" seems not to be in use as it's "0000-00-00 00:00:00" for all modules).

The file date of each module file (mod_modulename.php) does not change when you copy / edit the module in the Modules > Site Modules menu.
Therefore the php file date functions (see: http://php.net/manual/en/function.filemtime.php ) cannot be used...
Kind Regards,
Peter Martin, Global Moderator
http://www.db8.nl - Joomla specialist, Nijmegen, Nederland
Latest website: https://pronounce.eu/

nublaii
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Jul 18, 2006 11:23 am

Re: Displaying a "Last Updated" timestamp?

Postby nublaii » Thu Mar 08, 2007 2:57 pm

Maybe this doesn't apply directly to your problem, but I think it's a good timestamp solution.

I might not be a good solution (processing power needed etc), but it works.

I wanted a timestamp on my frontpage with the last time something was published in any of the sections.

I used the Display News module (mod_dn) where you can customize pretty much everything as far as information about what you show.

I configured it to show the newest item of all the sections on my site, and then made it show just the date/time of the update.

That way, you get a timestamp that you can use anywhere on your site, with the last time something was published ;)

The advantage of this method is that you can select only certain sections to report, instead of *anything* being updated, plus you can configure the whole string of text (static text like "Updated" or "Actualizado" or whatever you wanna use).

If you need some extra info, don't hesitate to ask, I'll let you know how my setup works.
Last edited by nublaii on Thu Mar 08, 2007 3:02 pm, edited 1 time in total.

virtuemart1
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Mon Mar 14, 2011 2:19 am

Re: Displaying a

Postby virtuemart1 » Wed Jun 13, 2012 4:12 am

I also have question about TIMESTAMP

In database table: jos_vm_product
which is the table for virtueMart

In the tables, I'd like to know more fields: cdate, mdate

What I want to do is: do some SQL statements based on the values of these 2 fields, cdate, mdate

how to interpert the value in these fields?


Return to “Modules”

Who is online

Users browsing this forum: No registered users and 4 guests