Extension:ShortDescription
{{SHORTDESC:}}
parser implementation that does not use this extension, see the Wikibase option. ShortDescription Release status: stable |
|
---|---|
px | |
Implementation | Parser extension , API |
Description | Adds short description without Wikibase |
Author(s) | alistair3149talk |
Latest version | 2.4.0 (Continuous updates) |
Compatibility policy | Master maintains backward compatibility. |
MediaWiki | 1.35+ |
License | GNU General Public License 3.0 or later |
Download | GitHub:
<translate> Note:</translate> |
Expand | |
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
The ShortDescription extension allows wikis to add short descriptions to wikitext pages, similar to the implementation on Wikipedia and Wikibase. On top of that, it replaces the site tagline with short description on pages with short description.
Installation
Note that the latest version is located in the GitHub repo instead of Gerrit.
- <translate> <tvar name=1>Download</tvar> and place the file(s) in a directory called <tvar name=name>
ShortDescription
</tvar> in your <tvar name=ext>extensions/
</tvar> folder.</translate> - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'ShortDescription' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Features
- Define short description on the page with the magic word
{{SHORTDESC}}
, same as the implementation on Wikipedia - Retrieve short description on any wiki pages with the magic word
{{GETSHORTDESC}}
- Add short description underneath the page title on most skins, if the skin supports site tagline (
#siteSub
)- Note that the short description will replace the default site tagline message on pages with short description
- Does not apply to Skin:Citizen and Skin:Minerva Neue, as they have native support
- Allow short description to be accessed through the Action API
- Provide description to the REST API search endpoint
- Add short description to page information (
&action=info
) - Provide description for extensions such as MobileFrontend, RelatedArticles
Configurations
The extension works out of the box without any configurations. The config flags allow more customization on the specific features in the extension.
Name | Description | Values | Default |
---|---|---|---|
$wgShortDescriptionEnableTagline
|
Enables short descritption in site tagline | true - enable; false - disable
|
true
|
$wgShortDescriptionExtendOpenSearchXml
|
Provide short description to the Opensearch API module | true - enable; false - disable
|
false
|
Usage
Add short description
To add Bacon ipsum dolor amet turkey
as short description, simply add {{SHORTDESC:Bacon ipsum dolor amet turkey}}
on the page.
Retrive short description on wikipage
To retrive the short description on the page Bacon
, simply add {{GETSHORTDESC:Bacon}}
on the page. If you are retrieving the short description on the same page (e.g. getting the short description of Bacon
on the Bacon
page), simply add {{GETSHORTDESC:}}
.
Retrieve short description through Action API
The short description can be called through the description
property in query
action in the Action API (e.g.api.php?action=query&prop=description
). It is also accessible through the shortdesc
property inside pageprops
.
Retrieve short description through REST API
The short description can be accessed through the description
property in the search endpoint in the REST API.
Screenshots
- Shortdescription-screenshot-Citizen.png
ShortDescription on Skin:Citizen
- Shortdescription-screenshot-Minerva.png
ShortDescription on Skin:Minerva
- Shortdescription-screenshot-Monobook.png
ShortDescription on Skin:Monobook
- Shortdescription-screenshot-Timeless.png
ShortDescription on Skin:Timeless
- Shortdescription-screenshot-Vector.png
ShortDescription on Skin:Vector
See also
- T184000 - Magic word on English WP to override display of Wikidata short description
- Extension:Wikibase Client - provide the description functionality on Wikimedia projects
- Extension:RelatedArticles - Use the description from this extension under wikidata mode
- Extension:Description2 - An extension that adds a description meta tag generated automatically from the first paragraph of the page, or manually overridden.
File:OOjs UI icon information-progressive.svg | <translate> This extension is included in the following wiki farms/hosts and/or packages:</translate>
<translate> This is not an authoritative list.</translate> <translate> Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here.</translate> <translate> Always check with your wiki farms/hosts or bundle to confirm.</translate> |
- Pages with script errors
- Pages with broken file links
- Stable extensions
- Parser extensions
- API extensions
- Extensions with master compatibility policy
- Extensions with manual MediaWiki version
- GPL licensed extensions
- Extensions in GitHub version control
- ApiOpenSearchSuggest extensions
- BeforePageDisplay extensions
- InfoAction extensions
- OutputPageParserOutput extensions
- ParserFirstCallInit extensions
- SearchResultProvideDescription extensions
- All extensions
- Extensions not in ExtensionJson