[[PageOutline(2-5,Contents,pullout)]] = List all Wiki Pages with Author and Last Changed Date == Description This macro prints a table of all (user generated, ie non-Trac-default) wiki pages with last changed date and author as requested in #2427. Version 0.2 provides also a long format which also includes the newest version number and links to the difference and the history as well as the last comment. This was requested by #4717. The second macro provided by this package is `LastChangesBy`, which prints the last changes made by the given user or the logged-in user if no username is given. This package uses the AdvParseArgsPlugin, which must also be installed. == Bugs/Feature Requests Existing bugs and feature requests for ListOfWikiPagesMacro are [report:9?COMPONENT=ListOfWikiPagesMacro here]. If you have any issues, create a [/newticket?component=ListOfWikiPagesMacro new ticket]. [[TicketQuery(component=ListOfWikiPagesMacro&group=type,format=progress)]] == Download and Source Download the zipped source from [export:listofwikipagesmacro here]. == Source Check out ListOfWikiPagesMacro from [/svn/listofwikipagesmacro here] using Subversion, or [source:listofwikipagesmacro browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Configuration Put the following into your `trac.ini` configuration file: {{{#!ini [components] traclistofwikipages.* = enabled [listofwikipages] # Optional list of ignored users, defaults to 'trac' to ignore Trac's default wiki pages: #ignore_users = trac # Select default format 'long' or 'short'. Defaults to 'short' which is the pre-v0.2 format. #default_format = long #default_format = short }}} == Examples === !ListOfWikiPages You can use the `ListOfWikiPages` macro like this: {{{ [[ListOfWikiPages]] # default format as given in the configuration file [[ListOfWikiPages(format=short)]] # short format [[ListOfWikiPages(format=long)]] # long format (new v0.2) }}} which prints a table of all wiki pages, or with a list of wiki pages: {{{ [[ListOfWikiPages(ThatWikiPage,ThisWikiPage,AnotherWikiPage,format=...)]] }}} Since v0.3 the optional arguments `from` and `to` can be used to specify a time/date range as requested by #5344. The values of this arguments are taken as negative offsets to the current time, that is the time that the wiki page is displayed. Allowed is a number followed by a unit which can be `s`, `m`, `h`, `d`, `w`, `o`, `y` for seconds, minutes, hours, days, weeks, months and years. If the unit is missing, then seconds are assumed. {{{ [[ListOfWikiPages(from=3d)]] # displays all wiki pages changed in the last 3 days [[ListOfWikiPages(to=15m)]] # displays all wiki pages changed more than 15 minutes ago [[ListOfWikiPages(from=4.5w,to=15h)]] # displays all wiki pages changed between 4 1/2 weeks and 15 hours ago }}} A headline can be given using a `headline` argument: {{{ [[ListOfWikiPages(headline=Headline text without any comma)]] # sets a table headline, may not contain '`,`' }}} The order can be reversed, ie list the oldest wikis first, using: {{{ [[ListOfWikiPages(order=reverse)]] }}} Unwanted wiki ranges, eg `Trac*`, can be excluded by the `exclude=pattern` option which can be given multiple times. The wildcards '`*`' (matches everything) and '`?`' (matches a single character) can be used in the pattern (requested in #6074). {{{ [[ListOfWikiPages(exclude=Trac*,exclude=abc?)]] }}} The resulting table looks like this in the `long` format (example links not functional). The `short` format simply lacks the columns `Version`, `Diff`, `History` and `Comment`. {{{ #!html <table class="listofwikipages" style="border: thin solid ; margin: 0.25ex; padding: 0.25ex;"><thead><tr><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="wikipage">WikiPage</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="lastchangedat">Last Changed At</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="by">By</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="version">Version</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="diff">Diff</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="history">History</th><th style="border-bottom: thin solid; font-weight: bold; text-align: left;" class="comment">Comment</th></tr></thead><tbody><tr class="even"><td><a href="/svn-multi/wiki/SandBox">SandBox</a></td><td><span>10/24/09 12:21:21</span><span> (<a href="/svn-multi/timeline?from=2009-10-24T12%253A21%253A21%252B0200&precision=seconds">98 minutes</a> ago)</span></td><td>martin</td><td style="text-align: center;" class="version"><a href="/svn-multi/wiki/SandBox?version=43">43</a></td><td><a href="/svn-multi/wiki/SandBox?action=diff&version=43">Diff</a></td><td><a href="/svn-multi/wiki/SandBox?action=history">History</a></td><td></td></tr><tr class="odd"><td><a href="/svn-multi/wiki/test">test</a></td><td><span>10/24/09 05:22:14</span><span> (<a href="/svn-multi/timeline?from=2009-10-24T05%253A22%253A14%252B0200&precision=seconds">9 hours</a> ago)</span></td><td>martin</td><td style="text-align: center;" class="version"><a href="/svn-multi/wiki/test?version=3">3</a></td><td><a href="/svn-multi/wiki/test?action=diff&version=3">Diff</a></td><td><a href="/svn-multi/wiki/test?action=history">History</a></td><td></td></tr><tr class="even"><td><a href="/svn-multi/wiki/TracLinks">TracLinks</a></td><td><span>10/21/09 15:05:36</span><span> (<a href="/svn-multi/timeline?from=2009-10-21T15%253A05%253A36%252B0200&precision=seconds">3 days</a> ago)</span></td><td>martin</td><td style="text-align: center;" class="version"><a href="/svn-multi/wiki/TracLinks?version=4">4</a></td><td><a href="/svn-multi/wiki/TracLinks?action=diff&version=4">Diff</a></td><td><a href="/svn-multi/wiki/TracLinks?action=history">History</a></td><td>Replaced "raw-attachment:" with "htdoc:dl/".</td></tr></tbody></table> }}} === !LastChangesBy This macro prints a table similar to the one above only with the ''By'' column missing and the author name in the table head. {{{ [[LastChangesBy(martin_s)]] # the last 5 changes by user `martin_s` [[LastChangesBy(martin_s,10)]] # the last 10 changes by user `martin_s` [[LastChangesBy]] # or [[LastChangesBy()]] # the last 5 changes by the current user, ie every logged-on user sees its own changes [[LastChangesBy(,12)]] # the last 12 changes by the current user [[LastChangesBy(...,format=...]] # Selects `long` or `short` table format [[LastChangesBy(...,from=..,to=..]] # Selects `from` and `to` time/date range [[LastChangesBy(...,headline=...]] # Overwrites headline, may not contain `','`. [[LastChangesBy(...,order=reverse]] # Lists the wikis in reverse order. Only useful with few wiki pages or with `to`/`from`. [[LastChangesBy(..,exclude=pattern]] # Excludes wiki pages matching `pattern`. Wildcards `*` and `?` are supported. }}} The resulting table looks like this in the `long` format: {{{ #!html <table style="border: thin solid ; margin: 0.25ex; padding: 0.25ex;" class="listofwikipages"><thead><tr><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" colspan="6" class="wikipage">Last 3 changes by <b>martin</b></th> </tr><tr><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="wikipage">WikiPage</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="lastchangedat">Last Changed At</th> <th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="version">Version</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="diff">Diff</th><th style="border-bottom: thin solid; font-weight: bold; text-align: center;" class="history">History</th><th style="border-bottom: thin solid; font-weight: bold; text-align: left;" class="comment">Comment</th></tr></thead><tbody><tr class="even"><td><a href="/svn-multi/wiki/SandBox">SandBox</a></td><td><span>10/24/09 12:21:21</span><span> (<a href="/svn-multi/timeline?from=2009-10-24T12%253A21%253A21%252B0200&precision=seconds">98 minutes</a> ago)</span></td><td class="version" style="text-align: center;"><a href="/svn-multi/wiki/SandBox?version=43">43</a></td><td><a href="/svn-multi/wiki/SandBox?action=diff&version=43">Diff</a></td><td><a href="/svn-multi/wiki/SandBox?action=history">History</a></td><td/></tr><tr class="odd"><td><a href="/svn-multi/wiki/test">test</a></td><td><span>10/24/09 05:22:14</span><span> (<a href="/svn-multi/timeline?from=2009-10-24T05%253A22%253A14%252B0200&precision=seconds">9 hours</a> ago)</span></td><td class="version" style="text-align: center;"><a href="/svn-multi/wiki/test?version=3">3</a></td><td><a href="/svn-multi/wiki/test?action=diff&version=3">Diff</a></td><td><a href="/svn-multi/wiki/test?action=history">History</a></td><td/></tr><tr class="even"><td><a href="/svn-multi/wiki/TracLinks">TracLinks</a></td><td><span>10/21/09 15:05:36</span><span> (<a href="/svn-multi/timeline?from=2009-10-21T15%253A05%253A36%252B0200&precision=seconds">3 days</a> ago)</span></td><td class="version" style="text-align: center;"><a href="/svn-multi/wiki/TracLinks?version=4">4</a></td><td><a href="/svn-multi/wiki/TracLinks?action=diff&version=4">Diff</a></td><td><a href="/svn-multi/wiki/TracLinks?action=history">History</a></td><td>Replaced "raw-attachment:" with "htdoc:dl/".</td></tr></tbody></table> }}} == Recent Changes [[ChangeLog(listofwikipagesmacro, 3)]] == Author/Contributors '''Author:''' [wiki:martin_s] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''
E-mail address and name can be saved in the Preferences.