[pmwiki-users] embedd a java aplet with specific file extension
Patrick R. Michaud
pmichaud at pobox.com
Thu Jan 12 13:41:06 CST 2006
On Thu, Jan 12, 2006 at 08:24:21PM +0100, noskule wrote:
> hi list
> I would like to embed a java applet with a specific fileextension in
> wikipages.
> So I took the svg script and changed it as follows:
>
>
>
> ---------------------------------
> SDV($ZirTagFmt,
> "<applet CODEBASE='data/media' ARCHIVE='http://netstreams.org/netstreams/scripts/zirkel.jar'
> CODE='rene.zirkel.ZirkelApplet.class' width='580' height='400'>Z.u.L. Applet
> <param name='file' value='\$LinkUrl'>
> <param mane='style' value='3d'>
> </applet>");
>
> Markup('zir', '<urllink',
> "/\\b(?>(\\L))([^\\s$UrlExcludeChars]+\\.zir)/e",
> "Keep(\$GLOBALS['LinkFunctions']['$1'](\$pagename,'$1','$2',NULL,'$1$2',
> \$GLOBALS['ZirTagFmt']), 'L')");
>
> SDVA($WikiStyleAttr,array(
> 'height' => 'img|object|embed',
> 'width' => 'img|object|embed'));
> ---------------------------------
>
> Is it somhow possible to overwrite the default size of the applet in
> the wikitext like in the svg example?
> %width='580' height='400'% Attach:Ellipse.zir
Yes, but you have to tell PmWiki that you're specifically wanting
to apply width and height to the <embed> tag (otherwise it tries
to apply them to an <img> tag):
$WikiStyleApply['embed'] = 'embed';
%apply=embed width='580' height='400'% Attach:Ellipse.zir
'width' and 'height' are special in this case because sometimes
they are tag attributes (e.g., for <img>) and sometimes they are
CSS properties.
> if I put
> ARCHIVE='\$ScriptUrl/scripts/zirkel.jar'
> instead of the absolute url $ScriptUrl shwos up in the html code, what
> im doing wrong here ?
I don't know, seems like it ought to work. Maybe try {\$ScriptUrl}.
But really, it seems as though you should be using $PubDirUrl here,
and storing the .jar file in the pub directory.
> what is the $Globals for, what could be defined with it?
$GLOBALS is a PHP array that is defined in every scope and allows
direct access to the global variable of the same name. Thus
$GLOBALS['XYZ'] is the same as accessing the global variable $XYZ.
Pm
More information about the pmwiki-users
mailing list