Difference between revisions of "MediaWiki/ExtensionV5"

From Jmol
Jump to navigation Jump to search
(updates to Jmol MW Extension v5)
(better subgrouping)
Line 27: Line 27:
  
 
=== Full-featured tag ===
 
=== Full-featured tag ===
 +
==== First level tag ====
 
The <code>jmol</code> tag encloses different subtags that offer more flexibility in how and when the model will be displayed,  
 
The <code>jmol</code> tag encloses different subtags that offer more flexibility in how and when the model will be displayed,  
 
as well as its rendering or scripting.
 
as well as its rendering or scripting.
  
Second-level subtags:
+
==== Second-level subtags that insert a JSmol panel (either inline or in a popup): ====
 
* <code>jmolAppletButton</code>
 
* <code>jmolAppletButton</code>
 
* <code>jmolAppletLink</code> both will, upon user action, open a small window (pop-up) with a JSmol panel displaying the structure. See [[MediaWiki/Tags for Pop-up Models]] for details.
 
* <code>jmolAppletLink</code> both will, upon user action, open a small window (pop-up) with a JSmol panel displaying the structure. See [[MediaWiki/Tags for Pop-up Models]] for details.
Line 36: Line 37:
 
* <code>jmolAppletInlineLink</code> both will, upon user action, insert into the page a JSmol panel displaying a structure. See [[MediaWiki/Tags for Pop-in Models]] for details.
 
* <code>jmolAppletInlineLink</code> both will, upon user action, insert into the page a JSmol panel displaying a structure. See [[MediaWiki/Tags for Pop-in Models]] for details.
 
* <code>jmolApplet</code> inserts the JSmol panel in the page as soon as it is loaded. See [[MediaWiki/Tags for In-page Models]] for details.
 
* <code>jmolApplet</code> inserts the JSmol panel in the page as soon as it is loaded. See [[MediaWiki/Tags for In-page Models]] for details.
* <code>jmolButton</code> This and the following insert in the page controls to act on one <code>jmolApplet</code>. See [[MediaWiki/Tags for Controls]] for details.
+
 
 +
==== Second-level subtags that insert controls to act on one JSmol panel: ====
 +
See [[MediaWiki/Tags for Controls]] for details and examples.
 +
* <code>jmolButton</code>
 
* <code>jmolLink</code>
 
* <code>jmolLink</code>
 
* <code>jmolCheckbox</code>
 
* <code>jmolCheckbox</code>
Line 42: Line 46:
 
* <code>jmolRadioGroup</code>
 
* <code>jmolRadioGroup</code>
  
Third-level subtags:
+
==== Third-level subtags: ====
 
* <code>image</code>
 
* <code>image</code>
 
* <code>script</code>
 
* <code>script</code>
Line 65: Line 69:
 
* <code>vertical</code> applies only to <code>jmolRadioGroup</code>
 
* <code>vertical</code> applies only to <code>jmolRadioGroup</code>
 
* <code>menuheight</code>  applies only to <code>jmolMenu</code>
 
* <code>menuheight</code>  applies only to <code>jmolMenu</code>
 
  
 
= Former versions =
 
= Former versions =

Revision as of 18:12, 22 April 2024

Running Jmol / JSmol

Jmol (JSmol) Extension for MediaWiki, version 5

For general information on this Extension and particularly about how to install and set it up, visit the MediaWiki page.

This version of the Extension has been developed and tested with MediaWiki 1.32.

It will use by default JSmol objects in the HTML5 modality, but configuration may be adjusted to allow the Java modality (signed applet) or the WebGL modality (note that JSmol has limited functionality with the latter). All mentions of either Jmol or JSmol in this documentation are synonyms. Note also that the use of "applet" in names and references is maintained for legacy reasons but Java is not involved any more (unless forced by the user and allowed by the wiki administrator).

Please check the version you have installed in your wiki (browse to Special pages, then Version). Documentation for former versions of the Extension may be found in MediaWiki/ExtensionV3 and MediaWiki/ExtensionV4.


How to use the Jmol Extension

This applies to version 5 of the Extension

Simple tags

There are 4 tags that will render a link in the page that, when clicked by the user, will open a small window (pop-up) with a JSmol panel that displays a structure. No custom rendering or scripting on the structure is possible.

  • jmolFile
  • jmolMol
  • jmolSmiles
  • jmolPdb

See MediaWiki/Simple_Tags for details and demonstration with examples.

Full-featured tag

First level tag

The jmol tag encloses different subtags that offer more flexibility in how and when the model will be displayed, as well as its rendering or scripting.

Second-level subtags that insert a JSmol panel (either inline or in a popup):

  • jmolAppletButton
  • jmolAppletLink both will, upon user action, open a small window (pop-up) with a JSmol panel displaying the structure. See MediaWiki/Tags for Pop-up Models for details.
  • jmolAppletInlineButton
  • jmolAppletInlineLink both will, upon user action, insert into the page a JSmol panel displaying a structure. See MediaWiki/Tags for Pop-in Models for details.
  • jmolApplet inserts the JSmol panel in the page as soon as it is loaded. See MediaWiki/Tags for In-page Models for details.

Second-level subtags that insert controls to act on one JSmol panel:

See MediaWiki/Tags for Controls for details and examples.

  • jmolButton
  • jmolLink
  • jmolCheckbox
  • jmolMenu
  • jmolRadioGroup

Third-level subtags:

  • image
  • script
  • uploadedFileContents
  • urlContents
  • wikiPageContents
  • inlineContents
  • text
  • title
  • caption
  • color
  • size
  • controls
  • frame
  • pspeed
  • name applies to jmolApplet, same as all the above ones
  • target applies to jmolButton, jmolLink, jmolCheckbox, jmolMenu, jmolRadioGroup
  • scriptWhenChecked applies only to jmolCheckbox
  • scriptWhenUnchecked applies only to jmolCheckbox
  • checked applies only to jmolRadioGroup
  • item applies only to jmolMenu and jmolRadioGroup
  • vertical applies only to jmolRadioGroup
  • menuheight applies only to jmolMenu

Former versions

For documentation on former versions of the Extension, see MediaWiki/ExtensionV3 and MediaWiki/ExtensionV4.

Test Pages

  1. A few basic examples of the <jmolFile>, <jmolPdb> and <jmolSmiles> tags.
  2. A demo page for the <jmol> tag
  3. Uploaded XYZ File -- includes test of <jmolCheckbox>, <jmolLink>, <jmolButton>, and <jmolMenu>
  4. Uploaded MDL Molfile
  5. Uploaded CML File
  6. Uploaded PDB File opening in a pop-up -- tests jmolAppletLink
  7. Inlined MDL Molfile
  8. Inlined PDB File
  9. Inlined CML File
  10. Load SMILES via script -- Includes test of signed applet and <jmolMenu>
  11. Test page (Brian's)

Contributors

AngelHerraez