Contents
Show last modification date of wiki page
Notice: This plugin is unmaintained and available for adoption.
Description
This macro shows the last modification date of the specified page, or the page the macro appears in if not specified. An optional argument, delta
, can be given to show the time elapsed since the last modification. The output is placed in a <span>
with a title that gives the exact modification date and the author of the change.
This plugin retrieves information from the database and adds it to a wiki page. Currently supported keywords: author
, version
, changed_by
, comment
, changed_ts
. See below for examples.
Basic usage:
[[LastModified]] [[LastModified(delta)]] [[LastModified(MacroBazaar)]] [[LastModified(MacroBazaar, delta)]]
For example, [[LastModified(CustomMacros)]]
produces:
<span class="last-modified" title="Wed Oct 6 20:34:51 2004 by username">2004-10-06</span>
Alternatively, [[LastModified(CustomMacros,delta)]]
produces:
<span class="last-modified" title="Wed Oct 6 20:34:51 2004 by username">7 weeks</span>
This is a CSS style to apply an underline and a tooltip:
span.last-modified { border-bottom: 1px dotted gray; cursor: help; }
Building off the above style, the colour of the TocMacro can be matched further. To apply this to all projects, append the below text to file /usr/share/trac/htdocs/css/wiki.css
:
/* Styles for the LastModified wikimacro */ span.last-modified { border-bottom: 1px dotted gray; border-top: 1px dotted gray; background: #FFFFDD; cursor: help; }
Bugs/Feature Requests
Existing bugs and feature requests for LastModifiedMacro are here.
If you have any issues, create a new ticket.
defect |
9 / 9 |
||
---|---|---|---|
enhancement |
4 / 5 |
||
task |
1 / 1 |
Download
Download the zipped source from here.
Source
You can check out LastModifiedMacro from here using Subversion, or browse the source with Trac.
Installation
General instructions on installing Trac plugins can be found on the TracPlugins page.
Recent Changes
- 17870 by rjollos on 2020-11-11 17:56:54
-
Add
LatestRevision
macro
- 17680 by rjollos on 2020-03-05 16:54:55
-
Make default date format configurable
Fixes #13760.
- 17679 by rjollos on 2020-03-03 18:38:47
-
Make compatible with Trac 1.3+
- Require Trac >= 1.0
- Add keyword argument for specifying timestamp format
- Fix SQL injection vulnerability
Includes contributions from david@santinoli.com
Fixes #13759.
(more)
Author/Contributors
Author: HorsePunchKid
Maintainer: none (needsadoption)
Contributors: Nathan Kidd, Bill Coffman