Discover

WIRIS plugin for Joomla

DOWNLOAD

1 Requirements

  • Joomla 1.5 or higher installed.
  • For Joomla versions previous to 3.2.x: JCE module with TinyMCE
  • A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.

2 Copy files

Unzip the TinyMCE WIRIS Plugin and copy the tiny_mce_wiris directory into your Joomla TinyMCE plugins directory. These would be the final paths depending on your Joomla version:

3.2.x or higher: /media/editors/tinymce/plugins/tiny_mce_wiris

1.5.14 to 3.1.6: /media/editors/tinymce/jscripts/tiny_mce/plugins/tiny_mce_wiris

Older than 1.5.14: /plugins/editors/tinymce/jscripts/tiny_mce/plugins/tiny_mce_wiris

Now, give write permissions to <tiny-mce-plugins-directory>/tiny_mce_wiris/cache and <tiny-mce-plugins-directory>/tiny_mce_wiris/formulas directories to the web server user (it will be used to store formula MathML codes and temporal images).

3 Activate WIRIS plugin for TinyMCE

3.1 Joomla 3.2.x or higher

Edit /plugins/editors/tinymce/tinymce.php and include the plugin and buttons in the mode you are using (Advanced, Extended, etc.). Joomla uses the Advanced mode by default. The name of the plugin is tiny_mce_wiris and the button names are tiny_mce_wiris_formulaEditor (WIRIS editor) and tiny_mce_wiris_CAS (WIRIS cas).

Note: In your tinymce.php look for /* Advanced mode*/ or /* Extended mode*/ to find the appropiate block of code.

Example:

$toolbar2 = "outdent indent | undo redo | link unlink anchor image code | hr table | subscript superscript | charmap | tiny_mce_wiris_formulaEditor tiny_mce_wiris_CAS";

···
plugins : \"table link image code charmap autolink lists importcss tiny_mce_wiris\",

3.2 Joomla versions from 1.5.14 to 3.1.6

Open plugins/editors/tinymce.php (in Joomla 2.5.x or above this file is inside plugins/editors/tinymce/) and search the line with this text:

$buttons1_add_before = implode(',', $buttons1_add_before);

Now add this code before the line:

$plugins[] = 'tiny_mce_wiris';
$buttons2_add[] = 'tiny_mce_wiris_formulaEditor';  // For WIRIS Formula Editor
$buttons2_add[] = 'tiny_mce_wiris_CAS';            // For WIRIS CAS

The final code should look like:

…
$plugins[] = 'tiny_mce_wiris';
$buttons2_add[] = 'tiny_mce_wiris_formulaEditor';  // For WIRIS Formula Editor
$buttons2_add[] = 'tiny_mce_wiris_CAS';            // For WIRIS CAS

$buttons1_add_before = implode(',', $buttons1_add_before);
…

The final step is the activation of the extended tinyMCE editor. In Joomla administrator panel, go to Extensions > Plugin Manager and click on Editor – TinyMCE. Now, on Functionality field (on right panel), choose Extended and then save changes.

3.3 Joomla older than 1.5.14

Open plugins/editors/tinymce.php and search the line with this text:

$buttons2 = implode(',', $buttons2);

Now add this code before the line:

$plugins[] = 'tiny_mce_wiris';
$buttons2[] = 'tiny_mce_wiris_formulaEditor';  // For WIRIS Formula Editor
$buttons2[] = 'tiny_mce_wiris_CAS';            // For WIRIS CAS

The final code should look like:

…
$plugins[] = 'tiny_mce_wiris';
$buttons2[] = 'tiny_mce_wiris_formulaEditor';   // For WIRIS Formula Editor
$buttons2[] = 'tiny_mce_wiris_CAS';             // For WIRIS CAS

$buttons2 = implode(',', $buttons2);
…

4 Configure

Edit media/editors/tinymce/jscripts/tiny_mce/plugins/tiny_mce_wiris/configuration.ini to set your own values. This table specifies all possible parameters.

5 WIRISpugins.js

Add WIRISplugin.js script. You can find more information here.

Note: In Joomla you need to include WIRISplugins.js in your template file. This file is located at /templates/<your-template-name>/index.php.

6 Check that the plugin works correctly

In order to check if the plugin is installed correctly, there is a page that makes some tests on your server. Open this link to see where is your test page.

7 Clean and backup WIRIS plugin for TinyMCE

Check this page.