Extension:CustomSearchProfiles
Appearance
CustomSearchProfiles Release status: experimental |
|
---|---|
Implementation | Special page |
Description | This extension adds extra search profiles on Special:Search |
Author(s) | Claire (BlankEclairtalk) |
Compatibility policy | Main branch maintains backward compatibility. |
MediaWiki | >= 1.35.0 |
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
[edit]- 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
[edit]$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
[edit]$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. |