Last updated March 28, 2012. Created on June 17, 2009.
Edited by Elijah Lynn, Ayesh, jhodgdon. Log in to edit this page.

Setup an Internet Explorer quick search to search Drupal API documents.

You can set up the same functionality in Internet Explorer [editor's note: not sure which versions]:

  1. Create a text file called "ie_search.reg" containing the following lines:
    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\api]
    @="http://api.drupal.org/apis/6/%s"
    ":"="%3A"

    You can substitute a different URL for http://api.drupal.org/apis/6/%s to search a different site.

  2. Double-click to import it into your registry
  3. To use this, open Internet Explorer and type your search into the browser's address bar (e.g.: "api bootstrap").

Setup a Firefox quick search to search Drupal API.

This was first posted by MissterX as a comment to this page. But now exist in page itself.

  1. Start Firefox (tested with version 3, 4, 5, 6 and 7 beta).
  2. Surf to http://api.drupal.org/api/search/
  3. In the Search Bar, you will see an icon for whatever search engine is currently active. By default, it will be Google's "G". Directly to the right of this icon is a down arrow. Click on either the icon or the arrow.
  4. A drop-down menu will now appear. Under configured search engines you will see text like this (in the language FF is configured of course):
  5. Add "Drupal API 5"
    Add "Drupal API 6"
    Add "Drupal API 7"
    Add "Drupal API 8"

  6. Choose one or more of the listed API search engines.
  7. Done!

Setup Chromium/Chrome to search the Drupal 7 API* by adding a custom search engine.

  1. Start Chrome (tested with Chromium 17).
  2. Copy & paste "chrome://settings/searchEngines" into your address bar, press enter/return then scroll to the bottom.
  3. You will see a row with three empty fields:
    1. Enter "Drupal 7 API" into the first field (Add a new search engine)
    2. Enter "D7" into the second field (Keyword)
    3. Enter "http://api.drupal.org/api/search/7/%s" into the third field (URL with %s in place of the query)
  4. Lastly press the enter/return key to save the new search engine
  5. Now test it out by opening a new tab (Ctrl/Cmd + T) and then type "D7" followed by tab then enter your search term followed by enter/return.

* You can setup multiple versions of the Drupal API to be searched by repeating the steps above and replacing the "7" with the desired version number.

Setup your browser to jump to API docs, project pages and more(Cross-browser using open-search)

This was first posted on Ayesh's blog here. Now the XML source exists here also.

You can setup a cross-browser search to jump to project pages, special document pages, API functions, and even user profiles using Google's "I'm feeling lucky" search.
Adding a custom search to browsers depends on the browser. In Firefox, you can't add custom searches to the browser without hacking XML files or using add-ons. Also, as "I'm feeling lucky" search is not giving any search boxes, we have to use a different approach to add this search.

Once setup, you can quickly jump to modules' and themes' project pages just by entering name of the module. For an example, searching for "Views" will open the Views module's project page. Searching for "Core" will open Drupal core's project page.
Searching for "api node_save()" will open the relevant API document.
You can even search for user names, common bugs(such as "WSOD"), issue queues("Issues for Views", etc), and more. It entirely depends on how Google "thinks" about it.

Note that we are not adding a "Drupal" term to the search. The trick here is, we are adding the "Drupal" term to the search query and launch an "I'm feeling lucky" search so you will end up in correct page.

<?xml version="1.0" encoding="UTF-8" ?>
- <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  <ShortName>Drupal Search</ShortName>
  <Description>Drupal search is designed to jump to module pages faster and search Drupal-related stuff easier.</Description>
  <Url type="text/html" method="get" template="http://google.com/search?btnI=1&q=drupal+{searchTerms}" />
  <Image width="16" height="16">http://static.ayesh.me/drupalsearch/drupal-ayesh.ico</Image>
  <Developer>Ayesh Karunaratne</Developer>
  <InputEncoding>UTF-8</InputEncoding>
  <Contact>example@example.com<Contact>
  <moz:SearchForm>http://drupal.org/search/apachesolr_multisitesearch</moz:SearchForm>
  <Url type="application/opensearchdescription+xml" rel="self" template="http://static.ayesh.me/drupalsearch/drupal-ayesh.xml" />

Note: Please note that this XML file contains Ayesh's own words. Please change it to your own purpose.
Drupal.org-hosted favicon is 48x48 pixels. But according to Open-search standards, icon should be 16x16 pixels. So a new icon was uploaded to his site.

Elements

<Url type="text/html" method="get" template="http://google.com/search?btnI=1&q=drupal+{searchTerms}" />
This is the main search URL pattern. it will add "Drupal" keyword to the query and fire a Google "|'m feeling lucky" search.

<Url type="application/opensearchdescription+xml" rel="self" template="http://static.ayesh.me/drupalsearch/drupal-ayesh.xml" />
This is the location of XML file so updates will apply from that XML file.

Installation

Create your own open-search XML file and use your browser-specific method to add the open-search.
If you feel that it's a more work, you can install it right from Ayesh's blog page here.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

MissterX’s picture

No poking in the registry - me like it.

  1. Start Firefox (tested with version 3.6.20).
  2. Surf to http://api.drupal.org/api/search/
  3. In the Search Bar, you will see an icon for whatever search engine is currently active. By default, it will be Google's "G". Directly to the right of this icon is a down arrow. Click on either the icon or the arrow.
  4. A drop-down menu will now appear. Under configured search engines you will see text like this (in the language FF is configured of course):
    • Add "Drupal API 5"
    • Add "Drupal API 6"
    • Add "Drupal API 7"
    • Add "Drupal API 8"
  5. Choose one of the listed API search engines.
  6. Done!

/**
* A supercomputer is a machine that runs an endless loop in just two seconds.
*/

dela.deyoungster’s picture

Just tried the Firefox search thing... and it's sick B-)

yookoala’s picture

The search plugins do not support suggestion yet. This is a bit disappointing. Wish development team will include suggestion feature to the search plugin.