Adding Yii Search to Your Browser Search Box

You are viewing revision #5 of this wiki article.
This is the latest version of this article.
You may want to see the changes made in this revision.

« previous (#4)

  1. FireFox
  2. Internet Explorer
  3. Chrome
  4. Opera
  5. Maxthon Browser
  6. Credits

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

Below we explain how to customize your browser to enable this nice feature.

FireFox

  • Click on the dropdown button on the left of the browser search box.
  • You should see two menu items: Add "Yii API Search" and Add "Yii Site Search".
  • Click on either or both of them to integrate the Yii search into your browser.

Your FireFox browser is now equipped with Yii search. If you enter a keyword (e.g. CController) in its search box, the corresponding Yii search result page will be displayed.

Internet Explorer

  • Click on the dropdown button on the right of the browser search box.
  • Click on the menu item Add Search Providers and choose Yii API Search and/or Yii Site Search.

Your Internet Explorer is now equipped with Yii search. If you enter a keyword (e.g. CController) in its search box, the corresponding Yii search result page will be displayed.

Chrome

You don't need to do anything. To do a Yii search, you do the following steps:

  • Enter yiiframework.com in the browser URL address field and press TAB or SPACE key to toggle Yii API Search.
  • Keep entering the keyword you want to look for and press ENTER. The browser will show the Yii search result page.
  • You can change search access keyword. Right Click in the address bar and select Edit Search Engines and on the next window select Yiisearch and Edit. here you can change access keyword E.G. yii. searching will be able as {keyword}<TAB>{query}

Opera

This requires more work than the above.

  • Go to Yii class reference page.
  • Put cursor on the left column search field and in context menu select create search.
  • Enter yii to the keyword field and save.
  • Close Opera.
  • Go to Opera's profile directory.
  • Open search.ini.
  • Find your search section by searching "yii".
  • Add the following to the end of the section and save.
Suggest Protocol=JSON
Suggest URL=http://www.yiiframework.com/api/suggest/?q={SearchTerm}&json=1

Now restart Opera and try typing yii ca in your address bar.

Maxthon Browser

  • In main Maxthon menu go Tools > Maxthon Setup Center
  • In Setup Center menu select Search
  • In search preferences select Add item
    Title: `Yii API Search`
    Alias: `yii`
    URL: http://yiiframework.com/search/?type=api-suggest&q=%s
    
  • Now Yii API Search available from Maxthon browser searchbar or simply from addresss bar using yii<SPACE>query. There is no autosuggest ability in Maxthon.

Credits

  • GOsha for his initiative in implementing OpenSearch in yiiframework.com.
  • samdark for his finding in configuring the Yii search in Opera.
25 0
6 followers
Viewed: 64 931 times
Version: all
Category: Tips
Written by: qiang
Last updated by: CeBe
Created on: Nov 14, 2010
Last updated: 6 years ago
Update Article

Revisions

View all history

Related Articles