Extension:Widgets

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

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).

Widgets library
You can use any of the following widgets in your wiki, simply by copying over the contents of the page:


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