Extension:SimpleScript
From MediaWiki.org
(($parserphase2off$))((%parserphase2off%))
|
Release status: beta |
|
|---|---|
| Implementation | Parser function |
| Description | |
| Author(s) | Jean-Lou Dupont |
| Last Version | 1.0.0 |
| MediaWiki | 1.11 |
| License | No license specified |
| Download | see Installation See SVN ($Id: SimpleScript.doc.wikitext 691 2007-11-09 20:19:37Z jeanlou.dupont $) |
|
check usage (experimental) |
|
Contents |
[edit] Purpose
Provides a simple and controlled way of including javascript <script> tags on a wiki page using sysop defined interwiki links. This capability allows, for example, the inclusion of gadgets e.g. Google Gadgets.
[edit] Usage
For proper operation, this extension requires Extension:ParserPhase2 since the generated HTML markup is usually 'sanitized' by MediaWiki. In order to get around this limitation, ParserPhase2 can be used to invoke the parser function *after* the sanitization process (i.e. tidy) is executed on the wiki page. ((%#sscript| interwiki link | desired uri | [error message to show upon bad interwiki prefix] %))
[edit] Setting InterWiki Links
See InterWikiLinkManager extension for more details.
[edit] Example
Assuming the interwiki link 'gmodule' points to Google Gadget Modules (i.e. the interwiki link prefix would look like http://gmodules.com/ig/ifr?$1):
((%#sscript| gmodule | title=Mareas+en+Bilbao&border=http%3A%2F%2Fgmodules.com%2Fig%2Fimages%2F&synd=open&up_Port=401&up_UTC=0&type=googlegadget&url=http%3A%2F%2Fhorloge.maree.frbateaux.net%2Fgh.xml&output=js&w=320&h=222| wrong interwiki prefix! %))
[edit] Security Note
- It is advisable to use 'cascading protection'
- When page protection is not relied on to provide protection
and consequently only the last contributor's right acts as protection measure, it is advised to use considerable care when using templates on the same page.
[edit] Google Gadgets
For a list of Google Gadgets and the instructions for embedding those, please see GoogleGadgets.
[edit] Dependancy
- StubManager extension
- ParserPhase2 extension
- 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/SimpleScript/SimpleScript.php" );
[edit] PEARPEAR is a repository of en:PHP software code.
require 'MediaWiki/SimpleScript/SimpleScript.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