[[PageOutline(2-5,Contents,pullout)]] = Show last modification date of wiki page = == Description == 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 {{{}}} with a title that gives the exact modification date and the author of the change. == Bugs/Feature Requests == Existing bugs and feature requests for LastModifiedMacro are [report:9?COMPONENT=LastModifiedMacro here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=LastModifiedMacro&owner=HorsePunchKid new ticket]. == Download == Download the zipped source from [download:lastmodifiedmacro here]. == Source == You can check out LastModifiedMacro from [http://trac-hacks.org/svn/lastmodifiedmacro here] using Subversion, or [source:lastmodifiedmacro browse the source] with Trac. == Example == Basic usage: {{{ [[LastModified]] [[LastModified(delta)]] [[LastModified(MacroBazaar)]] [[LastModified(MacroBazaar,delta)]] }}} For example, {{{ [[LastModified(CustomMacros)]] }}} produces: {{{ 2004-10-06 }}} Alternatively, {{{ [[LastModified(CustomMacros,delta)]] }}} produces: {{{ 7 weeks }}} This is a CSS style to apply that will make it about 3.14% slicker: {{{ span.last-modified { border-bottom: 1px dotted gray; cursor: help; } }}} Building off the above style, I did the following to match the colour of the [wiki:TocMacro]. (To apply this to all projects, append the below text to this 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; } }}} == Recent Changes == [[ChangeLog(lastmodifiedmacro, 3)]] [attachment:LastModified.py LastModified.py] file attached by Bill Coffman, which works on 0.11. This new version: 1. Does not support mouseover. 2. Does not support the delta argument all by itself. That is, !LastModified(delta) will just look for a wiki page named delta. 3. The above style sheets mentioned above won't work with this version. 4. Has changed the format of the date to something that I personally found more compact, precise and readable. 5. Most importantly, it works with 0.11, and seems to be pretty much compliant with the coding standards for 0.11 6. Because of the above changes, it should probably be officially considered a fork, and could be named something differently. I leave it to someone who cares sufficiently to make this code compliant with the previous version. The [attachment:fullname.diff patch] attached by Paul Heinlein will, when applied to [attachment:LastModified.py Bill's 0.11 version of the plugin], report the author's full name rather than login username if the full name exists as a session attribute. [attachment:LastModifiedMacro-0.1-py2.5.egg LastModifiedMacro-0.1-py2.5.egg] file attached by Izzy for easier install. Small modifications have been done to Bills code: * internal docu (as displayed on WikiMacros page) shows syntax details * text is contained in the span element again * date format is more clear for users from "other countries" (now: 2008/12/09 18:55) * text is now: "Last modified: %s by %s" - where you have to replace the %s by date and author == Author/Contributors == '''Author:''' [wiki:HorsePunchKid] [[BR]] '''Maintainer:''' rjollos [[BR]] '''Contributors:''' Nathan Kidd, Bill Coffman [[TagIt(macro,HorsePunchKid,0.8,0.9,0.11)]]