Extension:Multi-select Namespace Search

Have you ever been frustrated at namespace search checkboxes (see bug 10718)? I know I have. A multi-select menu (list box) makes more sense here, I believe.

This "extension" (more like a hack) is 2 1 rewrite s of a file s in the includes directory: SpecialSearch.php and SpecialPreferences.php (coming) 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, not being that much of a PHP coder, I haven't been able to 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.


 * Thanks to Tim Laqua for figuring it out! Now to figure out how to add multiple authors to the extension template...

Because a MediaWiki site can have a lot of namespaces, the multi-select listbox can get very long (especially if expanded to its full length). To reduce this "screenhogging" aspect, positioning the form#powersearch</tt> CSS element can be done by adding this to the appropriate stylesheet:

form#powersearch { float: right !important; position: fixed !important; right: 1em !important; bottom: 5em !important; }

SpecialPreferences.php
to-do

Installation
Copy over the above functions into ../includes/SpecialSearch.php</tt>. I'd advise making a backup of the existing file.