Difference between revisions of "Template:LMGTFY/doc"
imported>SMcCandlish (creating doc page (moving doc content from template)) |
imported>SMcCandlish (documenting new features) |
||
Line 6: | Line 6: | ||
==Usage== | ==Usage== | ||
− | + | '''Basic (search terms at Google.com):''' | |
− | + | Provide the search term string, with {{para|search}} or {{para|terms}}: | |
− | + | {{tlx|LMGTFY |search{{=}}{{var|key words here}} -wikipedia}} | |
− | {{tlx|LMGTFY|1{{=}}{{var|URL 1}}|2{{=}}{{var|URL 2}}|3{{=}}{{var|URL 3}}}} | + | Example: {{LMGTFY|search=Algerian Arab OR Arabic -sheep -wikipedia}} |
+ | |||
+ | There are no "{{!xt|{{monospace|{{!}}search2{{=}}}}}}", "{{!xt|{{monospace|{{!}}terms2{{=}}}}}}", etc. parameters. | ||
+ | |||
+ | |||
+ | '''URL only (to any search engine):''' | ||
+ | |||
+ | Specify the search results URL with {{para|url}} or {{para|1}}: | ||
+ | |||
+ | {{tlx|LMGTFY |url{{=}}<nowiki>http://</nowiki>{{var|Google [or other search engine] search results URL here}}}} | ||
+ | |||
+ | Example: {{LMGTFY|url=https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#safe=off&q=evidence+for+evolution+-wikipedia}} | ||
+ | |||
+ | 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. | ||
+ | |||
+ | |||
+ | '''Or provide multiple links, up to 10:''' | ||
+ | |||
+ | {{tlx|LMGTFY |1{{=}}{{var|URL 1}} |2{{=}}{{var|URL 2}} |3{{=}}{{var|URL 3}}}} | ||
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>{{#ifeq:{{SUBPAGENAME}}|sandbox | | |
Revision as of 00:48, 20 November 2015
![]() | This is a documentation subpage for Template:LMGTFY. It contains usage information, categories and other content that is not part of the original template page. |
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}}
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.
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.