Extension:EtherpadLite

From MediaWiki.org
Jump to: navigation, search
shortcut: EPL
MediaWiki extensions manual
Crystal Clear action run.png
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.13 (2012-03-19)
MediaWiki 1.19+
PHP 5.3+
Database changes No
License GPL; MIT
Download
Tags
<eplite>
Hooks used
ParserFirstCallInit

Translate the EtherpadLite extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

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]

Warning Warning: This extension may have security issues if $wgEtherpadLiteUrlWhitelist isn't set to a list of allowed EtherpadLite servers.

Usage[edit | edit source]

Some 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" />

20120211 Extension EtherpadLite screenshot with three pads on MediaWiki page.png

Installation[edit | edit source]

The extension can be retrieved directly from Git [?]:

  • Browse code
  • Some extensions have tags for stable releases.
  • 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).

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/p/mediawiki/extensions/EtherpadLite.git


  • Download and extract the tarball in your extensions/ folder. It should generate a new folder called EtherpadLite directly inside your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/EtherpadLite/EtherpadLite.php";
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.
Warning Warning: This extension may have security issues if $wgEtherpadLiteUrlWhitelist isn't set to a list of allowed EtherpadLite servers.

Prerequisites[edit | edit source]

You 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/p/ 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:

The present MediaWiki extension does not require jquery. It adds an iframe.

Configuration settings[edit | edit source]

Configuration settings
parameter default comment
$wgEtherpadLiteDefaultPadUrl http://beta.etherpad.org/p/

see comment

The default pad server URL which is used if no specific pad URL is assigned as src= attribute in <eplite> tags.
  • The installation default value is the URL of the Etherpad Lite developers' test pad as shown. You cannot rely on its availabilty and service continuity.
  • For production wikis, you need to assign an own pad server URL such as http://www.your-pad-server.org/p/
$wgEtherpadLiteUrlWhitelist array();

see comment

For a maximum level of security, you should limit the usage to a distinct whitelist of URLs of Etherpad Lite servers like array( "http://www.your-pad-server.org/p/", "http://www.another-safe-pad-server.org/p/" );
  • an empty array() (the installation default) or non-existent array means: no whitelist is defined, no pads are allowed
  • Set to array( "*" ) if you expressly want to allow all URLs. You can but should not open all URLs.
  • Set to array( $wgEtherpadLiteDefaultPadUrl ) if you expressly want to allow your default pad Url (see above), which makes sense. This currently not the default setting.
$wgEtherpadLiteDefaultWidth "300px" optional pad standard width
$wgEtherpadLiteDefaultHeigth "200px" optional pad standard height

Deinstallation[edit | edit source]

  1. remove the require_once( "$IP/extensions/EtherpadLite/EtherpadLite.php" ); from your $IP/LocalSettings.php
  2. delete $IP/extensions/EtherpadLite subdirectory

Known bugs[edit | edit source]

See also[edit | edit source]

References[edit | edit source]

  1. filed as Bug 36319 "E:EtherpadLite - Implement correct user authentication and user name setting using the EtherpadLite API".