Extension:Widgets

Widgets extension allows adding widgets to wiki by just creating pages in Widget namespace.

This extension was developed by Sergey Chernyshev for Ardorado.com and sponsored by Semantic Communities, LLC.

Usage
To add a widget to MediaWiki installation, just create a page in Widget namespace and then use  parser function to include it to the pages of the wiki.

parser function
To add defined widget to pages, users can use  parser function. The syntax is as follows:

Where WidgetName is a page name in Widget namespace (e.g. Widget:WidgetName) and param=value pairs are defining parameters defined within widget code.

Widget page syntax
Widget extension uses Smarty PHP templating engine to provide simple templating functionality within widget pages. All parameters passed to widget are converted into Smarty parameters.

You should use escape modifiers to make sure that user parameters can not expose hosting website to XSS (or any other) attacks.

Download instructions
Download the code archive and extract it to  folder. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installing from tarball
You can download Widgets code here:
 * Widgets-0.5.tgz - compressed using tar and gzip

Installing from SVN
To get code from Subversion, just type svn checkout http://mediawiki-widgets.googlecode.com/svn/trunk/ Widgets

Installation
To install this extension, add the following to LocalSettings.php:

Also,  folder should be writable by web server (this is where Smarty stores pre-compiled templates).

Configuration parameters
You can set namespace ID to something different then default (274), make sure that it's an even number. Talk namespace ID will be

User rights
This extension adds Widget namespace, but due to potential security implications that can result from using insecure widget code, this namespace is only editable by users who have  permission (  group is also created to add users to, see Help:User rights management for more details).

Contributing code and widgets
If you would like to contribute patches or found some problems with the code, please send message to the discussion group.

If you created a widget and would like to share it, feel free to add it to Widgets library, you can also post it to MediaWikiWidgets.org - open hosting for widgets.

Support
The best way to seek help with this widget is MediaWiki Widgets Google group - extension maintainer and active users and contributors are on this list and will be able to help you.

Widgets library
MediaWikiWidgets.org contains a full library of ready-made widgets, including support for most of the major video sites. Any widget can be used simply by copying over the contents of the page. Some sample widgets from that site are:


 * Feed - displays the most recent articles from an RSS feed
 * Flickr - displays a set of images from Flickr that match a certain keyword
 * SlideShare - adds SlideShare slideshow player
 * YouTube - embeds a YouTube video