User:Pentium5dot1/Storage facility/Search template rewrite
Please disregard the move log entry relating to this page. I have decided that I ought to create {{search2}} after all, due to differences between the usage of my template and the original.
TODO: Implement urlencode and add Uncyclopedia "What links here." Also consider Ixquick search and Wikipedia "What links here."
(un wp g gun gwp | eb 1911 co gct sw yt)
Usage[edit | edit source]
For example:
Example temporarily suppressed
Produces:
Dummy example: (un un-wlh un-log gun | wp gwp | g gn gb gs gi yt eb 1911 co gct sw)
- un is [[Special:Search/{{{1}}}]]
- un-wlh is [[Special:WhatLinksHere/{{{1}}}]]
- un-log is {{fullurl:Special:Log|page={{{1}}}}} <- Does this need urlencode too?
- wp is [[wikipedia:Special:Search/{{{2}}}]] (which should redirect to an exact match if one exists)
- gn is http://news.google.com/archivesearch?&as_src=-newswire+-wire+-presswire+-PR+-press+-release+-wikipedia&q={{urlencode:{{{3}}}}} (Google News)
- gb is http://books.google.com/books?as_brr=0&as_pub=-icon&q={{urlencode:{{{3}}}}} (Google Books)
- gs is http://scholar.google.com/scholar?q={{urlencode:{{{3}}}}} (Google Scholar)
- gi is http://images.google.com/images?safe=off&q={{urlencode:{{{3}}}}} (Google Images)
- Everything else is as in the original {{search}}, but with the parameter urlencode'd, and with appropriate modification of parameter numbers (see below)
Consider modifying the template to take 3 parameters. The first is passed to the Uncyclopedia searches (before the first bar); the second is passed to the Wikipedia searches (between the first two bars); the third is used for external searches (after the second bar).
This may be useful in circumstances where the Uncyc title, Wikipedia title, and optimal query for search engines are not all the same - e.g. for article titles containing parentheses, which may have special meaning on some search engines. Examples where this may be useful (all are actual UN:REQ requests; links are provided only for convenience and do not represent the finished template):
- {{search2|Rampart (arcade game)|Rampart (arcade game)|Rampart arcade game}} (parenthesized disambiguator)
- {{search2|Famiclone|Nintendo Entertainment System hardware clone|Famiclone}} (Wikipedia title differs from common title)
- {{search2|Sudden Instant Down Syndrome|Down syndrome|Down syndrome}} (Uncyc article about a fictional subject related to a well-known real subject)
- {{search2|Trouble|Trouble (Coldplay song)|Trouble Coldplay}} (disambiguation needed but no parentheses - Uncyc article may also cover other subjects)
In general, the first parameter should exactly match the Uncyclopedia article title that is being requested.
For the lazy people, perhaps create another template (perhaps named {{searchq}} for "search quick") that calls {{search2}} with 3 of the same parameter, i.e. {{search2|{{{1}}}|{{{1}}}|{{{1}}}}}
Also consider creating a version {{searchnowp}} that omits the Wikipedia search links, for searching on Internet memes that will never be notable enough for Wikipedia.
[[Category:Templates|Search]]