Extension:Multi-select Namespace Search

Have you ever been frustrated at namespace search checkboxes? I know I have. A multi-select menu makes more sense here, I believe.

This "extension" is more of 2 rewrites of files in the includes directory: SpecialSearch.php and SpecialPreferences.php which contain namespace checkboxes. This hack was tested on MediaWiki 1.9.3 so it may not work for older/newer versions. Please mention here if it does.

Unfortunately, I can't figure out how to get the "select" form to output the "option" name so it equals "ns0=1&ns1=1", etc. The "select" form will output its name but the "option" fields won't, for some reason. If you can figure it out, please edit this code accordingly. Thanks.

SpecialSearch.php
In this file, the only function changed is:

 function powerSearchBox( $term ) { $namespaces = ''; foreach( SearchEngine::searchableNamespaces as $ns => $name ) { $checked = in_array( $ns, $this->namespaces ) ? ' selected="selected"' # from ' checked="checked"' : '';			$name = str_replace( '_', ' ', $name ); if( '' == $name ) { $name = wfMsg( 'blanknamespace' ); }			$namespaces .= " {$name}\n"; # - 		}

$checked = $this->searchRedirects ? ' selected="selected"' # from ' checked="checked"' : '';		$redirect = "\n"; # from "\n"

$searchField = '\n";

$searchButton = '\n";

$ret = wfMsg( 'powersearchtext',			$namespaces, $redirect, $searchField,			, , , , '', # Dummy placeholders			$searchButton );

$title = SpecialPage::getTitleFor( 'Search' ); $action = $title->escapeLocalURL; return "

\n\n{$ret}\n  \n"; # from "action=\"$action\">\n{$ret}\n \n"	} 

SpecialPreferences.php
to-do

Installation
Not ready yet...

Copy SpecialSearch.php</tt> and SpecialPreferences.php</tt> into the includes</tt> directory. I'd advise making backups of the existing files.