Extension:Google Custom Search Engine

This is a very simple extension, which helps you to add a Google Custom Search Engine (Google Co-op) to your own Wiki site.

Get Google Co-op Code

 * Before you start to install this extension, you need to go to http://www.google.com/coop/cse/, create a Custom Search Engine by clicking the "Create a Custom Search Engine" button, and find the "code" section at "Control panel".


 * At the "code" section, expand "Search box and search results code for your website" and file one wiki page in your site where you want to display the search result (I recommend filling the URL like this http://yoursite.com/wiki/yourwikiname:GoogleSearch).


 * After you finish this step, you will get two piece of "code" as the picture shown right.
 * code in box 1:this code is put in the page http://yoursite.com/wiki/yourwikiname:GoogleSearch
 * code in box 2:this is code is pasted where you wan the search box to appear

MediaWiki operation
Copy the code provided by Google below the words: "Place this code in the page you'd like your search results to appear."(which means code 1)

And paste it to program shown below between $output=' and ';//google code end here

Final Steps

 * create a file named google-coop.php and save the substituted code then proceed
 * Upload the google-coop.php to your extensions/ directory, and add  to your LocalSettings.php file.
 * Go to the wiki page which you want to display the search result like (http://yoursite.com/wiki/yourwikiname:GoogleSearch), add  to this page and protect it.
 * Then use another code Google provided at the pages you want to be the entrance of the search, like adding to sidebar.
 * Done!

Site users
Please list your site here if you are using this code
 * Knowledge Without Limits
 * Computer Encyclopedia-Dictionary in Malay
 * למגירה
 * Ballotpedia
 * Judgepedia
 * Sunshine Review

Demo

 * I don't Like Exams (MediaWiki 1.9.1)