Difference between revisions of "Template:LMGTFY"

From blackwiki
Jump to navigation Jump to search
imported>SMcCandlish
(adding feature to only specify the search term)
imported>SMcCandlish
(tweak)
Line 1: Line 1:
{{nowrap|1=[[WP:You can search, too|WP:<abbr title="Let me google that for you ...">LMGTFY</abbr>]]: {{#if:{{{term|{{{search|}}}}}}|{{google|1={{{term|{{{search}}}}}}}}|[{{{url|{{{1}}}}}}]}}{{#if:{{{2|}}}|&nbsp;[{{{2}}}]}}{{#if:{{{3|}}}|&nbsp;[{{{3}}}]}}{{#if:{{{4|}}}|&nbsp;[{{{4}}}]}}{{#if:{{{5|}}}|&nbsp;[{{{5}}}]}}{{#if:{{{6|}}}|&nbsp;[{{{6}}}]}}{{#if:{{{7|}}}|&nbsp;[{{{7}}}]}}{{#if:{{{8|}}}|&nbsp;[{{{8}}}]}}{{#if:{{{9|}}}|&nbsp;[{{{9}}}]}}{{#if:{{{10|}}}|&nbsp;[{{{10}}}]}}. }}<noinclude>
+
{{nowrap|1=[[WP:You can search, too|WP:<abbr title="Let me google that for you ...">LMGTFY</abbr>]]: {{#if:{{{term|{{{terms|{{{search|}}}}}}}}}|{{google|1={{{term|{{{terms|{{{search}}}}}}}}}}}|[{{{url|{{{1}}}}}}]}}{{#if:{{{2|}}}|&nbsp;[{{{2}}}]}}{{#if:{{{3|}}}|&nbsp;[{{{3}}}]}}{{#if:{{{4|}}}|&nbsp;[{{{4}}}]}}{{#if:{{{5|}}}|&nbsp;[{{{5}}}]}}{{#if:{{{6|}}}|&nbsp;[{{{6}}}]}}{{#if:{{{7|}}}|&nbsp;[{{{7}}}]}}{{#if:{{{8|}}}|&nbsp;[{{{8}}}]}}{{#if:{{{9|}}}|&nbsp;[{{{9}}}]}}{{#if:{{{10|}}}|&nbsp;[{{{10}}}]}}. }}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 00:48, 20 November 2015

WP:LMGTFY: [{{{1}}}].

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.