Extension:Java Applet

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
Java Applet

Release status: beta

Implementation Tag
Description Add java applets to a wiki
Author(s)
Latest version 2.0 (2013-06-02)
MediaWiki Tested on 1.22beta
Database changes No
License CCPL
Download Project page
Download snapshot

Git [Help]
Commit history
Note:
No localisation updates are provided by translatewiki.net.

README

Tags
<java_applet>
Added rights

javaapplet

Hooks used
ParserFirstCallInit

UploadVerifyFile

Translate the Java Applet extension if possible

Check usage and version matrix; code metrics

The Java Applet extension allows users with the 'javaapplet' right to upload Java applets (class and jar files), which can then be inserted into pages by anyone using the <java_applet> tag.

Usage[edit | edit source]

Arguments[edit | edit source]

  • code, java class file (required)
  • width, applet width (required)
  • height, applet height (required)
  • archive, jar file name (required)

Example[edit | edit source]

<java_applet code="File:PegGame.class"  height="150" width="150" archive="File:PegGame.jar" />

Installation[edit | edit source]

First, ensure that MediaWiki enables Java uploads by setting

$wgFileExtensions = array_merge( $wgFileExtensions, array( 'class', 'jar' ) );
$wgAllowJavaUploads = true;

To install, download and extract the .zip snapshot in your extensions directory or clone https://github.com/TK-999/mw-ext-JavaApplet into your extensions directory. To import the extension, add

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

to your LocalSettings.php file.

The extension only allows users with the 'javaapplet' right—by default, sysops—to upload .class and .jar files. You can adjust this by adding this right to other groups after require_once( "$IP/extensions/JavaApplet/JavaApplet.php" ); in LocalSettings.php:

require_once( "$IP/extensions/JavaApplet/JavaApplet.php" );
$wgGroupPermissions['ninjas']['javaapplet'] = true;

To Do[edit | edit source]

Automatically detect the 'code' value from jar files with properly setup manifests.