The variable holds an array of namespaces, indicating which namespaces are enabled for searching by default. The array is indexed by the namespace constant. Namespaces not added will not be searched by default.
$wgNamespacesToBeSearchedDefault = [ NS_MAIN => true, ];
$wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0 );
$wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 1, 10 => 0, 11 => 1 );MediaWiki versions:
1.1 – 1.2
$wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0 );
To add other namespaces you just add this to your LocalSettings.php
file, e.g. for the project namespace:
$wgNamespacesToBeSearchedDefault[NS_PROJECT] = true;Effect of adding/removing namespace[edit] MediaWiki version:
≥ 1.16
In MediaWiki 1.16 and later, adding or removing namespace will apply to all users.
MediaWiki version:≤ 1.15
In MediaWiki 1.15 and prior, adding or removing namespace will only affect anonymous users and accounts created after the change.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4