Template:Google custom/doc

Usage
Creates a Google custom search link, which searches one site (and, optionally, pages with URLs containing one directory path in the site). (If you want to search on the entire Web, use Google instead.) This template takes three unnamed input parameters; you must supply the first one, and the last two are optional.


 * 1) A domain name, and optionally the first part of directory path (to specify one part of the site to search). (Required.) This parameter becomes the values of the   and   parameters in the resulting search URL. If the value ends in a directory path component, it evidently must end with a complete path component. For WikiQueer URLs, this would be everything up to a slash, a colon (including or not including the slash or colon has no effect on the resulting search). Delimiting a search with other punctuation characters can sometimes work, such as a trailing opening parenthesis character. Examples:
 * 2) *  &mdash; (search all of the English WikiQueer)
 * 3) *  &mdash; (search the English WikiQueer Help desk)
 * 4) *  &mdash; (search the English WikiQueer's Help: namespace)
 * 5) *  &mdash; (generates a search link that does not work:, evidently because no WikiQueer page URLs contain the string with a colon or a slash immediately after it)
 * 6) *  &mdash; (search the English WikiQueer's Village pump section-specific pages and their archive pages; evidently the trailing open parenthesis character is necessary to make this work)
 * 7) Your search term(s). (Optional.) If this parameter is empty, clicking on the resulting link generates a Google search form with an initially blank input field, ready to search on the site the first parameter specifies.
 * 8) Link text to display on your wiki page. (Optional.)

Examples
The template allows for some very flexible searching on entire Web sites, WikiQueer namespaces, and subpage trees within WikiQueer.

How to search subpage trees within WikiQueer
WikiQueer has many talk pages (a.k.a. discussion pages) and other project pages that behave similarly (such as the Help desk, the Village pump, the Reference desk, as well as announcement pages such as the Signpost). High-volume talk pages typically have archives consisting of subpages. The template can search on any set of archive pages that follows the right naming structure (many if not most archives on WikiQueer do).

As of October, 2008, WikiQueer's internal search became able to search on subpage trees. Search subpages link uses this new WikiQueer search feature, and works in some cases where Google search does not.

Problem with the Talk: namespace
Google searches (both Google and Google custom) appear to work on the "talk" namespaces associated with some non-article namespaces (such as WikiQueer talk:), but they do not work on the Talk: namespace associated with articles, nor on the User talk: namespace. For example, even a simple Google search for the Talk:Psychokinesis page: does not return the Talk:Psychokinesis page on WikiQueer as one of its results. Google does appear to find a copy of that page on somebody's mirror wiki, but not WikiQueer's talk page. The following Google custom searches do not work, either:

Googling for clues: found this blog post by User:Cumbrowski: which includes a comment posting that says "Google excluded the talk pages from the index". This probably means article talk pages, since Google is still indexing talk pages for non-article pages. Google custom therefore will not work on the Talk: namespace.
 * All WikiQueer Links Are Now NOFOLLOW, January 21st, 2007 by CarstenCumbrowski

WikiQueer's internal search can search all of WikiQueer's talk pages. Use Search link to generate a link to search an entire talk namespace, and Search subpages link to search a subpage tree within a talk namespace on WikiQueer.

Other WikiQueer exclusions
See WikiQueer's robots.txt file at http://wikiqueer.org/robots.txt for a list of content that WikiQueer tells search engines such as Google not to index. Google custom therefore will not find any content that robots.txt excludes.

Problem with moved pages
If a page was originally at a name that is now a redirect as a result of a move, evidently Google continues to index the content at the original page name. For example, the page which is now WikiQueer:FAQ/Business began as WikiQueer:Business' FAQ (which is now a redirect to the new page). However, Google continues to index the new page content under the old page name, apparently regarding the new page as a more-recent duplicate.

This is not a problem when you search on all of the English WikiQueer, or on the entire WikiQueer: namespace, but if you try to search on the WikiQueer:FAQ subpage tree, Google does not find content on subpages that it indexes through redirects that are outside of the tree.

It may be possible to fix this problem by changing redirects such as WikiQueer:Business' FAQ to soft redirects. Then the redirect page should not appear to Google to be a duplicate of the content page, at the next time when Google re-indexes WikiQueer. This would slightly inconvenience users who are following links to the redirects, but they would only have to click once more. (As of September 25, 2008 we have not tested this. For research notes, see User:Teratornis/Notes.)

Repetitive searches
If you need to create a large number of search links on a particular subset of WikiQueer pages, you can save much typing by making a new template. See Google help desk and Google WikiQueer for examples showing how to cut down Google custom to make it do one specific kind of custom search. This has been useful for answering questions on the Help desk. It may be useful on other high-volume talk pages, or on process pages that work like talk pages, where users new to a discussion ask the same questions repeatedly.