googlesearch A Searchfield that uses google api to allow the user to search your entire site using google.

  1. Requirements
  2. Usage
  3. Resources

Thix extention is created thanks to this:

With this widget you quickly add a searchfield to your site.

  • User searches on either your site or on the entire web.
  • Web,image,news,video search types
  • Uses Google as search engine
  • Hits are shown via ajax, "more" button to load more results
  • Fully Customizable css
  • Easy to install


Tested with Yii 1.10 in firefox, should work on all platforms though.


  1. Unpack the files to protected/extentions/search.

Your dir-structure should now be:

  • protected/extentions/search
  • protected/extentions/search/assets
  • protected/extentions/search/assets/img
  • protected/extentions/search/assets/css
  • protected/extentions/search/assets/js
  • protected/extentions/search/views
  1. EDIT protected/extentions/search/assets/js/google_search.js Change line 3:
siteURL		: 'YOUR_SITE_URL',	// Change this to your site url
  1. Optional: Style the widget in protected/extentions/search/assets/css/google_search.css You can change everything if you want to.

  2. Place this code in a view:

<?php $this->widget(''); ?>

DONT FORGET You have to clean your app/assets folder after making changes to the js or css files.


9 0
1 529 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Sampa
Created on: May 19, 2012
Last updated: 12 years ago


show all

Related Extensions