Template:ArchiveLinks

From Heroes Wiki
Jump to: navigation, search

Usage

{{ArchiveLinks
 |<archive page>
 |exclude=<comma-separated list of one-based section numbers to be excluded 
           (i.e. 5,6,7 for the 5th through 7th sections)>
}}

Useful for adding archive section listings to user talk pages, this template uses DPL to generate an archive link for up to 20 sections, separated by bullets. If you have more than 20 sections to archive, it is recommended that you use two archive talk pages.

Notes

  • Section 0's are not included cause if the first header is section 0, that throws off all of the edit links. If your archive's first section header isn't showing up when using this template, make sure it is on a line by itself and does not include any template calls (such as to a table of contents or archive header template).
  • Sections listed inside pre tags are included. If they are not desired, they can be excluded using the exclude= option. For an example, see the source used on Heroes Wiki talk:Community Portal to print the archive links for the Aug 2007-Oct 2007 archive. Note that excluded sections still count towards the 20 section limit (only the first 20 section headers are listed).
  • The current implementation of this template will not show section headers correctly if they contain more than one link in a header. Italics and Bold font, and single link are accounted for in this template, but strike tags and category links are not and require manual editing.
  • Since archives are not meant to be altered, the results of the dpl calls used in this template are cached so that they do not update immediately. If you need to clear the cache to see a current update, add "?action=purge" to the url/command-line.
  • Because the DPL in this template must be executed multiple times, and this template calls numerous subtemplates, it cannot be used for more than about three sets of archives on a single page due to template limits which prevent spamming and resource hogging.
    • To add more than three, add a subpage to the desired talk page and copy the related HTML table source three sets at a time to WikiConverter. Use the "View->Source" browser command to see the raw source in HTML format. Once you have all the HTML source at the WikiConverter page, ensure the Wiki dialect of "MediaWiki" is selected and click the "Convert HTML to wiki markup" button. Then copy the output markup to a subpage such as "User talk:<your username>/ArchiveLinks". Finally, add the subpage using inclusion.
    • Alternatively, you can add the subpage, such as "User talk:<your username>/ArchiveLinks", to the desired talk page and then use Template:ArchivePrelinks to produce the non-template wiki code you need to print the links in the sandbox. Then, copy and paste that code to the subpage and add the subpage using inclusion.
  • This template requires templates Delink and PartialDelink, and subtemplates ArchiveLinks/TrailingBullets, PartialDelink/Linkstart, and PartialDelink/Linkend to function properly. If porting this template, please remember to include them.