Module:LinkPhone/doc

From Wikivoyage
Jump to navigation Jump to search

Example usage

[edit]

The module is usually invoked via {{listing}} and {{phone}}. Thus only the "text" and "result" are relevant, unless you are coding a template.

Text Code Result
+1 234 567 890 {{#invoke:LinkPhone|LinkPhone|+1 234 567 890}} +1 234 567 890
+1 234-567-890 {{#invoke:LinkPhone|LinkPhone|+1 234-567-890}} +1 234-567-890
+1 234-567-890 ext 12 {{#invoke:LinkPhone|LinkPhone|+1 234-567-890 ext 12}} +1 234-567-890 ext 12
+1 (234) 567 890 {{#invoke:LinkPhone|LinkPhone|+1 (234) 567 890}} +1 (234) 567 890
+1 234.567.890 {{#invoke:LinkPhone|LinkPhone|+1 234.567.890}} +1 234.567.890Category:Listing with phone format issue
234 567 890 {{#invoke:LinkPhone|LinkPhone|234 567 890}} 234 567 890Category:Listing with phone missing country code
+1 234 567 WIKI {{#invoke:LinkPhone|LinkPhone|+1 234 567 WIKI}} +1 234 567 WIKI (9454)
+44 20 7890 1234 reservations, +44 20 7890 1235 general enquiries {{#invoke:LinkPhone|LinkPhone|+44 20 7890 1234 reservations, +44 20 7890 1235 general enquiries}} +44 20 7890 1234 reservationsCategory:Listing with phone format issue, +44 20 7890 1235 general enquiriesCategory:Listing with phone format issue
+44 20 7890 1234 (reservations), +44 20 7890 1235 (general enquiries) {{#invoke:LinkPhone|LinkPhone|+44 20 7890 1234 (reservations), +44 20 7890 1235 (general enquiries)}} +44 20 7890 1234 (reservations), +44 20 7890 1235 (general enquiries)
+44 20 7890 1234, +44 20 7890 1235 {{#invoke:LinkPhone|LinkPhone|+44 20 7890 1234, +44 20 7890 1235}} +44 20 7890 1234, +44 20 7890 1235
+44 20 7890 1234 {{#invoke:LinkPhone|LinkPhone|''+44'' 20 7890 1234}} +44 20 7890 1234
+44 (0)234 567 890 {{#invoke:LinkPhone|LinkPhone|+44 (0)234 567 890}} +44 (0)234 567 890Category:Listing with phone format issue
0844 123 4567 (high cost) {{#invoke:LinkPhone|LinkPhone|0844 123 4567 (high cost)}} 0844 123 4567 (high cost)
visites.csg@cnes.fr (museum and tours), csg-accueil@cnes.fr (rocket launches) {{#invoke:LinkPhone|LinkEmail|visites.csg@cnes.fr (museum and tours), csg-accueil@cnes.fr (rocket launches)}} visites.csg@cnes.fr (museum and tours), csg-accueil@cnes.fr (rocket launches)
blank {{#invoke:LinkPhone|LinkPhone| }}

Highlighting issues

[edit]

To make it easier to find phone numbers that may have issues, enable the "ErrorHighlighter" gadget from your user preferences. After enabling the gadget, phone numbers with issues will display followed by a very noticeable warning message.

Alternately, if you prefer not to use a gadget then you can add the following to your own common.css page.

.phoneinfo
{
    color: red;
    background: yellow;
    display: inline !important;
}