Difference between revisions of "Template:Contact"

From WikiCorporates
Jump to navigation Jump to search
m
m
Line 1: Line 1:
−
[mailto:{{{1}}}{{#if:{{{subj|}}}|?subject={{#if:{{{attn|}}}|Attn.%20{{#replace:{{{attn}}}| |%20}}:%20}}{{#replace:{{{subj}}}| |%20}}}} {{{1}}}]<noinclude>{{doc2}}</noinclude>
+
{{#switch:{{{1}}}
 +
|plain=[mailto:{{{1}}}{{#if:{{{subj|}}}|?subject={{#if:{{{attn|}}}|Attn.%20{{#replace:{{{attn}}}| |%20}}:%20}}{{#replace:{{{subj}}}| |%20}}}} {{{1}}}]
 +
|default=<span class="nowrap">{{{1|}}}{{img|At-symbol.svg|15|15|float=none}}{{{2|}}}</span>
 +
}}<noinclude>{{doc2}}</noinclude>

Revision as of 13:24, 3 April 2019

[edit] Documentation

Usage

This template is designed to help prevent spam from being sent to a twitter or e-mail address.
Because nearly all spam is automated, altering the format to one which does not match the e-mail address search engine's regular expressionWikipedia-W.svg helps prevent spam.

{{Contact
|twitter-ns  - no-spam version
|twitter-pl  - returns a normal twitter url
|email-ns    - no-spam version
|email-pl    - returns a normal email address (not recommended)
}}

Examples

  • {{Contact|twitter-ns|GrayanOne}} →
  • {{Contact|twitter-pl|GrayanOne|https://twitter.com/TheFabledAesop}} →
  • {{Contact|email-ns|jane|example.com}} →
  • {{Contact|email-pl|defra.helpline@defra.gsi.gov.uk}} →
  • {{Contact|email-pl|defra.helpline@defra.gsi.gov.uk|subj=Forest Holidays and the Forestry Commission}} →
  • {{Contact|email-pl|defra.helpline@defra.gsi.gov.uk|attn=Colin Day|subj=Forest Holidays and the Forestry Commission}} →