Difference between revisions of "Help:External searches"
(Marked this version for translation) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 07:19, 27 November 2017
<languages /> Template:TNT <translate> It is possible to create an external search of a topic with key words, using a template.
For example, this is something that would work for Google: </translate>
<span style="border: 1px solid #CCD5DB;">[[Image:GoogleIcon.PNG]] [http://www.google.com/search?safe=off&q={{{1|Wiki}}} {{{1|Google}}}]</span> <noinclude> == Usage == Allows to establish a link to a search query at the Google search engine: <div style="display:table; width:auto;"><pre> {{Google|Term1+Term2+Term3}} </pre></div> [[Category:Template|Google]] </noinclude>
<translate>
The usage is very simple and easy to use:
</translate>
{{Google|<translate> firstTerm</translate>+<translate> Second</translate>+<translate> etc</translate>}}
<translate>
It is also possible to do phrases by using
</translate>
%22<translate> Term1</translate>+<translate> Term2</translate>+<translate> etc</translate>%22
.
<translate>
- External searches are useful where an article requires certain keywords to make an effective search.
- For the editor it allows making searches of web more quickly and painlessly.
Other applications of the template include searching forums, for bug reports of the same type, for software development wikis where the wiki and forum work together.
Using interwiki prefixes[edit]
Wikipedia has an [[<tvar|h-links>Special:MyLanguage/Help:Links#Interwiki</>|interwiki prefix]] with a similar effect, so you can link to google results with <tvar|code1>[[Google</>:firstTerm+Second+etc<tvar|code2>]]
</>, although templates are still useful for linking other search engines.
For a clear advantage of implementing a template over the default Google interwiki prefix, consider the following, modified example: </translate>
<span style="border: 1px solid #CCD5DB;">[[Image:GoogleIcon.PNG]] [http://www.google.com/search?safe=off&q={{urlencode:{{{1|Wiki}}}}} {{{1|Google}}}]</span> <noinclude> == Usage == Allows to establish a link to a search query at the Google search engine: * {{Google|Term1 Term2 Term3}} * {{Google|"a phrase"}} [[Category:Template|Google]] </noinclude>
<translate>
Note the application of MediaWiki [[<tvar|h-mw>Special:MyLanguage/Help:Magic words</>|magic word]] <tvar|code1>urlencode
</>. This grants us the convenience and elegance of entering the query string in a Wikipedia article in the same literal form we would enter it in Google search box, including spaces and quotation marks instead of representing them indirectly with <tvar|code2>+
</> and <tvar|code3>%20
</>.
</translate>
[[Category:Help{{#translation:}}|External searches]]
[[Category:Search{{#translation:}}|External searches]]