My wiki is intranet only. Current;y running on my desktop until someone frees up a server for me. Is the CSEID an absolute requirement? I'm going to install anyway but just in case I get stuck I'd like to know.
Is wgGoogleSiteSearchCSEID Required?
Yes, it is.
Nevermind! "The ID of the created Google custom search engine. Required." That's crazy.
CSE API retired
Does this extension still work now that Google has retired the CSE API?
Yes, it'll still work. You can still create CSEs through https://cse.google.com/ and use the CSE IDs. The GoogleSiteSearch extension just embeds a Google iframe-type setup for that CSE, which is still supported normally.
Fatal Error with latest [SOLVED]
getLang() was deprecated in favor getLanguage(). This is fixed in the latest extension version.
With the latest master branches of MW and this extension, I'm receiving a Fatal error:
Fatal error: Call to undefined method SpecialSearch::getLang() in extensions/GoogleSiteSearch/GoogleSiteSearch.php on line 81
Did something get deprecated?
It seems getLang() is deprecated and getLanguage() should be used.
How to make search results open in same window?
Version 3.0 added this as the default. In previous versions this can be accomplished by editing a line in GoogleSiteSearch.content.default.html from
Thank you for the extension. I wanted to know if it is possible to have search results open in same winodow/tab when clicked. As of now it opens in a new window/tab instead of just taking user to the page. Is this something that can be implemented?
I'd be interested in this too.
Anyone have any ideas?
OK, I've managed to solve it.
Edit the GoogleSiteSearch.content.default.html
Change the line: customSearchControl.setLinkTarget(google.search.Search.FILTERED_CSE_RESULTSET);
The latest release (3.0) changed the CSE API used, and now defaults to same window/tab.
GoogleSiteSearch can work with the Sphinx search engine.
I currently use the Sphinx Search on my wiki and was wondering if GoogleSiteSearch can work with Sphinx? Love the concept of this seach extension. Thanks
I'll reply to my self. This extension works great with the Sphinx search.
Not sure if this is the right place, but wanted to say thank you for an amazing extension! This has totally transformed my site :)
Problem handing off accents from wiki search form to Google search form
Installed your extension, and searching for terms in the Google search form work fine. However, my wiki is in Spanish and if I place a term with accents in the wiki search form (in the toolbar or Special:Search), it runs into trouble. This appears to pass coded accents to Google (i.e. "currÃculum" instead of "currículum"), and then Google returns no results for the search. Thanks for your help.
- My wiki in Czech language has the same problem. The solution is replacing htmlentities with htmlspecialchars in
GoogleSiteSearch.php: $outhtml = str_replace( '_GSS_TERM_ESCAPE_', htmlentities( $term, ENT_QUOTES, $wgGoogleSiteSearchCharset ), $outhtml );
Display Google Search Results Below MediaWiki Search Results
I'm using MediaWiki v1.26, is there any way to have the Google search results display below the MediaWiki search results?
Technically it could be done, but is not feasible because the results would not be reliable because there are times when the SpecialSearchResultsAppend hook does not run, while SpecialSearchResultsPrepend is always guaranteed to run before the MediaWiki results. See Manual:Hooks/SpecialSearchResultsAppend for details.
Make Google Search results appear below Wiki results?
Is there a way to make the CSE results section appear after (below) the normal Wiki Results? (Basically put the inserted html at the end of the Search page instead of at the top)
I want exact matches to a Wiki Page Title and wiki Page contents to appear first if there's an exact/good match; however, if we haven't actually documented something on the wiki, I want the "secondary" results to be the CSE search of our separate API page. Make sense?
Good question! That makes sense. I just had a go at GoogleSiteSearch.php, without any luck though.