Extension talk:Google Custom Search Engine

Embedd Search??
Hello I've got a question. I included everything like you said. But if I want to set the Search Box with the code from google it just looks like this:

     

and if i delete the blank lines its the same, there is no Search box. Please can you help me?

But there is a weird phenomen.. If I klick on my WikiEd (instant) preview, I see the Search box. The normal Preview doesn't show this. I cleared my browser cache etc. but it doesn't help -.-

Searching returns to main page
I've followed the instructions provided, but searching using the google search box returns me to the main page of the wiki - not the search results page. No search results appear at all!

Any ideas?

I have the same problem can somebody please help me?--Snapte 13:07, 4 February 2008 (UTC)


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

Thx --41.240.68.65 08:42, 6 February 2008 (UTC)

Code?
I cannot even begin to follow these instrctions....

Find the "code" section at "control panel". Neither of those things exist: http://www.google.com/coop/.

Exactly what are we talking about here?


 * You are correct, the instructions are written poorly, but I at least got past that part. The real link is here, and you have to click the "Create a Custom Search Engine" button while logged into your Google account. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  02:39, 21 February 2008 (UTC)

No results
When i enter a search it goes to the page i specified but it does not display any search results.. Any one a idea what is wrong? Check http://wiki.covertpaintball.co.za

thx --Snapte 09:05, 6 February 2008 (UTC)

No results here, too
I tried to install this PlugIn, but i don't get any results, too. The Google engine works (see here: http://www.google.com/coop/cse?cx=005250012417280926508:3tkwec9tro8). Here's the wiki: http://www.uwe-kern.de/winfwiki/index.php/winfwiki:GoogleSearch And the URL of the Input Search Field: http://www.uwe-kern.de/googlesearch.html

I have no idea what the problem is, please help me...
 * Such an irony to know that many other wiki users able to use this extension but leave us alone here, especially the author.--125.163.15.197 10:19, 24 August 2008 (UTC)

This was happening to me as well. What finally fixed the issue was putting the entire google code into a single line of code. This is before the return $output line in google-coop.php.

Step-by-Step Required
As mentioned above, these instructions are far from clear and would benefit from an update, the succinct use of language, and the application of a step-by-step procedural structure. I would do the edit myself, but have no idea what is being referred to. It appears this has lead to a number of problems that have so far gone unanswered, which is unfortunate as the Custom Search Engine is such a valuable tool.

Additional Step
What I discovered was the way some hosting companies have PHP implemented, you have to remove all line breaks from the google-coop.php function renderGoogleCoop. The $ouptut line should basically be one very long line:

     var googleSearchIframeName = "cse-search-results"; var googleSearchFormName = "cse-search-box"; var googleSearchFrameWidth = "600"; var googleSearchDomain = "www.google.com"; var googleSearchPath = "/cse";  ';
 * $output='

This stepped fixed the issue on my wikis.
 * Ballotpedia
 * Judgepedia
 * Sunshine Review

Sidebar implementation.
How do i add this to the Sidebar for the googlesearch, or even better just replace the SEARCH object(s) with the Google extension.

I was thinking of reaplacing the SEARCH reference but seems its deep coded into the wiki engine. How do i add the form design to the sidebar for viewing.

Where am i supposed to put this code below?:

 <input type="hidden" name="cx" value="012893735686148946488:s7wc4m0qw74" /> <input type="hidden" name="cof" value="FORID:10" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" size="31" /> <input type="submit" name="sa" value="Search" /> <script type="text/javascript" src="http://www.google.com/jsapi"> <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"}); <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en">

is there something i am missing from the instructions?

Goldbishop 15:46, 29 June 2009 (UTC) sl3d.woodassoc.us (site i am trying to implement this into)

Need help with the "Includes(extensions/google-coop.php"); to localsettings.php
I've got the php file uploaded to my extensions folder but I don't understand the second part of the sentence:

Upload the google-coop.php to your extensions/directory, and add include("extensions/google-coop.php"); to your LocalSettings.php file.

can someone help with that part? I know the localsettings.php but I am not sure what/where it goes in that file.

mailto:nawic@nawic.org

http://www.wicalot.com/w

No results
always return to Main page, even though I edit $output in single line with no space. What is the meaning of Then use another code Google provided at the pages you want to be the entrance of the search. BTW: I use mediawiki 1.15.0 and I just test my wiki in local server like http:\\localhost\wiki... Could someone help me here? thanks!


 * I'm seeing the exact same problem. Agree with all of the comments above - this looks to be a very useful extension that is let down by its documentation. --Revells 12:07, 14 April 2010 (UTC)

MS Notepad
Should we really suggest that people copy the code into MS Notepad? Doesn't Notepad often mess up PHP scripts by adding byte order marks? Tisane 20:41, 16 April 2010 (UTC)