Difference between revisions of "Template:History2"

From blackwiki
Jump to navigation Jump to search
imported>Makyen
(Remove "Optional substitution" which went out in 2006/7 and update parameter default syntax.)
imported>Technical 13
(might not want dir=prev... this will allow to cancel that by setting |dir=)
Line 1: Line 1:
<span class="plainlinks">[{{fullurl:{{#if:{{{1|}}}|{{{1}}}|{{SUBJECTPAGENAME}}}}|action=history}}&dir=prev&limit={{{2}}}&offset={{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}} {{#if:{{{3|}}}|{{{3}}}|{{#if:{{{1|}}}|{{{1}}}|{{SUBJECTPAGENAME}}}}}}]</span><noinclude>
+
<span class="plainlinks">[{{fullurl:{{#if:{{{1|}}}|{{{1}}}|{{SUBJECTPAGENAME}}}}|action=history}}&dir={{{dir|prev}}}&limit={{{2}}}&offset={{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}} {{#if:{{{3|}}}|{{{3}}}|{{#if:{{{1|}}}|{{{1}}}|{{SUBJECTPAGENAME}}}}}}]</span><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 22:47, 11 December 2014

Template:History2

50px Template documentation[view] [edit] [history] [purge]


This template creates a link to a specific time within a page's history and n-1 more recent edits. It accepts the page name, the number of edits to display and the date and time of the oldest edit displayed (which occurs at the bottom of the output). Time is in UTC.

If you want to reference from the top of the history displayed use {{history3}}.

Usage

history

Code Output
{{History2||2}} Template:History2

The default is the SUBJECTPAGENAME, for use on talk pages.

{{History2|Main Page|12|Main Page history|200807301912}} Main Page history
{{History2|Main Page|12||200807301912}} Main Page
{{History2|Main Page|12|you can make the date/time more readable using pipes|2008|07|30|1912}} you can make the date/time more readable using pipes
{{History2|Main Page|12|... or utterly confusing, if you prefer|20|0|8073||01912}} ... or utterly confusing, if you prefer

When splitting the date/time into several parameters for better readability, make sure that month, day, hour etc. still have two digits each, using leading zeros if necessary.

Alias

  • {{ph2}}: Stands for "page history"

See also