On 01/15/2013 03:18 AM, Robert Vogel wrote:
Hi everybody!
I'm writing an extension that needs to replace/disable the build-in suggestion feature of the search box. In earlier versions this could be archived by setting $wgEnableMWSuggest (http://www.mediawiki.org/wiki/Manual:$wgEnableMWSuggest) to false. But with 1.20 this option is no longer available.
In includes/OutputPage.php:2484 it seems that $wgUseAjax is the only condition (despite of user settings) that is evaluated to decide whether to add the module "mediawiki.searchSuggest" or not. But I don't want to disable the ajax features completely.
There's a preference, disablesuggest, that controls it.
I don't know if there's an easy way for extensions to alter user preferences (probably not). But in the installation instructions, you can tell them to set it to true (true is disabled), and hide it from the preferences view.
See https://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_change_default_user_prefe...
Matt Flaschen