Difference between revisions of "Template:LMGTFY/doc"

From blackwiki
Jump to navigation Jump to search
imported>SMcCandlish
m (tweak)
imported>Vanisaac
m (→‎Usage: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
  
This template links to [[Wikipedia:You can search, too]] ([[WP:LMGTFY]]) (and provides a mouse-over tooltip for what the acronym means), and then provides a link to google search results.
+
This template links to [[Wikipedia:You can search, too]] ([[WP:LMGTFY]]) (and provides a mouse-over tooltip for what the acronym means), and then provides a link to Google search results.
  
 
==Usage==
 
==Usage==
Line 26: Line 26:
  
 
The parameter must always be named one or the other because the presence of the <code>=</code> character in the results URL will break the template if this parameter is not named; i.e. "{{!xt|{{monospace|<nowiki>{{LMGTFY|</nowiki>{{var|URL here}}<nowiki>}}</nowiki>}}}}" will not work.
 
The parameter must always be named one or the other because the presence of the <code>=</code> character in the results URL will break the template if this parameter is not named; i.e. "{{!xt|{{monospace|<nowiki>{{LMGTFY|</nowiki>{{var|URL here}}<nowiki>}}</nowiki>}}}}" will not work.
 +
 +
The primary use for this is to give Google News, Google Books, Google Scholar, or other more specific results, though it can also be used to provide a substitute search engine, like DuckDuckGo or Yandex, if you don't like Google.
  
  
Line 34: Line 36:
 
Example: {{LMGTFY|1=https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=evidence+for+evolution+-wikipedia |2=https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=proof+the+earth+is+%22not+flat%22+-wikipedia |3=https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=is+Elvis+really+dead%3F+-wikipedia}}
 
Example: {{LMGTFY|1=https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=evidence+for+evolution+-wikipedia |2=https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=proof+the+earth+is+%22not+flat%22+-wikipedia |3=https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=is+Elvis+really+dead%3F+-wikipedia}}
  
The {{para|1}}, etc., parameter names are {{em|mandatory}}, because most such URLs have the <code>=<code> character in them, and this will break the template if the parameters are not named.
+
The {{para|1}}, etc., parameter names are {{em|mandatory}}, because most such URLs have the <code>=</code> character in them, and this will break the template if the parameters are not named.
  
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
<includeonly>{{Sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Internal link templates]]
 
[[Category:Internal link templates]]
  
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 00:10, 26 April 2020

This template links to Wikipedia:You can search, too (WP:LMGTFY) (and provides a mouse-over tooltip for what the acronym means), and then provides a link to Google search results.

Usage

Basic (search terms at Google.com):

Provide the search term string, with |search= or |terms=:

{{LMGTFY |search=key words here -wikipedia}}

Example: WP:LMGTFY: Algerian Arab OR Arabic -sheep -wikipedia

There are no "Template:Monospace", "Template:Monospace", etc. parameters.


URL only (to any search engine):

Specify the search results URL with |url= or |1=:

{{LMGTFY |url=http://Google [or other search engine] search results URL here}}

Example: WP:LMGTFY: [1]

The parameter must always be named one or the other because the presence of the = character in the results URL will break the template if this parameter is not named; i.e. "Template:Monospace" will not work.

The primary use for this is to give Google News, Google Books, Google Scholar, or other more specific results, though it can also be used to provide a substitute search engine, like DuckDuckGo or Yandex, if you don't like Google.


Or provide multiple links, up to 10:

{{LMGTFY |1=URL_1 |2=URL_2 |3=URL_3}}

Example: WP:LMGTFY: [2] [3] [4]

The |1=, etc., parameter names are mandatory, because most such URLs have the = character in them, and this will break the template if the parameters are not named.