Template talk:Google custom

About this template
I wrote the initial revision of Google custom by editing the already-existing Google template. Instead of generating links to search the entire Web, as Google does, Google custom generates links to search single Web sites (or portions thereof). As should be obvious from the examples I gave in the template documentation, this is useful for searching particular collections of pages on Wikipedia, such as the Help desk archive pages. I wrote this template primarily to help with answering questions on the Help desk. Help desk questions are repetitive, so it is nice to have a template with reasonably compact syntax that lets us generate searches on the Help desk archives to include with our answers. The template may be useful in other discussions, for example when someone wants to search within the multiple pages of one particular online manual. --Teratornis 23:19, 3 November 2007 (UTC)
 * Some references to help explain the template code:
 * m:Help:ParserFunctions
 * m:Help:Parser function
 * And of course see: WP:EIW for detailed information about templates. --Teratornis 23:27, 3 November 2007 (UTC)
 * Later I wrote Google help desk to allow searching the Help desk with a shorter template syntax. Google custom remains useful for searching many different areas of Wikipedia, including particular sets of archived pages. If you need to type a large number of custom searches for a particular part of Wikipedia, use Google help desk as an example of how to create a dedicated template for one specific kind of custom search. --Teratornis (talk) 19:31, 3 March 2008 (UTC)

In case anyone wants to delete this template
Template talk:Google lists a deletion discussion for Google; the result was "keep." Google custom's existence should be justifiable on the same basis, since both templates work similarly, with Google custom adding more options to generate a Google custom search form. Google custom displays the same warning that Google displays when an editor attempts to use it in an article; thus the template should be robust against that form of misuse. --Teratornis 23:19, 3 November 2007 (UTC)

Simplifying the template syntax with magic words
When using Google custom to search namespaces or subpage trees on Wikipedia, one can avoid having to copy the appropriate chunk of URL-encoded site and page identifier by using some tricks from Help:Magic words and Help:Variable. Compare the following two equivalent template expressions, which search Wikipedia talk:Help desk and [&from=Help_desk its subpages]:

Unfortunately, the "simplified" syntax tends to be a little longer. I might try modifying Google custom to detect when the second argument is the title of a page on Wikipedia which exists (see: m:Help:ParserFunctions), rather than a chunk of a URL. If the argument is a page title (such as, then the template could automatically convert it into the URL chunk that the Google customer search requires. Then Google custom would correctly handle simpler expressions like this:

--Teratornis (talk) 06:24, 21 April 2008 (UTC)

warning message links to Google scholar
The template warning message links to Google scholar:


 * Do not use Template:Google scholar in articles as Google links are not appropriate for an encyclopedia

--Jtir (talk) 16:08, 29 August 2008 (UTC)
 * Oops. That was a copy and paste error from the other template. Fixed now. Thanks for spotting this. --Teratornis (talk) 03:18, 2 September 2008 (UTC)

Broken link

 * Raised in response to thread at WP:VPT

The links generated by this template do not work in each case that I've tried. That is to say, I cannot find any working cases, but may not have tested every possibility. Consider the WP:PUMP page, try the "search" links in the five boxes below the "Village pump sections" heading. Each of these fails with the error "We're sorry... ... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now. See Google Help for more information.". I have found that this may be fixed simply by altering the base URL on the template from   to

Is this acceptable as a general change? -- Red rose64 (talk) 11:45, 12 August 2011 (UTC)
 * Thanks for that. I had noticed the same error recently as well, but I thought I might be having a network problem. I would say go ahead and make the fix, unless someone else knows more about this problem. --Teratornis (talk) 16:31, 12 August 2011 (UTC)
 * ✅ -- Red rose64 (talk) 16:42, 12 August 2011 (UTC)