Extension:CustomSearchProfiles
![]() Release status: experimentalCategory:Experimental extensions |
|
---|---|
![]() |
|
Implementation | Special pageCategory:Special page extensions |
Description | This extension adds extra search profiles on Special:Search |
Author(s) | Claire (BlankEclairtalk) |
Compatibility policy | Main branch maintains backward compatibility.Category:Extensions with master compatibility policy |
MediaWiki | >= 1.35.0Category:Extensions with manual MediaWiki version |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | |
Example | https://rainverse.wiki/wiki/Special:Search |
|
|
The CustomSearchProfiles extension allows you to add custom search profiles into Special:Search. All extra search profiles are added before the "Everything" profile.
Installation
- Clone the repository and place the file(s) in a directory called
CustomSearchProfiles
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'CustomSearchProfiles' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration parameters
$wgCustomSearchProfilesProfiles
(array): List of custom search profiles. Its keys are the profile's internal ID, and its values are objects. They are represented as follows:message
(string, optional): Localisation string used to display the profile in Special:Search. Defaults tosearchprofile-${key}
.tooltip
(string, optional): Localisation string used when the profile is hovered over in Special:Search. Defaults tosearchprofile-${key}-tooltip
.namespaces
(array of ints): Namespaces that this profile will search
Example
$wgCustomSearchProfilesProfiles = [
'code' => [
'namespaces' => [
NS_TEMPLATE,
828, // Module
],
],
'mediawiki' => [
'message' => 'searchprofile-sysmsgs',
'tooltip' => 'searchprofile-sysmsgs-tooltip',
'namespaces' => [ NS_MEDIAWIKI ],
],
];
![]() | This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
Category:All extensions
Category:Experimental extensions
Category:Extensions included in Miraheze
Category:Extensions with manual MediaWiki version
Category:Extensions with master compatibility policy
Category:GPL licensed extensions
Category:SpecialSearchProfiles extensions
Category:Special page extensions