GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Get MediaWiki
  • Get extensions
  • Tech blog
  • Contribute
  • User help
  • FAQ
  • Technical manual
  • Support desk
  • Communication
  • Developer portal
  • Code statistics
  • Community portal
  • Recent changes

This view

  • Original page
  • New address

GeezerVison is showing www.mediawiki.org — Manual:$wgNamespacesToBeSearchedDefault - MediaWiki

Search: $wgNamespacesToBeSearchedDefault
Which namespaces should be searched?
Introduced in version:Before 1.1.0
Removed in version:Still in use
Allowed values:see below
Default value:see below
Other settings: Alphabetical | By function

Details

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.

Default value

MediaWiki version:
≥ 1.5
$wgNamespacesToBeSearchedDefault = [
	NS_MAIN => true,
];
MediaWiki version:
1.4
$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 );
MediaWiki version:
1.3
$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 );

Adding namespaces

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

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.

View the values of this configuration setting on the Wikimedia wikis in core-Namespaces.php.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:$wgNamespacesToBeSearchedDefault&oldid=8115504"
Categories:
  • MediaWiki configuration settings
  • MediaWiki configuration settings introduced before version 1.1.0
  • MediaWiki configuration settings still in use
  • Search variables
  • Skins used on Wikimedia
  • Namespace variables
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.