Page MenuHomePhabricator

Adding more search engines to 'googlesearch'
Closed, DeclinedPublic

Description

Author: avarab

Description:
It has recently been brought to my attention that there exist other search
engines on the web besides Google, we might want to provide a search for those
as well on the fallback search form, the most frequently suggested one seems to
be "Yahoo!".


Version: unspecified
Severity: enhancement

Details

Reference
bz1825

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 8:17 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz1825.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

It should be noted that the reason I took out the Yahoo option is that it's
(AFAIK) impossible to generate a search form dynamically with MediaWiki that
searches a particular website with Yahoo, the reason for this is that we don't
have a magic word to refer to the current IP/DNS name of the server, only the
url to it. Google accepts this but Yahoo does not.

We could of course get around this by just using the $wgServerName variable,
however that's bad form as we're trying to eliminate any php code from the
messages as they probably won't be evaluated as such in the future.

The solution to this problem is:

  1. Not to include a search via Yahoo.
  2. Tell yahoo to fix its stupid search, it would hardly be *that* hard to add

something like $searchstr =~ s#https?://## to it

  1. Make a new magic word like {{SERVERNAMEWITHOUTTHEHTTPORWHATEVERPART}}
  2. Use $wgServerName

avarab wrote:

(In reply to comment #1)

  1. Make a new magic word like {{SERVERNAMEWITHOUTTHEHTTPORWHATEVERPART}}

Update: I've added a {{SERVERNAME}} magic word that does just that, return
$wgServerName, doing something like this is now possible.

This is filed under "MediaWiki" but as far as I'm aware, no external search engines are included with a vanilla installation of MediaWiki. I will note that http://en.wikipedia.org/wiki/Special:Search?search= uses JS to create a drop-down of multiple search engines, including Yahoo and Google.

I'm inclined to resolve this. Thoughts?

epriestley changed the task status from Declined to Resolved by committing Unknown Object (Diffusion Commit).Mar 4 2015, 8:23 AM
epriestley added a commit: Unknown Object (Diffusion Commit).
Aklapper changed the task status from Resolved to Declined.Mar 4 2015, 11:49 AM
Aklapper claimed this task.