Extension:SecureWidgets
From MediaWiki.org
|
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
- The list is available Extension:SecureWidgets#Widget_List
- 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
- Extension:ExtensionManager of version >= 2.0.1
- Automatically resolved if using PEAR
[edit] Installation
See the Mediawiki Extension table entry "download" above.[1]
[edit] LocalSettings.php
Extension:ExtensionManager: See footnote[2]
- Add the following to LocalSettings.php if the extension was downloaded from Jean-Lou Dupont's MediaWiki SVN directory (link in the download entry of the table above)[2]:
require_once( "$IP/extensions/SecureWidgets/SecureWidgets.php" );
[edit] PEARPEAR is a repository of en:PHP software code.
require 'MediaWiki/SecureWidgets/SecureWidgets.php';
[edit] Upgrades through PEARSometimes, it is necessary to clear PEAR's cache in order to perform upgrades.
or use the force method:
[edit] PEAR Web FrontendFor 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__
.
[edit] Notes
[edit] Other Extensions From the same author
Consult User Jldupont's page.
- ↑ The most recent release is always available through the extension's PEAR and SVN repositories. This page is not necessarily up-to-date.
- ↑ 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. - ↑ Modifications to
LocalSettings.phpis 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 |
[edit] History
| Release | Notes |
|---|---|
| 1.0.0 | Initial Release |
| 1.0.1 | Widget Feed address change |