Template:Archive box: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris day
imported>Russell D. Jones
(opaque background)
 
(59 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<div class="thumb tright" style="width: {{{box-width|238px}}}; background-color: #f9f9f9; border: 1px solid #CCCCCC; margin:0.5em;">
<div class="thumb tright" style="width: {{{box-width|238px}}}; border: 1px solid #CCCCCC; margin:0.5em; background-color:white;">
<div style="padding-top: 4px; text-align: center">[[{{{image|Image:Logo200gr.jpg}}}|{{{image-width|120px}}}|Archive]]'''<br>[[{{BASEPAGENAME}}]]<br>talk page [[:Template:Archive box|archives]]'''
<div style="padding-top: 4px; text-align: center"><big>{{#ifeq:{{NAMESPACE}}|User talk
      |[[User:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]
      |{{#ifeq:{{NAMESPACE}}|Template talk
            |[[Template:{{BASEPAGENAME}} | {{BASEPAGENAME}}]]
            |{{#ifeq:{{NAMESPACE}}|CZ
                  |[[{{NAMESPACE}}:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]
                  |[[{{BASEPAGENAME}}]] }} }} }}</big><br>[[{{{image|Image:Logo200Archivebox.jpg}}}|{{{image-width|120px}}}|How to use the Template:Archive box]]
</div>
</div>
<div align="center">
<div align="center">
{{#if:{{{approved|}}}|{{#ifeq:{{{approved}}}|yes|[[{{TALKSPACE}}:{{BASEPAGENAME}}/Draft|Current&nbsp;talk&nbsp;page]]|[[{{TALKSPACE}}:{{BASEPAGENAME}}|Current&nbsp;talk&nbsp;page]]}}|[[{{TALKSPACE}}:{{BASEPAGENAME}}|Current&nbsp;talk&nbsp;page]]}}</div>
{{#ifeq:{{NAMESPACE}}|CZ
{{#if:{{{auto|}}}| <div style="text-align:centre">{{#ifeq:{{{auto}}}|long|{{Archive list long}}{{{1|}}}|{{archive list}}<br>{{{1|}}}}}</div> |<div style="text-align:left"> {{{1|}}}</div>}}
    |[[CZ:{{BASEPAGENAME}} |Current&nbsp;page]]
    |[[{{TALKSPACE}}:{{BASEPAGENAME}}|Current&nbsp;talk&nbsp;page]]}}</div>
{{#if:{{{auto|}}}
      |<div style="text-align:center">{{#ifeq:{{{auto}}}|long|{{Archive list long}}<br>{{{1|}}}|{{archive list}}<br>{{{1|}}}}}</div>
      |{{#if:{{{1|}}}
            |{{#ifexist:{{TALKSPACE}}:{{BASEPAGENAME}}/Archive 1|<div style="text-align:center"> {{archive list}}</div><div style="text-align:center"> {{{1|}}}</div>|<div style="text-align:center"> {{{1|}}}</div>}}
            |<div style="text-align:center"> {{archive list}}</div>}} }}
</div>
</div>
<noinclude>
<noinclude>
== Placement ==
The box uses a style that makes it float to the right. This means that where it appears in the page it will be aligned to the right edge of the page (more accurately: the containing box, but that is an unnecessary detail) and all following content will flow around it.


== Usage ==
== Usage ==
 
{{main|CZ:Talk Pages#Archives}}
Include the archive box in the articles talk page by adding it to where you want the archive box to appear. How you present a list of archive pages is up to you. You can separate them with commas, pipes (vertical lines: '|') or as lists. See further [[#Examples]] below.
This template can be used on article or user talk pages. How you present a list of archive pages is up to you. You can separate them with commas, pipes (vertical lines: '|') or as lists. See further [[#Examples]] below.


{| class="wikitable"
{| class="wikitable"
! Wikitext !! Appearance
!Wikitext!!Appearance
|-
|-
|<pre>{{Archive box|
|<pre>{{Archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]]}}</pre>
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive 1|Archive 1]]}}</pre>
|{{Archive box|
|{{Archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]]}}
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive 1|Archive 1]]}}
|}
|}


This template can also be placed on all the archive pages to make it convenient to toggle between the different archives, the current talk page and the main article. For an example, see the talk pages and archives associated with this template.
This template can be also placed on all the archived pages to make it convenient to toggle between the different archives and the current talk page. For an example, see this pages [[Template talk:Archive box|talk page]] and the four example archives associated with this template.


=== Placement ===
==Parameters==
The box uses a style that makes it float to the right. This means that where it appears in the page it will be aligned to the right edge of the page (more accurately: the containing box, but that is an unnecessary detail) and all following content will flow around it.
The different variable parameters available for this template include:
 
:[[#Automatic links|auto =]] (for automatic archiving)
:[[#Box and image parameters|box-width =]] (for adjusting box width)
:[[#Box and image parameters|image-width =]] (for adjusting image width)
:[[#Box and image parameters|image =]] (for customizing the image)


These parameters can be used in combination and are described more fully with examples below.


=== Automatic links ===
=== Automatic links ===


If all the archives of a talk page are numbered (<tt>/Archive 1</tt>, <tt>/Archive 2</tt> etc.), you can use the <tt>auto</tt> parameter to display links to them all automatically. Choosing the '''''yes''''' option will list the archives with numbers only:
If all the archives of a talk page are numbered (<tt>/Archive 1</tt>, <tt>/Archive 2</tt> etc.), the Archive box will link to them all automatically. The default option will list the archives with numbers only:
 
Alternatively, if you want longer and more visible links, try:setting the <tt>auto</tt> parameter to '''''long''''' since this will give a prose version; all other parameter values will trigger the numerical ''yes'' format above.
 
The list will update itself when new archives are added. If there are also named archives, you can add links to these as well. See the additional links shown in the archive boxs below.


Alternatively, if you want longer and more visible links, try:setting the <tt>auto</tt> parameter to '''''long''''' since this will give a prose version; all other parameter values will trigger the default format above.


The list will update itself when new archives are added. If there are also named archives, you can add links to these as well. See the additional links shown in the third archive box option below.
{| class="wikitable"
{| class="wikitable"
! Numerical version!! Wikitext !! Prose version
!Wikitext!!Appearance
|-
|style="background-color:white"|Just using the simple archive box.<br>
<pre>{{archive box}}</pre>
|style="background-color:white"|{{archive box}}
|-
|-
|style="background-color:white" rowspan=2|{{archive box|auto=yes|
|style="background-color:white"|This example uses the '''long''' option for prose and numbers.<br>
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
<pre>{{archive box|auto=long}}</pre>
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|style="background-color:white"|{{archive box|auto=long}}
|'''Left archive box''': this example uses the '''yes''' option for numbers.<br><pre>{{archive box|auto=yes|
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|style="background-color:white" rowspan=2|{{archive box|auto=long|
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|-
|'''Right archive box''': this example uses the '''long''' option for prose and numbers.<br>
|style="background-color:white"|This example uses the '''long''' option for prose and numbers. In addition, archives that have a non standard name can be added to the bottom.<br>
<pre>{{archive box|auto=long|
<pre>{{archive box|auto=long|
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|style="background-color:white"|{{archive box|auto=long|
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|}
|}


=== Box width and image ===
=== Box and image parameters ===


{| class="wikitable"
{| class="wikitable"
! Wikitext !! Appearance
!Wikitext!!Appearance
|-
|-
|The box and image widths can be set by passing their widths as parameters:
|The image can be changed from the default, [[:Image:Logo200gr.jpg]], for example:
<pre>{{Archive box
<pre>{{Archive box
|box-width=13em
|image=Image:Heckert_GNU_white.jpg}}</pre>
|image-width=35px
|[[{{BASEPAGENAME}}/Archive 1|Archive 1]]}}</pre>
|{{Archive box
|{{Archive box
|image=Image:Heckert_GNU_white.jpg}}
|-
|The box and image widths can be adjusted from the default settings by adding their widths as parameters:
<pre>{{Archive box
|box-width=13em
|box-width=13em
|image-width=35px
|image-width=35px
|[[{{BASEPAGENAME}}/Archive 1|Archive 1]]}}
|-
|The image can also be changed from the default, [[:Image:Logo200gr.jpg]], for example:
<pre>{{Archive box
|image=Image:Heckert_GNU_white.jpg}}</pre>
|image=Image:Heckert_GNU_white.jpg}}</pre>
|{{Archive box
|{{Archive box
|image=Image:Heckert_GNU_white.jpg}}
|box-width=13em
|image=Image:Heckert_GNU_white.jpg
|image-width=35px}}
|}
|}


=== Examples ===
== Examples ==


For actual examples of the use of this template, use the [[Special:Whatlinkshere/Template:Archive_box|what links here]] link in the toolbox on the sidebar, near the top on the left side of this page.
Here are several different examples of how hyperlinks to talk page archives can be displayed in the archive box.  


{| class="wikitable"
{| class="wikitable"
Line 85: Line 106:
|-
|-
|<pre>{{archive box|
|<pre>{{archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|
|{{archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|<pre>{{archive box|image=image:Heckert_GNU_white.jpg|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|image=image:Heckert_GNU_white.jpg|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|<pre>{{archive box|box-width=14em|image-width=50px|image=image:Heckert_GNU_white.jpg|
*[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
*[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
*[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
*[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|box-width=14em|image-width=50px|image=image:Heckert_GNU_white.jpg|
*[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
*[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
*[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
*[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|<pre>{{archive box|approved=no|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|approved=no|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|<pre>{{archive box|approved=yes|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|approved=yes|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]],
[[{{BASEPAGENAME}}/Archive 2|Archive 2]],
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]] and
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|-
|<pre>{{archive box|
|<pre>{{archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]]<br>
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]<br>
[[{{BASEPAGENAME}}/Archive 2|Archive 2]]<br>
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]<br>
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|
|{{archive box|
[[{{BASEPAGENAME}}/Archive 1|Archive 1]]<br>
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]<br>
[[{{BASEPAGENAME}}/Archive 2|Archive 2]]<br>
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]<br>
[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|-
|<pre>{{archive box|
|<pre>{{archive box|
:[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
:[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
:[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
:[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
:[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
:[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|
|{{archive box|
:[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
:[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
:[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
:[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
:[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
:[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|-
|<pre>{{archive box|
|<pre>{{archive box|
:*[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
:*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
:*[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
:*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
:*[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
:*[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|
|{{archive box|
:*[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
:*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
:*[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
:*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
:*[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
:*[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|-
|-
|-
|<pre>{{archive box|
|<pre>{{archive box|
#[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
#[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
#[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
#[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
#[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
#[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}</pre>
|{{archive box|
|{{archive box|
#[[{{BASEPAGENAME}}/Archive 1|Archive 1]]
#[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
#[[{{BASEPAGENAME}}/Archive 2|Archive 2]]
#[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
#[[{{BASEPAGENAME}}/Archive 3|December 2005 - January 2006]]
#[[{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
|}
|}
</noinclude>
</noinclude>

Latest revision as of 19:41, 15 July 2013


Placement

The box uses a style that makes it float to the right. This means that where it appears in the page it will be aligned to the right edge of the page (more accurately: the containing box, but that is an unnecessary detail) and all following content will flow around it.


Usage

For more information, see: CZ:Talk Pages#Archives.

This template can be used on article or user talk pages. How you present a list of archive pages is up to you. You can separate them with commas, pipes (vertical lines: '|') or as lists. See further #Examples below.

Wikitext Appearance
{{Archive box|
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive 1|Archive 1]]}}

This template can be also placed on all the archived pages to make it convenient to toggle between the different archives and the current talk page. For an example, see this pages talk page and the four example archives associated with this template.

Parameters

The different variable parameters available for this template include:

auto = (for automatic archiving)
box-width = (for adjusting box width)
image-width = (for adjusting image width)
image = (for customizing the image)

These parameters can be used in combination and are described more fully with examples below.

Automatic links

If all the archives of a talk page are numbered (/Archive 1, /Archive 2 etc.), the Archive box will link to them all automatically. The default option will list the archives with numbers only:

Alternatively, if you want longer and more visible links, try:setting the auto parameter to long since this will give a prose version; all other parameter values will trigger the default format above.

The list will update itself when new archives are added. If there are also named archives, you can add links to these as well. See the additional links shown in the third archive box option below.

Wikitext Appearance
Just using the simple archive box.
{{archive box}}
This example uses the long option for prose and numbers.
{{archive box|auto=long}}
This example uses the long option for prose and numbers. In addition, archives that have a non standard name can be added to the bottom.
{{archive box|auto=long|
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}

Box and image parameters

Wikitext Appearance
The image can be changed from the default, Image:Logo200gr.jpg, for example:
{{Archive box
|image=Image:Heckert_GNU_white.jpg}}
The box and image widths can be adjusted from the default settings by adding their widths as parameters:
{{Archive box
|box-width=13em
|image-width=35px
|image=Image:Heckert_GNU_white.jpg}}

Examples

Here are several different examples of how hyperlinks to talk page archives can be displayed in the archive box.

Wikitext Appearance
{{archive box|
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]] and
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]<br>
[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
:[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
:[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
:*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
:*[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}
{{archive box|
#[[{{TALKSPACE}}:{{BASEPAGENAME}}/Archive1|December 2005 - January 2006]]
#[[{{TALKSPACE}}:{{BASEPAGENAME}}/Deletion discussion|Deletion discussion]]}}