Thix extention is created thanks to this: http://tutorialzine.com/2010/09/google-powered-site-search-ajax-jquery/
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.
- Unpack the files to protected/extentions/search.
Your dir-structure should now be:
- EDIT protected/extentions/search/assets/js/google_search.js Change line 3:
siteURL : 'YOUR_SITE_URL', // Change this to your site url
Optional: Style the widget in protected/extentions/search/assets/css/google_search.css You can change everything if you want to.
Place this code in a view:
<?php $this->widget('application.extensions.search.GoogleSearch'); ?>
DONT FORGET You have to clean your app/assets folder after making changes to the js or css files.