Template:Tel/doc

From Second Life Wiki
< Template:Tel
Revision as of 10:39, 27 February 2024 by Gwyneth Llewelyn (talk | contribs) (Shiny new template for tel: URIs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Creates fancy links for phone numbers.

This was used mostly on the suicide hotline page, because in an emergency, readers will not want to type long numbers on their phones, and copy & pasting might not work quickly enough.

Usage

{{tel|+1-555-123-4567}}

produces

☏ +1-555-123-4567

Phone format might be anything that is considered a valid phone number in the country where it's used.

See RFC 3966 for syntax, additional features, and other details about the tel: URL scheme.

Parameters

Because RFC 3966 prohibits the usage of spaces in tel: links — although spaces are used as a visual separator in many countries — a second parameter can be used to display spaces, e.g. for a mobile phone number in Portugal:

{{tel|+351-93-677-1490|93 677 1490}}

produces

☏ 93 677 1490

Note that hyphens, parentheses and periods are perfectly valid separators according to RFC 2966.

Template data

This is the "Wikipedia logo"TemplateData for this template used by TemplateWizard, "Wikipedia logo"VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for Tel

{
	"params": {
		"1": {
			"type": "content"
		},
		"2": {
			"type": "content"
		}
	},
	"description": "Telephone number"
}