Difference between revisions of "Template:Domain uses"

From blackwiki
Jump to navigation Jump to search
imported>Newslinger
(Add alts for icons)
imported>Newslinger
(Returning to quotation marks instead of regex. This is because regex searches are much slower. By default, regex searches do not take word boundaries into account (/happy\.com/ matches "unhappy.com") and the "\b" anchor appears to be ignored. The "i" flag is also needed to make the search case-insensitive, which slows it down further. Since this template only supports one domain, quotation marks are the easiest way to make the search perform as expected.)
 
Line 1: Line 1:
[[Special:Search/insource:/{{#invoke:String|replace|{{{1}}}|.|\.|plain=true}}/|{{{2|{{{1}}}}}}]]&nbsp;[[File:Ic lock outline 48px.svg|16px|link={{fullurl:Special:Linksearch|target=https://*.{{urlencode:{{{1}}}}}}}|alt=HTTPS links]]&nbsp;[[File:OOjs UI icon link-ltr.svg|16px|link={{fullurl:Special:Linksearch|target=*.{{urlencode:{{{1}}}}}}}|alt=HTTP links]]<noinclude>
+
[[Special:Search/insource:"{{{1}}}"|{{{2|{{{1}}}}}}]]&nbsp;[[File:Ic lock outline 48px.svg|16px|link={{fullurl:Special:Linksearch|target=https://*.{{urlencode:{{{1}}}}}}}|alt=HTTPS links]]&nbsp;[[File:OOjs UI icon link-ltr.svg|16px|link={{fullurl:Special:Linksearch|target=*.{{urlencode:{{{1}}}}}}}|alt=HTTP links]]<noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
 
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
 
</noinclude>
 
</noinclude>

Latest revision as of 03:03, 7 March 2020

[[Special:Search/insource:"{{{1}}}"|{{{1}}}]] HTTPS links HTTP links

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

This template displays three links to search results for uses of a domain name across Wikipedia pages:

  1. An insource: search for the domain name
  2. An external links search for https:// URLs of the domain and its subdomains
  3. An external links search for http:// URLs of the domain and its subdomains

Usage

This template accepts two unnamed parameters:

  1. The domain name to be searched, e.g. example.com or subdomain.example.com
  2. Link text for the first link (which uses insource:)
    • This parameter is optional, and defaults to the domain name if left empty.

Examples

{{Domain uses|example.com}}

example.com HTTPS links HTTP links


{{Domain uses|example.com|Link text}}

Link text HTTPS links HTTP links

See also