Extension:SecureWidgets

From MediaWiki.org

Jump to: navigation, search

         

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
SecureWidgets

Release status: stable

Implementation  Parser function
Description Provides secure inclusion of widgets
Author(s)  Jean-Lou Dupont
Last Version  1.0.1
MediaWiki  1.11, 1.12 (probably works with earlier versions too)
License No license specified
Download SVN
See SVN ($Id: SecureWidgets.doc.wikitext 1158 2008-05-20 20:43:01Z jeanlou.dupont $)

check usage (experimental)

Contents

[edit] Purpose

Provides secure inclusion of widgets

[edit] Features

  • Performance: widget code is cached (in the transcache database table)
  • Batteries included: no need to copy code from other pages to get widgets: they are readily available through a repository
  • User-Friendly:
    • Comprenhensive error messages
    • Link to help page upon error
    • Example given upon error
    • Parameter type-checking
    • Default-value can be specified in widget templates
  • Extensible: new widgets can be created by editing pages in the Widget namespace
  • Secure: Widgets are controlled through a read-only SVN repository
    • For locally administered widgets in the Widget namespace, the appropriate access-control must be put in place manually

[edit] Usage

{{#widget:widget-name|optional-parameters}}

[edit] Example

{{#widget:Gliffy|id=1422053}}

[edit] Widget List

The list of available widgets is available as an RSS feed. The widget name can be inferred by the entry title; e.g.:

Widget:Gliffy - version 1.0.0

thus the widget name would be Gliffy and one could use it through {{#widget:Gliffy ...}} The widget list is also available at [1].

[edit] Widget Namespace

One can use Extension:ManageNamespaces to add and manage the Widget namespace. This is entirely optional.

[edit] Widget Creation

The extension allows for user-generated widgets provided that one configures the Widget namespace.

[edit] Parameters

Parameters are provided through the escape sequence:

  • {@{parameter-name}@} when only a parameter can be specified
  • {@{parameter-name|type}@} when a parameter and its type are specified
  • {@{parameter-name|type|default-value}@} when a parameter, its type and a default-value are specified

[edit] Example Template

<includeonly>
<!-- Gliffy Widget For Mediawiki by Jean-Lou Dupont -->
<script src="http://www.gliffy.com/diagramEmbed.js" type="text/javascript"></script>
<script type="text/javascript"> gliffy_did = "{@{id|integer}@}"; embedGliffy(); </script>
</includeonly>

[edit] Dependency



[edit] Installation

See the Mediawiki Extension table entry "download" above.[1]

[edit] LocalSettings.php

Extension:ExtensionManager: See footnote[2]

require_once( "$IP/extensions/SecureWidgets/SecureWidgets.php" );

[edit] PEAR

PEAR is a repository of en:PHP software code.

pear channel-discover mediawiki.googlecode.com/svn
  • Install extension through PEAR:
pear install mediawiki/SecureWidgets
  • Add the following to LocalSettings.php[2][3]:
require 'MediaWiki/SecureWidgets/SecureWidgets.php';
  • Note that the required version of PEAR must be respected. Currently, the minimum version of PEAR usable with this channel is v1.6.2. Perform the following command to upgrade to the latest version of PEAR:
pear upgrade pear

[edit] Upgrades through PEAR

Sometimes, it is necessary to clear PEAR's cache in order to perform upgrades.

pear clear-cache

or use the force method:

pear upgrade --force mediawiki/SecureWidgets

[edit] PEAR Web Frontend

For easier remote package management, PEAR Frontend WEB can be installed. Installation notes can be found here. An example of the WEB frontend is available here.

[edit] RSS feed

To keep kept up-to-date with this channel, use the following RSS feed__Rss2.jpg.

[edit] Notes

[edit] Other Extensions From the same author

Consult User Jldupont's page.


  1. The most recent release is always available through the extension's PEAR and SVN repositories. This page is not necessarily up-to-date.
  2. 2.0 2.1 2.2 Extension:ExtensionManager does not require any modification to LocalSettings.php because ExtensionManager includes the extension.
    Note that if PHP code caching is in place (e.g. APC, eAccelerator), then to successfully complete the installation a cache flush might be needed.
  3. Modifications to LocalSettings.php is only necessary if not using Extension:ExtensionManager

[edit] Partial Widget List

Here is an incomplete list of widgets available currently:

Addthis Feed
Diigo Gtalk
Feedburner Flickr
Freshshoutbox
Googleppt Gravatar
Quimble Slideshare
Js-Kit Rating Labpixies
MindMeister Gliffy
Skype Who's Amung Us
WidgetBox Youtube
Yahoo_im Twitter

[edit] History

Release Notes
1.0.0 Initial Release
1.0.1 Widget Feed address change