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 possible

Check usage and version matrix; code metrics
Bugs: list open list all report

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]

You can download the extension directly from the MediaWiki source code repository (browse code). You can get:

One of the extensions tags

Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag

  • Go to the tags list
  • Click the name of the tag you want to download
  • Click "snapshot"
The latest version of one of the extensions branches

Each extension has a master branch containing the latest code (might be unstable). Extensions can have further branches as well.

  • Go to the branches list
  • Click the branch name
  • Click "snapshot"
A snapshot made during the release of a MediaWiki version.

This might be unstable and is not guaranteed to work with the associated MediaWiki version.

After you've got the code, save it into the extensions/EtherpadLite directory of your wiki.

If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/EtherpadLite.git
  • Download and extract the files in a directory called EtherpadLite in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • 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".