Difference between revisions of "Template:Cite uscghist/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Muhandes
(+)
imported>Muhandes
(a few more. A bit at a time we'll get there)
Line 9: Line 9:
 
|CUBA=https://web.archive.org/web/20170501203205/http://www.uscg.mil/history/weblighthouses/LHCUBA.asp
 
|CUBA=https://web.archive.org/web/20170501203205/http://www.uscg.mil/history/weblighthouses/LHCUBA.asp
 
|PACIFIC=https://web.archive.org/web/20170525211127/http://www.uscg.mil/history/weblighthouses/LHPACIFIC.asp
 
|PACIFIC=https://web.archive.org/web/20170525211127/http://www.uscg.mil/history/weblighthouses/LHPACIFIC.asp
|AWI|AL|CA|CT|DE|FL|GA|HI|IL|IN|LA|ME|MA|MI|MN|MS|NH|NJ|NY|NC|OH|OR|PA|RI|SC|TX|VT|WA|WI|PR=}}
+
|AWI=https://web.archive.org/web/20170501203613/http://www.uscg.mil/history/weblighthouses/LHAWI.asp
 +
|AL=https://web.archive.org/web/20170501201558/http://www.uscg.mil/history/weblighthouses/LHAL.asp
 +
|CA=https://web.archive.org/web/20170501201850/http://www.uscg.mil/history/weblighthouses/LHCA.asp
 +
|CT=https://web.archive.org/web/20170519232547/http://www.uscg.mil/history/weblighthouses/LHCT.asp
 +
|DE=https://web.archive.org/web/20170501202320/http://www.uscg.mil/history/weblighthouses/LHDE.asp
 +
|FL|GA|HI|IL|IN|LA|ME|MA|MI|MN|MS|NH|NJ|NY|NC|OH|OR|PA|RI|SC|TX|VT|WA|WI|PR=}}
 
|archivedate={{#switch:{{{1}}}
 
|archivedate={{#switch:{{{1}}}
|PANAMA|CUBA=2017-05-01
+
|PANAMA|CUBA|AWI|AL|CA|DE=2017-05-01
 
|PACIFIC=2017-05-25
 
|PACIFIC=2017-05-25
|AWI|AL|CA|CT|DE|FL|GA|HI|IL|IN|LA|ME|MA|MI|MN|MS|NH|NJ|NY|NC|OH|OR|PA|RI|SC|TX|VT|WA|WI|PR=}}
+
|CT=20170-5-19
 +
|FL|GA|HI|IL|IN|LA|ME|MA|MI|MN|MS|NH|NJ|NY|NC|OH|OR|PA|RI|SC|TX|VT|WA|WI|PR=}}
 
|publisher = United States Coast Guard Historian's Office  
 
|publisher = United States Coast Guard Historian's Office  
 
|access-date = {{{accessdate|}}}  
 
|access-date = {{{accessdate|}}}  

Revision as of 21:37, 19 November 2019

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

Usage

This template creates a {{cite web}} citation to the United States Coast Guard Historical information site for lighthouses.

Parameters

There is one mandatory unnamed parameter, a two letter postal abbreviation of the state, or one of:

  • PANAMA for Panama
  • CUBA for Cuba
  • PACIFIC for Pacific Rim
  • AWI for West Indies / Virgin Islands
  • PR for Puerto Rico

It must be in upper case.

In addition, on can state the date which appears on the bottom right of the page, using the |date= field, and/or the date the page was accessed, using the accessdate field.

Error checking is done, thus using {{cite uscghist|CO}} will result in an error since there are no lighthouses in Colorado:

"Historic Light Station Information and Photography: Error: invalid state or no state when using {{cite uscghist}}Template:Namespace detect showall". United States Coast Guard Historian's Office. Missing or empty |url= (help)

Examples:

{{cite uscghist|MA}}
"Historic Light Station Information and Photography: Massachusetts". United States Coast Guard Historian's Office. Archived from the original on 2017-05-01.

{{cite uscghist|AWI}}
"Historic Light Station Information and Photography: West Indies / Virgin Islands". United States Coast Guard Historian's Office. Archived from the original on 2017-05-01.

With accessdate and date

{{cite uscghist|PACIFIC|accessdate=2010-07-30|date=2009-08-08}}
"Historic Light Station Information and Photography: Pacific Rim". United States Coast Guard Historian's Office. 2009-08-08. Archived from the original on 2017-05-25. Retrieved 2010-07-30.