Difference between revisions of "Template:Automatic archive navigator/doc"

From blackwiki
Jump to navigation Jump to search
imported>Paine Ellsworth
(since the template does not appear at the TOP, this should be at the TOP of the /doc page)
imported>Trialpears
(→‎See also: remove see also Template:Archive is in the navbox right below and tmbox is a meta template basically no one have to know about)
 
(14 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
{{lua|Module:AutomaticArchiveNavigator}}
+
{{High-use}}
 +
{{lua|Module:Automatic archive navigator}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
  
Line 8: Line 9:
  
 
=== Usage ===
 
=== Usage ===
This '''A'''utomatic '''A'''rchive '''N'''avigator template header allows you to navigate through '''''unlimited''''' numbered archive pages that are named either in the standard "Archive n" format or purely as numbers (such as "2009", "200904", or "5"). The header is particularly useful for User Talk page archives which are numbered by year. The header shows the previous 3 and next 3 pages in the archives (only if they exist). The first and last navigable links intelligently search out pages 5 back or ahead and, if they do not exist, show the next nearest.
+
This '''A'''utomatic '''A'''rchive '''N'''avigator template header allows you to navigate through numbered archive pages that are named in the standard "Archive n" format. The header shows the previous 3 and next 3 pages in the archives (only if they exist). The first and last navigable links intelligently search out pages 5 back or ahead and, if they do not exist, show the next nearest.
  
'''No parameters are needed''' for this template to work; just place '''<code><nowiki>{{aan}}</nowiki></code>''' near the top of each archive page (or configure as the default [[User:MiszaBot/Archive_HowTo|archive header]] for your archive bot). It will automatically create a navigation bar. Some ''optional'' parameters are detailed below if you want to have more control.
+
'''No parameters are needed''' for this template to work; just place '''<code><nowiki>{{aan}}</nowiki></code>''' near the top of each archive page (or configure as the default [[User:MiszaBot/Archive HowTo|archive header]] for your archive bot). It will automatically create a navigation bar. Some ''optional'' parameters are detailed below if you want to have more control.
  
Numbering will stop at the last following or preceding page. For example if included in each of the pages named "200801", "200802", "200803", "200901"; the template would correctly show a bar on all pages but navigation would only show the first three as connected. Leading zeros in the page names should not be used and may lead to non-existent links being shown.
+
The template relies on all archives from <code>Archive 1</code> to <code>Archive ''n''</code> to exist. If there is a gap where some archive pages don't exist, the template may assume that the higher archives don't exist.
  
For this template to work, the archives must be named in standard "Archive n" form or purely as sequential numbers (such as years). If they are not, move them to the appropriate names first; see [[Help:Moving a page]] for information.
+
For this template to work, the archives must be named in standard "Archive n" form. If they are not, move them to the appropriate names first; see [[Help:Moving a page]] for information. Alternatively, you can use the {{para|prefix}} parameter to let the module know what prefix it should use.
  
 
=== Optional parameters ===
 
=== Optional parameters ===
 
  | 1
 
  | 1
:Option to use the navigation bar with no message text (this is the number [[1 (number)|one]] not the letter [[L|el]]). Example: '''{{code|<nowiki>{{aan|1}}</nowiki>}}'''.
+
:Option to use the navigation bar with no message text (this is the number [[1 (number)|one]] not a lower case letter [[L]]). Example: <code><nowiki>{{aan|1}}</nowiki></code>.
 +
 
 +
| prefix = archive prefix
 +
:Manually specify the prefix of the archive page. This is useful for archives in a non-standard format. For example, for [[Wikipedia:Administrators' noticeboard/IncidentArchive902]] you would use {{para|prefix|IncidentArchive}}. [[HTML entities]] are decoded for this parameter; for example, to insert a space at the end of the prefix you can use <code>&amp;#32;</code>.
 +
 
 +
| links = ''n''
 +
:Specify the maximum number of links to be used. The default is 7.
 +
 
 +
| noredlinks
 +
:Normally the template does not display red links. To display the first red link after the highest archive, you can use {{para|noredlinks|no}}.
  
 
  | style {{small|(minor warning)}} / notice {{small|(messages)}}
 
  | style {{small|(minor warning)}} / notice {{small|(messages)}}
Line 24: Line 34:
 
:These are the same types as used by {{tl|tmbox}} and automatically change the logo and box style. If undefined the logo will default to the archives icon.
 
:These are the same types as used by {{tl|tmbox}} and automatically change the logo and box style. If undefined the logo will default to the archives icon.
  
  | image = none / <nowiki>[[Image:Some image.svg|40px]]</nowiki>
+
  | image = none / <nowiki>[[File:Some image.svg|40px]]</nowiki>
  | imageright = <nowiki>[[Image:Some image.svg|40px]]</nowiki>
+
  | imageright = <nowiki>[[File:Some image.svg|40px]]</nowiki>
 
:Use your own image, or none, as the logo in the navigation bar. Alternatively you can place an image on the right hand side or have images on both sides.
 
:Use your own image, or none, as the logo in the navigation bar. Alternatively you can place an image on the right hand side or have images on both sides.
  
 
  | text = alternative message text
 
  | text = alternative message text
 
:Replace the header message with your own message.
 
:Replace the header message with your own message.
 +
 +
| period = date range
 +
:Specify a date range for the period covered, e.g. {{para|period|March 2006 to April 2007}}. This parameter is free-form, so you can use whatever format you like.
  
 
  | style = [[Cascading Style Sheets|CSS]] box style settings
 
  | style = [[Cascading Style Sheets|CSS]] box style settings
Line 35: Line 48:
 
:Format the box and text in any way you prefer. You may find the guidance at [[Wikipedia:Manual of Style#Color coding|MOS:COLOR]] helpful.
 
:Format the box and text in any way you prefer. You may find the guidance at [[Wikipedia:Manual of Style#Color coding|MOS:COLOR]] helpful.
  
Example using parameters: '''{{code|<nowiki>{{aan|1|image=[[image:1000000000seconds.jpg|80px]]|style=width:80%;margin-left:auto;margin-right:auto;background:lightblue;border: blue solid 2px;}}</nowiki>}}'''
+
Example using parameters: <code><nowiki>{{aan|1|image=[[File:1000000000seconds.jpg|80px]]|style=width:80%;margin-left:auto;margin-right:auto;background:lightblue;border: blue solid 2px;}}</nowiki></code>
 
 
=== See also ===
 
*{{tl|tmbox}} - talk page message boxes
 
  
 
{{Warchivenav}}
 
{{Warchivenav}}
 
+
<includeonly>{{Sandbox other||
<includeonly>
 
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
[[Category:Archival templates|{{PAGENAME}}]]
 
[[Category:Archival templates|{{PAGENAME}}]]
 
[[Category:Talk header templates|{{PAGENAME}}]]
 
[[Category:Talk header templates|{{PAGENAME}}]]
</includeonly>
+
}}</includeonly>

Latest revision as of 17:53, 17 September 2020

Appearance

Usage

This Automatic Archive Navigator template header allows you to navigate through numbered archive pages that are named in the standard "Archive n" format. The header shows the previous 3 and next 3 pages in the archives (only if they exist). The first and last navigable links intelligently search out pages 5 back or ahead and, if they do not exist, show the next nearest.

No parameters are needed for this template to work; just place {{aan}} near the top of each archive page (or configure as the default archive header for your archive bot). It will automatically create a navigation bar. Some optional parameters are detailed below if you want to have more control.

The template relies on all archives from Archive 1 to Archive n to exist. If there is a gap where some archive pages don't exist, the template may assume that the higher archives don't exist.

For this template to work, the archives must be named in standard "Archive n" form. If they are not, move them to the appropriate names first; see Help:Moving a page for information. Alternatively, you can use the |prefix= parameter to let the module know what prefix it should use.

Optional parameters

| 1
Option to use the navigation bar with no message text (this is the number one not a lower case letter L). Example: {{aan|1}}.
| prefix = archive prefix
Manually specify the prefix of the archive page. This is useful for archives in a non-standard format. For example, for Wikipedia:Administrators' noticeboard/IncidentArchive902 you would use |prefix=IncidentArchive. HTML entities are decoded for this parameter; for example, to insert a space at the end of the prefix you can use &#32;.
| links = n
Specify the maximum number of links to be used. The default is 7.
| noredlinks
Normally the template does not display red links. To display the first red link after the highest archive, you can use |noredlinks=no.
| style (minor warning) / notice (messages)
These are the same types as used by {{tmbox}} and automatically change the logo and box style. If undefined the logo will default to the archives icon.
| image = none / [[File:Some image.svg|40px]]
| imageright = [[File:Some image.svg|40px]]
Use your own image, or none, as the logo in the navigation bar. Alternatively you can place an image on the right hand side or have images on both sides.
| text = alternative message text
Replace the header message with your own message.
| period = date range
Specify a date range for the period covered, e.g. |period=March 2006 to April 2007. This parameter is free-form, so you can use whatever format you like.
| style = CSS box style settings
| textstyle = CSS text style settings
Format the box and text in any way you prefer. You may find the guidance at MOS:COLOR helpful.

Example using parameters: {{aan|1|image=[[File:1000000000seconds.jpg|80px]]|style=width:80%;margin-left:auto;margin-right:auto;background:lightblue;border: blue solid 2px;}}

Template:Warchivenav