Extension:Postscript
Postscript Release status: stable |
|
---|---|
Implementation | User interface |
Description | append a text or script post of all artices. |
Author(s) | Kimagurenote (Corytalk) |
Latest version | 1.0.2 |
MediaWiki | 1.25+ |
Database changes | No |
License | BSD 3-clause "Modified" License |
Download | https://kimagurenote.net/kn/Postscript#Download https://kimagurenote.net/kn/Postscript#History |
Example | https://kimagurenote.net/kn/Postscript |
The Postscript extension provides a way to append some text and/or script in post of all artices each namespaces.
Installation
edit- Download zip file from author's website, unzip it and place the file(s) in a directory called
Postscript
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
/* Extension:Postscript */ wfLoadExtension( 'Postscript' ); $wgPostscriptText[NS_MAIN] = <<<'START_END_MARKER' <script>…</script> START_END_MARKER; $wgPostscriptText[NS_FILE] = <<<'START_END_MARKER' <script>…</script> START_END_MARKER;
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
NS_xxx means please see Manual:Namespace constants.
Notes
edit<<<'START_END_MARKER' is heredoc, a PHP syntax.
This extensoin provides a way to append raw HTML (includes script). If you want to append wiki text, please see Extension:Header Footer or Extension:PageNotice.
(v1.0.1) changed using hook ContentAlterParserOutput to BeforePageDisplay because avoid to conflict with Extension:Popups.
(v1.0.2) changed to exclude empty and redirect pages. but work in redirect pages opened with redirect=no.
See also
edit- Postscript (author site, written in Japanese)
- Extension:HeadScript
- Extension:Header Footer
- Extension:PageNotice