Difference between revisions of "Template:Area code box/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Rfc1394
blackwiki>Rfc1394
Line 9: Line 9:
 
==Usage when area code touches another jurisdiction==
 
==Usage when area code touches another jurisdiction==
 
In those cases, you will code '''<code> <nowiki>
 
In those cases, you will code '''<code> <nowiki>
{{Area code box |State= |This= |N=|S=|E=|W= |S1=|S2=|S3=|S4=|S5=|S6=|S7=|S8=}}</nowiki></code>''' etc., where ''S1'' to ''S8'' are abbreviated names of border states/provinces/Caribbean countries the area code touches.  You only need to use as many of these as are necessary, e.g. if the area code only touches one other jurisdiction, you only need to include '''S1=''' and you don't include '''S2=''' through '''S8='''.
+
{{Area code box |State= |This= |N=|S=|E=|W= |S1=|S2=|S3=|S4=|S5=|S6=|S7=|S8=}}</nowiki></code>''' where ''S1'' to ''S8'' are abbreviated names of border states/provinces/Caribbean countries the area code touches.  You only need to use as many of these as are necessary, e.g. if the area code only touches one other jurisdiction, you only need to include '''S1=''' and you don't include '''S2=''' through '''S8='''.
  
 
==How to code the parameters==
 
==How to code the parameters==

Revision as of 14:40, 15 August 2011

There are two ways to use this template, when the area code doesn't touch another jurisdiction (another U.S. State, Canadian Province or Caribbean Country, like Chicago's 312 or Los Angeles' 213)) and when the area code does touch another jurisdiction (New York City's 212, New Mexico's 575).

Usage in all cases

To use this template in all cases. you will code {{Area code box|State=|This=|N=|S=|E=|W=}} where you want the table. If the area code does not touch another jurisdiction, this is all you will need to use.

Usage when area code touches another jurisdiction

In those cases, you will code {{Area code box |State= |This= |N=|S=|E=|W= |S1=|S2=|S3=|S4=|S5=|S6=|S7=|S8=}} where S1 to S8 are abbreviated names of border states/provinces/Caribbean countries the area code touches. You only need to use as many of these as are necessary, e.g. if the area code only touches one other jurisdiction, you only need to include S1= and you don't include S2= through S8=.

How to code the parameters

The value to give for State=, is the 2-letter abbreviation to include the area code template for this state or Canadian province, or is the full name of the Caribbean country that this area code is located within, e.g. State=NY, State=QC, State=Turks and Caicos Islands.

The parameters S1, ..., S8 (if this area code touches another jurisdiction,) are the border states/provinces that it touches that are to appear at the bottom, according to the box number. Usually these are entered in Alphabetical Order, e.g. if an area code in California touched Arizona and Nevada, you'd use S1=AZ, S2=NV.

The parameter This is this area code, used for the center box. N=, S=, E= and W= are the area codes (or oceans) that border this area code in those compass directions. If another area code borders on more than one direction put it in multiple directions. If an area code borders on an odd direction such as northwest, code both N=and W=. To make them clickable links, include the description surrounded by link brackets, e.g. if the area code to the north of this area code is 710, you'd code N=[[Area code 710]].

How the macro works

Usage: {{Area code box|State=|This=|N=|S=|E=|W=|S1=|S2=|S3=}} etc., where S1 to S8 are abbreviated names of border states/provinces the area code touches. The values to give for State, S1, ..., S8 are the area code lists for border states/provinces to appear at the bottom, according to the box number.

The parameters are used as follows:

State is the 2-letter abbreviation to include the area code template for this state or Canadian province, or is the full name of the Caribbean country.
This is this area code, used for the center box.
N=, S=, E= and W= are the area codes (or oceans) that border this area code in those compass directions.

Optional Parameters:

S1=XX for the first nearby state, province or Caribbean country to this area code, where XX is the two letter state/province abbreviation or the full name of the country.
S2=XX for the second nearby state,

...

S8=XX for the eighth nearby state,

for as many states as border this area code,

Width= to indicate the width of the page the macro should use; it defaults to 80%

Values for State or S1 through S8:

The abbreviations for the Canadian Provinces are: AB BC MB NS NT NU ON PE QC SK YK YT (Recommendation: for NU and YT, as long as they are using the same area code as NT, use NT; for PE use NS)
The abbreviations for the values for U.S. States are: AL AK AZ AR CA CO CT DE DC FL GA HA ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY
The names to use for Caribbean countries are: American Samoa, Anguilla, Antigua and Barbuda, Bahamas, Barbados, Bermuda, British Virgin Islands, Cayman Islands, Dominica, Dominican Republic, Grenada, Guam, Jamaica, Montserrat, Northern Mariana Islands, Puerto Rico, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and the Grenadines, Trinidad and Tobago, Turks and Caicos Islands, U.S. Virgin Islands.

For an area code where all surrounding area codes are in the same state/province use {{Area code box|State=|This=|N=|S=|E=|W=}} where you want the table.


ro:Format:Area Code Box Help