Extension:WolframCDF

Description
Allows Wolfram CDF files (interactive content generated by Wolfram Mathematica) to be shown in wiki pages.

Usage
The basic syntax for the cdf extension is:

filename

When specifying the filename, you do not need to include the `File:` namespace in the filename - it will work with or without it. If enabled, you may also provide an absolute URL instead of a filename to show a CDF file from another server.

Examples: SomeExample.cdf http://demonstrations.wolfram.com/HobermanCube/HobermanCube.cdf

Note that the second example above will only work if  is set to  ; the default is to not show external URLs.

Download instructions
To download the extension, you may obtain a zip of the latest code from the download link in the infobox. Alternatively, you may clone the git repository with the following command: git clone git://github.com/TheWatcher/wolfram_cdf.git

Installation
To install this extension, place the wolfram_cdf directory in your extensions directory, and add the following to : Note that, in order to actually upload and use .cdf files, you will need to ensure that file uploads are enabled ( is  ) and cdf extensions are allowed. For example: You may also need to either ensure that your webserver serves up .cdf files as  or, if that is not possible, you may need to modify   to contain

text/plain txt cdf

This should only be done in exceptional circumstances, however!

Parameters
The following parameters can be set in the file:


 * $wgCDFAllowExternalURLs
 * If this is set to  (the default is  ) then tags may contain URLs to load .cdf files from other web servers. This should be enabled with caution, as it may have security implications!


 * $wgCDFShowDownloadLink
 * If set to  (the default is  ), the extension will place a 'Click here to download this CDF' link beneath each CDF box to allow users to save a copy of the CDF for offline use.

For example, your file may contain:

The following css classes can also be used to apply styling to the html generated by this extension:


 * div.cdf
 * Each CDF box is contained within a div with this class


 * div.cdflink
 * If  is , the CDF download link is placed in a div with this class.