Open main menu

Extension talk:GoogleSiteSearch

About this board

Archives

/Archive 1

Discussion

Discuss Extension:GoogleSiteSearch here:


Kkm5848 (talkcontribs)
Fo0bar (talkcontribs)

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.

Reply to "CSE API retired"

Is wgGoogleSiteSearchCSEID Required?

2
64.4.113.174 (talkcontribs)

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.

64.4.113.174 (talkcontribs)

Nevermind! "The ID of the created Google custom search engine. Required." That's crazy.

Reply to "Is wgGoogleSiteSearchCSEID Required?"

Fatal Error with latest [SOLVED]

2
Summary by Jkmartindale

getLang() was deprecated in favor getLanguage(). This is fixed in the latest extension version.

Wmat (talkcontribs)

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?

Wmat (talkcontribs)

It seems getLang() is deprecated and getLanguage() should be used.

How to make search results open in same window?

4
Summary by Jkmartindale

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 customSearchControl.setLinkTarget(google.search.Search.FILTERED_CSE_RESULTSET); to customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);.

2601:5:1800:248:B1AA:719B:3289:8F58 (talkcontribs)

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?

Wikimanz (talk) 06:27, 29 March 2014 (UTC)

83.100.199.133 (talkcontribs)

I'd be interested in this too.

Anyone have any ideas?

83.100.199.133 (talkcontribs)

OK, I've managed to solve it.

Edit the GoogleSiteSearch.content.default.html

Change the line: customSearchControl.setLinkTarget(google.search.Search.FILTERED_CSE_RESULTSET);

To: customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);

Fo0bar (talkcontribs)

The latest release (3.0) changed the CSE API used, and now defaults to same window/tab.

Summary by Jkmartindale

GoogleSiteSearch can work with the Sphinx search engine.

Christharp (talkcontribs)

Hi

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

Christharp (talkcontribs)

I'll reply to my self. This extension works great with the Sphinx search.

109.144.204.76 (talkcontribs)

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

4
Vitruvian95 (talkcontribs)

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.

This post was posted by Vitruvian95, but signed as Felipe95a.

Jossmart (talkcontribs)
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 );
Vitruvian95 (talkcontribs)

Thanks! That worked for the accents. However, the extension still has trouble interpreting the inverted commas in exact searches (e.g. "currículum nacional"). Any suggestions are appreciated.

This post was posted by Vitruvian95, but signed as Felipe95a.

Fo0bar (talkcontribs)

The latest release (3.0) should have i18n/UTF-8 issues sorted out. For an example, see e.g.

Reply to "Problem handing off accents from wiki search form to Google search form"

Display Google Search Results Below MediaWiki Search Results

2
50.251.57.77 (talkcontribs)

Hello,

I'm using MediaWiki v1.26, is there any way to have the Google search results display below the MediaWiki search results?

Fo0bar (talkcontribs)

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.

Reply to "Display Google Search Results Below MediaWiki Search Results"

Make Google Search results appear below Wiki results?

2
50.202.91.130 (talkcontribs)

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?

Cavila (talkcontribs)

Good question! That makes sense. I just had a go at GoogleSiteSearch.php, without any luck though.

Reply to "Make Google Search results appear below Wiki results?"
There are no older topics
Return to "GoogleSiteSearch" page.