Extension:HideSection/lt
HideSection Release status: stable |
|
---|---|
Implementation | User interface, Skin |
Description | A MediaWiki extension that adds links on each header to hide/show the section. |
Author(s) | Brent Laabs (BrentLaabstalk) |
Latest version | 2 (2022-10-03) |
MediaWiki | 1.25+ |
PHP | 5.5+ |
Database changes | No |
License | MIT License |
Download | GitHub:
<translate> Note:</translate> |
Example | allthetropes.org |
$wgHideSectionImages, $wgHideSectionHideText, $wgHideSectionTitleLink |
|
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'). |
HideSection is a MediaWiki extension that adds links on each header to collapse and expand the section. This allows users to easily wade through long wiki pages and jump to the section they want to read.
This extension hides sections hierarchically. That means if you hide a top level header, any headers below it are automatically hidden. Typically, the header will display a "show" or "hide" link next to the edit link, though this can be configured to display an image instead. Additionally, there is a "show all"/"hide all" button, either on the first header or next to the page title.
For reporting an issue or a bug, please use Miraheze Phabricator.
Installation
- <translate> <tvar name=1>Download</tvar> and place the file(s) in a directory called <tvar name=name>
HideSection
</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( 'HideSection' );
- 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>
Configuration
- $wgHideSectionImages
- Use these images as hide/show links. Default is null. If this array is set, images will be added according the place marked in location. Location "begin" is before the first text of the header, while "end" places it at the very end of the header.
$wgHideSectionImages = [
"show" => "https://upload.wikimedia.org/wikipedia/commons/b/bc/Vector_right_arrow_link.png",
"hide" => "https://upload.wikimedia.org/wikipedia/commons/2/27/Vector_down_arrow_link.png",
"location" => "begin" # or "end"
];
- $wgHideSectionHideText
- If set to a true value, text show/hide links are disabled. Useful when only images are wanted.
- $wgHideSectionTitleLink
- If set to a true value, adds a
show all
/hide all
button to the right of the page title.
Known issues
- Strange interaction with disabled VisualEditor:
<translate> task <tvar name=1>T146564</tvar></translate>
- Prevents hiding of sections with Skin:Minerva, which is actually a default feature of that skin.
Taip pat skaitykite
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> |
File:Miraheze-Logo.svg | <translate> This extension is maintained by [<tvar name=url>https://miraheze.org</tvar> Miraheze].</translate> <translate> Some Miraheze extensions are very Miraheze-specific and you may encounter issues you don't see on Miraheze.</translate> <translate> To report a bug or request a configuration change, please do so on the [<tvar name=url>https://issue-tracker.miraheze.org</tvar> Miraheze Issue Tracker] and not on Wikimedia Phabricator.</translate> |
- Pages with script errors
- Pages with broken file links
- Stable extensions/lt
- User interface extensions/lt
- Skin extensions/lt
- Extensions with manual MediaWiki version
- MIT licensed extensions/lt
- Extensions in GitHub version control/lt
- SkinEditSectionLinks extensions/lt
- SkinTemplateOutputPageBeforeExec extensions/lt
- BeforePageDisplay extensions/lt
- All extensions/lt
- Extensions not in ExtensionJson
- Extensions by Miraheze/lt