Template talk:Google custom

__DTSUBSCRIBEBUTTONDESKTOP__{"headingLevel":2,"name":"h-Teratornis-2007-11-03T23:19:00.000Z","type":"heading","level":0,"id":"h-About_this_template-2007-11-03T23:19:00.000Z","replies":["c-Teratornis-2007-11-03T23:19:00.000Z-About_this_template"],"text":"About this template","linkableTitle":"About this template"}-->

About this template

__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-Teratornis-2007-11-03T23:19:00.000Z","type":"heading","level":0,"id":"h-About_this_template-2007-11-03T23:19:00.000Z","replies":["c-Teratornis-2007-11-03T23:19:00.000Z-About_this_template"]}}-->
__DTSUBSCRIBEBUTTONMOBILE__{"headingLevel":2,"name":"h-Teratornis-2007-11-03T23:19:00.000Z","type":"heading","level":0,"id":"h-About_this_template-2007-11-03T23:19:00.000Z","replies":["c-Teratornis-2007-11-03T23:19:00.000Z-About_this_template"],"text":"About this template","linkableTitle":"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)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2007-11-03T23:19:00.000Z","author":"Teratornis","type":"comment","level":1,"id":"c-Teratornis-2007-11-03T23:19:00.000Z-About_this_template","replies":["c-Teratornis-2007-11-03T23:27:00.000Z-Teratornis-2007-11-03T23:19:00.000Z"]}}-->

Some references to help explain the template code:
And of course see: WP:EIW#Template for detailed information about templates. --Teratornis 23:27, 3 November 2007 (UTC)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2007-11-03T23:27:00.000Z","author":"Teratornis","type":"comment","level":2,"id":"c-Teratornis-2007-11-03T23:27:00.000Z-Teratornis-2007-11-03T23:19:00.000Z","replies":["c-Teratornis-2008-03-03T19:31:00.000Z-Teratornis-2007-11-03T23:27:00.000Z"]}}-->
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)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2008-03-03T19:31:00.000Z","author":"Teratornis","type":"comment","level":3,"id":"c-Teratornis-2008-03-03T19:31:00.000Z-Teratornis-2007-11-03T23:27:00.000Z","replies":[]}}-->
__DTSUBSCRIBEBUTTONDESKTOP__{"headingLevel":2,"name":"h-Teratornis-2007-11-03T23:19:00.000Z","type":"heading","level":0,"id":"h-In_case_anyone_wants_to_delete_this_template-2007-11-03T23:19:00.000Z","replies":["c-Teratornis-2007-11-03T23:19:00.000Z-In_case_anyone_wants_to_delete_this_template"],"text":"In case anyone wants to delete this template","linkableTitle":"In case anyone wants to delete this template"}-->

In case anyone wants to delete this template

__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-Teratornis-2007-11-03T23:19:00.000Z","type":"heading","level":0,"id":"h-In_case_anyone_wants_to_delete_this_template-2007-11-03T23:19:00.000Z","replies":["c-Teratornis-2007-11-03T23:19:00.000Z-In_case_anyone_wants_to_delete_this_template"]}}-->
__DTSUBSCRIBEBUTTONMOBILE__{"headingLevel":2,"name":"h-Teratornis-2007-11-03T23:19:00.000Z","type":"heading","level":0,"id":"h-In_case_anyone_wants_to_delete_this_template-2007-11-03T23:19:00.000Z","replies":["c-Teratornis-2007-11-03T23:19:00.000Z-In_case_anyone_wants_to_delete_this_template"],"text":"In case anyone wants to delete this template","linkableTitle":"In case anyone wants to delete this template"}-->

Template talk:Google#TfD nomination of Template: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)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2007-11-03T23:19:00.000Z","author":"Teratornis","type":"comment","level":1,"id":"c-Teratornis-2007-11-03T23:19:00.000Z-In_case_anyone_wants_to_delete_this_template","replies":[]}}-->

__DTSUBSCRIBEBUTTONDESKTOP__{"headingLevel":2,"name":"h-Teratornis-2008-04-21T06:24:00.000Z","type":"heading","level":0,"id":"h-Simplifying_the_template_syntax_with_magic_words-2008-04-21T06:24:00.000Z","replies":["c-Teratornis-2008-04-21T06:24:00.000Z-Simplifying_the_template_syntax_with_magic_words"],"text":"Simplifying the template syntax with magic words","linkableTitle":"Simplifying the template syntax with magic words"}-->

Simplifying the template syntax with magic words

__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-Teratornis-2008-04-21T06:24:00.000Z","type":"heading","level":0,"id":"h-Simplifying_the_template_syntax_with_magic_words-2008-04-21T06:24:00.000Z","replies":["c-Teratornis-2008-04-21T06:24:00.000Z-Simplifying_the_template_syntax_with_magic_words"]}}-->
__DTSUBSCRIBEBUTTONMOBILE__{"headingLevel":2,"name":"h-Teratornis-2008-04-21T06:24:00.000Z","type":"heading","level":0,"id":"h-Simplifying_the_template_syntax_with_magic_words-2008-04-21T06:24:00.000Z","replies":["c-Teratornis-2008-04-21T06:24:00.000Z-Simplifying_the_template_syntax_with_magic_words"],"text":"Simplifying the template syntax with magic words","linkableTitle":"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#Namespaces and URLs and Help:Variable#Constants. Compare the following two equivalent template expressions, which search Wikipedia talk:Help desk and its subpages:

Type this To get this What it produces, or searches for
{{Google custom|{{SERVERNAME}}{{localurl:Wikipedia talk:Help desk}}||Search Wikipedia talk:Help desk and its archives}} Search Wikipedia talk:Help desk and its archives Blank form to search the Wikipedia Help desk talk page and its archives
{{Google custom|en.wikipedia.org/wiki/Wikipedia_talk:Help_desk||Search Wikipedia talk:Help desk and its archives}} Search Wikipedia talk:Help desk and its archives Blank form to search the Wikipedia Help desk talk page and its archives

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#.23ifexist:), rather than a chunk of a URL. If the argument is a page title (such as Wikipedia talk:Help desk, 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:

  • {{Google custom|Wikipedia talk:Help desk||Search Wikipedia talk:Help desk and its archives}}

--Teratornis (talk) 06:24, 21 April 2008 (UTC)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2008-04-21T06:24:00.000Z","author":"Teratornis","type":"comment","level":1,"id":"c-Teratornis-2008-04-21T06:24:00.000Z-Simplifying_the_template_syntax_with_magic_words","replies":[]}}-->

__DTSUBSCRIBEBUTTONDESKTOP__{"headingLevel":2,"name":"h-Jtir-2008-08-29T16:08:00.000Z","type":"heading","level":0,"id":"h-warning_message_links_to_{{Google_scholar}}-2008-08-29T16:08:00.000Z","replies":["c-Jtir-2008-08-29T16:08:00.000Z-warning_message_links_to_{{Google_scholar}}"],"text":"warning message links to {{Google scholar}}","linkableTitle":"warning message links to {{Google scholar}}"}-->__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-Jtir-2008-08-29T16:08:00.000Z","type":"heading","level":0,"id":"h-warning_message_links_to_{{Google_scholar}}-2008-08-29T16:08:00.000Z","replies":["c-Jtir-2008-08-29T16:08:00.000Z-warning_message_links_to_{{Google_scholar}}"]}}-->
__DTSUBSCRIBEBUTTONMOBILE__{"headingLevel":2,"name":"h-Jtir-2008-08-29T16:08:00.000Z","type":"heading","level":0,"id":"h-warning_message_links_to_{{Google_scholar}}-2008-08-29T16:08:00.000Z","replies":["c-Jtir-2008-08-29T16:08:00.000Z-warning_message_links_to_{{Google_scholar}}"],"text":"warning message links to {{Google scholar}}","linkableTitle":"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)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2008-08-29T16:08:00.000Z","author":"Jtir","type":"comment","level":1,"id":"c-Jtir-2008-08-29T16:08:00.000Z-warning_message_links_to_{{Google_scholar}}","replies":["c-Teratornis-2008-09-02T03:18:00.000Z-Jtir-2008-08-29T16:08:00.000Z"]}}-->

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)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2008-09-02T03:18:00.000Z","author":"Teratornis","type":"comment","level":2,"id":"c-Teratornis-2008-09-02T03:18:00.000Z-Jtir-2008-08-29T16:08:00.000Z","replies":[]}}-->
__DTSUBSCRIBEBUTTONDESKTOP__{"headingLevel":2,"name":"h-Redrose64-2011-08-12T11:45:00.000Z","type":"heading","level":0,"id":"h-Broken_link-2011-08-12T11:45:00.000Z","replies":["c-Redrose64-2011-08-12T11:45:00.000Z-Broken_link"],"text":"Broken link","linkableTitle":"Broken link"}-->__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-Redrose64-2011-08-12T11:45:00.000Z","type":"heading","level":0,"id":"h-Broken_link-2011-08-12T11:45:00.000Z","replies":["c-Redrose64-2011-08-12T11:45:00.000Z-Broken_link"]}}-->
__DTSUBSCRIBEBUTTONMOBILE__{"headingLevel":2,"name":"h-Redrose64-2011-08-12T11:45:00.000Z","type":"heading","level":0,"id":"h-Broken_link-2011-08-12T11:45:00.000Z","replies":["c-Redrose64-2011-08-12T11:45:00.000Z-Broken_link"],"text":"Broken link","linkableTitle":"Broken link"}-->
Raised in response to thread at WP:VPT#Searching for forum contributions in Wikipedia forum throws goggle error message

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 {{Google custom}} template from http://www.google.com/custom?domains= to http://www.google.com/search?domains=

Is this acceptable as a general change? --Redrose64 (talk) 11:45, 12 August 2011 (UTC)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2011-08-12T11:45:00.000Z","author":"Redrose64","type":"comment","level":1,"id":"c-Redrose64-2011-08-12T11:45:00.000Z-Broken_link","replies":["c-Teratornis-2011-08-12T16:31:00.000Z-Redrose64-2011-08-12T11:45:00.000Z"]}}-->

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)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2011-08-12T16:31:00.000Z","author":"Teratornis","type":"comment","level":2,"id":"c-Teratornis-2011-08-12T16:31:00.000Z-Redrose64-2011-08-12T11:45:00.000Z","replies":["c-Redrose64-2011-08-12T16:42:00.000Z-Teratornis-2011-08-12T16:31:00.000Z"]}}-->
 Done --Redrose64 (talk) 16:42, 12 August 2011 (UTC)[reply]__DTELLIPSISBUTTON__{"threadItem":{"timestamp":"2011-08-12T16:42:00.000Z","author":"Redrose64","type":"comment","level":3,"id":"c-Redrose64-2011-08-12T16:42:00.000Z-Teratornis-2011-08-12T16:31:00.000Z","replies":[]}}-->