| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Adding an applet into a wiki page

Page history last edited by Russell Blyth 12 years, 9 months ago

There are three basic approaches to adding a GeoGebra Applet to this wiki.

 

  1. We can view the wiki as a file storage space and then simply link to the pages as we would for other files.  We lose some of the wiki features, but it is easier to setup and move files.  We can then have a web page that includes the GeoGebra file within the applet tag using ggbBase64.  We then link to the GeoGebra jar file at the central server.
  2. As in the first case, we can view the wiki as a file storage space, but use local files so we are reproducing the file structure we would want if we were to run the applet locally and offline.
  3. We can do the insertion within the wiki structure.  This lets us edit the page with the nice editing tools provided with the wiki.  It also uses all of the nice security features of the wiki.  However we then are limited by those same features and the resulting pages become hard to move to another setting. 

 

This page walks through the third method with the first applet we created showing that the three angle bisectors of a triangle all meet in one point.

 

The first detail occurs when we export the applet.  We will export the applet twice.  Under the advanced tab in the export dialog, we want to export once with the button at the bottom in the Files section that indicates "ggb Files & jar Files" selected and once with it unselected.

Then we create the applet as before.

 

From exporting with the "ggb Files & jar Files" button selected, we will produce a file named "AngleBisectorsMKM.ggb".

Upload that file to the wki.

 

Next we use the wiki to create a page int he usual way, with a place left where we will put the applet.

Now for the tricky part.  We are going to open the two html files we created from our exports  with a text editor and locate the applet tags.  That is a block of code that starts with "<applet>" and ends with "</applet>".
 We will need elements from each version.

 

We start with the tag produced by exporting with the "jar Files" box unselected.

That file has a long codebase.  This says that files, like the "geogebra.jar" file are located on a server at www.geogebra.org.  This tag also has the details of the GeoGebra construction turned into a long ggbBase64 code string.  Unfortunately, the string is typically so long that we can't use the applet string with the wiki.

 

We now turn our attention to the other html file, the one constructed with the "jar Files" box checked.  This export creates a series of files.  Notice that this time the codebase is "./", which means the browser is told to look in the same location as the html file for other files that are called.  We also notice that the filename parameter calls for a file called "AngleBisectorMKM.ggb". 

For the modified tag we want to use a local ggb file and a remote jar file.  We change the name of the archive to the full url at the geogebra server.  We also change the filename to add "f/" in front of the filename.  In our case it goes from "AngleBisectorMKM.ggb" to  "f/AngleBisectorMKM.ggb".  That will make the browser look for the file in the correct spot in the wiki file system. 

Next we go back to the wiki page and select the "Insert" menu and select HTML/JavaScript" from that menu.

 

In the appropriate box we add our applet tag.  Be sure to select the "Allow JavaScript and other potentially unsafe code" button,

We then see a screen that gives us a last chance to insert the plugin or to cancel.  Choose "Insert Plugin".

 

 

When we get back to the page we are editing, we see the same box we saw in the preview.  Click save at the bottom of the page.  (If you want to edit the applet tag, double click on the green box.)

We now have a page with a working applet.

 

Click for a pdf version of this wiki page AddingAppletToWiki.pdf

Modified 7/3/2011

Comments (0)

You don't have permission to comment on this page.