Extension:Java Applet

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Java Applet

Release status:Extension status beta

ImplementationTemplate:Extension#type Tag
DescriptionTemplate:Extension#description Add java applets to a wiki
Author(s)Template:Extension#username
Latest versionTemplate:Extension#version 2.0 (2013-06-02)
MediaWikiTemplate:Extension#mediawiki Tested on 1.22beta
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license CCPL
Download
README
TagsTemplate:Extension#tags
<java_applet>
Added rightsTemplate:Extension#rights

javaapplet

Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit
UploadVerifyFileManual:Hooks/UploadVerifyFile

Translate the Java Applet extension if it is available at translatewiki.net

Check usage and version matrix.

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]

Arguments[edit]

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

Example[edit]

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

Installation[edit]

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]

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