Extension:Google Custom Search Engine

This extension adds a Google Custom Search Engine (Google Co-op) to your Wiki site.

What is the utility of this extension ?
Adds a Google Custom Search Engine to your Wiki site, using a specific page that you specify to display the search results. Also enables you to replace the standard MediaWiki search box with a GoogleSearch box. The extension does not require adjustment of the  so you keep full security site.

Get Google Co-op Codes
Under some circumstances, Google will only give you one 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 (for example : http://yoursite.com/wiki/yourwikiname:GoogleSearch).
 * After you finish this step, you will get two "codes" as the picture shown right :
 * code 1 is in box 1 : it is the code for the search engine ;
 * code 2 is in box 2: this code is for the search results.

Installation
Copy "google-coop.php" below in Notepad or gedit, and copy the TWO codes (code 1 and code 2) provided by Google and paste them between $output=' and ';//google code end here in google-coop.php :

google-coop.php
Then, remove all the blank spaces in code 1 and 2. The result must be something like that :

Save, upload and configure

 * Save your file under the name : google-coop.php ;
 * Upload the google-coop.php to your extensions/ directory, and add  at the end of 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.

Sidebar
Edit /skins/MonoBook.php, and, after function searchBox, replace all between "<form action=" and " " by your Google CODE 1. You could configure the width of the search box by modifying size="31". 12 seems to work well.

Site users
Please list your site here if you are using this code
 * Matrigle.com Indian Matrimonial Search Engine Powered by Google CSE
 * Knowledge Without Limits
 * Computer Encyclopedia-Dictionary in Malay
 * למגירה
 * Ballotpedia
 * Judgepedia
 * Sunshine Review
 * Dummipedia
 * I don't Like Exams (MediaWiki 1.9.1)
 * Libertapedia
 * Teamspeak3pedia - konfiguracja - lista serwerów
 * Coeliac Freedom
 * Open Source Ecology wiki