Extension:EtherpadLite
EtherpadLite Release status: stable |
|
---|---|
Implementation | Tag , User interface |
Description | The extension adds a tag <eplite> to the MediaWiki parser and provides a method to embed Etherpad Lite pads on MediaWiki pages. The Etherpad Lite server is not part of the extension. |
Author(s) | Thomas Gries (Wikinauttalk) |
Latest version | 1.14.0 (2017-01-12) |
MediaWiki | 1.34+ |
PHP | 5.3+ |
Database changes | No |
License | MIT AND GPL-2.0-only |
Download | |
|
|
<eplite> |
|
Quarterly downloads | 1 (Ranked 139th) |
Translate the EtherpadLite extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The EtherpadLite extension adds a tag <eplite> to the MediaWiki parser and provides a method to embed Etherpad Lite pads on MediaWiki pages. The Etherpad Lite server is not part of the extension.
The Wikiuser username is automatically preset as Etherpad editor and chat username (pictured). In the current version, the Etherpad username can be overwritten and forged by pad users.[1]
Usage
editSome differently flavoured examples are shown. See screenshot and source code for complete list of parameters. You can determine pad servers, pad names (id), width, height of the window (iframe) on the MediaWiki page and many more parameters. Basically, you only have to indicate a pad name.
<eplite id="mytestpad" />
<eplite id="MyPseudoSecretPadHash-7ujHvhq06g" height="200px" width="600px" />
<eplite src="https://www.example.com/p/" id="mytestpad" />
<eplite id="mytestpad" show-controls="false" show-linenumbers="false" show-chat="false" monospaced-fonts="false" />
Prerequisites
editYou need at least one Etherpad Lite host server on which the pad lives. Assign the base-URL to $wgEtherpadLiteDefaultPadUrl
as shown above. For test purposes only —not for production— you can use the project's test server http://beta.etherpad.org/ at your own risk.
For setting up your own Etherpad Lite server (based on node.js) see Etherpad Lite homepage https://github.com/ether/etherpad-lite.
The extension is based on:
- https://github.com/ether/etherpad-lite-jquery-plugin
- https://github.com/ether/etherpad-lite/wiki/Embed-Parameters
The present MediaWiki extension does not require jQuery, it adds an <iframe>.
Pads which use resources from external domains will presumably not work fine in all browsers due to modern security concepts relating cross site scripting attacks.
Download
editThe extension can be retrieved directly from Git [?]:
- Browse code
- Some extensions have tags for stable releases.
- Browse tags
- Select the tag
- Click "snapshot"
- Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).
- Browse branches
- Select a branch name
- Click "Continue"
Extract the snapshot and place it in the extensions/EtherpadLite/ directory of your MediaWiki installation.
If you are familiar with Git and have shell access to your server, you can also obtain the extension as follows:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/EtherpadLite.git
Installation
edit- Download and move the extracted
EtherpadLite
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/EtherpadLite - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'EtherpadLite' );
- Configure as required.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration
editparameter | default | needed | comment |
---|---|---|---|
$wgEtherpadLiteDefaultPadUrl
|
http://beta.etherpad.org/p/ see comment |
needed | The default pad server base-URL which is used if no specific pad server base-URL is assigned in <eplite> tag. The src= attribute can be used to assign a pad server base-URL and is needed if you want to use more than one pad server.
|
$wgEtherpadLiteUrlWhitelist
|
array() see comment |
needed | For a maximum level of security, you should limit the usage to a distinct whitelist of base-URLs of Etherpad Lite servers
|
$wgEtherpadLiteDefaultWidth
|
"300px"
|
Your editors' default pad width; CSS units can be used | |
$wgEtherpadLiteDefaultHeight
|
"200px"
|
Your editors' default pad height; CSS units can be used |