Difference between revisions of "MediaWiki/Installation"
AngelHerraez (talk | contribs) (a separate page for collecting installation instructions (not available any more on MW)) |
AngelHerraez (talk | contribs) |
||
Line 1: | Line 1: | ||
= Installation of the Jmol (JSmol) Extension for Mediawiki = | = Installation of the Jmol (JSmol) Extension for Mediawiki = | ||
− | (''This must be done by the wiki administrator.'') | + | :<span style="color:white;font-weight:bold;background:#008F00;padding:0 1ex;">Admin:</span> (''This must be done by the wiki administrator.'') |
The files forming the Jmol Extension are part of the Jmol source code and may hence be retrieved from [{{SVN Trunk}}Jmol-extensions/wiki/MediaWiki/ the SVN system]. | The files forming the Jmol Extension are part of the Jmol source code and may hence be retrieved from [{{SVN Trunk}}Jmol-extensions/wiki/MediaWiki/ the SVN system]. | ||
[[File:Jmol Extension 5 folders setup 2.jpg|frame|right|arrangement of folders and files of the Jmol Extension]] | [[File:Jmol Extension 5 folders setup 2.jpg|frame|right|arrangement of folders and files of the Jmol Extension]] | ||
− | '''Note:''' Version 5 of the Jmol Extension has been tested against MediaWiki 1.32. There are significant changes in MediaWiki, so this procedure will not work with older versions. | + | '''Note:''' Version 5 of the Jmol Extension has been tested against MediaWiki 1.32. There are significant changes in MediaWiki, so this procedure will not work with older versions. It is not compatible either with newest versions of MediaWiki. |
== To install the Jmol extension using Jmol 14: == | == To install the Jmol extension using Jmol 14: == | ||
Line 12: | Line 12: | ||
# Extract into a temporary location the {{file|jsmol.zip}} file from the Jmol release. | # Extract into a temporary location the {{file|jsmol.zip}} file from the Jmol release. | ||
# Create a {{folder|Jmol}} subfolder in the {{folder|extensions}} folder of your MediaWiki installation. | # Create a {{folder|Jmol}} subfolder in the {{folder|extensions}} folder of your MediaWiki installation. | ||
− | # Extract into this {{folder|Jmol}} folder the following contents from the {{file|jsmol.zip}} file: | + | # Extract (upload) into this {{folder|Jmol}} folder the following contents from the {{file|jsmol.zip}} file: |
#* the {{file|JSmol.min.js}} file, | #* the {{file|JSmol.min.js}} file, | ||
#* the {{file|JSmol.GLmol.min.js}} file, | #* the {{file|JSmol.GLmol.min.js}} file, | ||
Line 21: | Line 21: | ||
# Extract into a temporary location the {{file|jsmol.zip}} file from the Jmol release. | # Extract into a temporary location the {{file|jsmol.zip}} file from the Jmol release. | ||
# Create a {{folder|Jmol}} subfolder in the {{folder|extensions}} folder of your MediaWiki installation. | # Create a {{folder|Jmol}} subfolder in the {{folder|extensions}} folder of your MediaWiki installation. | ||
− | # Extract into this {{folder|Jmol}} folder the following contents from the {{file|jsmol.zip}} file (all located inside a {{folder|jsmol}} subfolder): | + | # Extract (upload) into this {{folder|Jmol}} folder the following contents from the {{file|jsmol.zip}} file (all located inside a {{folder|jsmol}} subfolder): |
#* the {{file|JSmol.min.js}} file, | #* the {{file|JSmol.min.js}} file, | ||
#* the {{file|JSmol.GLmol.min.js}} file, | #* the {{file|JSmol.GLmol.min.js}} file, | ||
#* the {{folder|j2s}} and {{folder|php}} folders. | #* the {{folder|j2s}} and {{folder|php}} folders. | ||
− | |||
== Further steps == | == Further steps == |
Revision as of 06:24, 23 April 2024
Contents
Installation of the Jmol (JSmol) Extension for Mediawiki
- Admin: (This must be done by the wiki administrator.)
The files forming the Jmol Extension are part of the Jmol source code and may hence be retrieved from the SVN system.
Note: Version 5 of the Jmol Extension has been tested against MediaWiki 1.32. There are significant changes in MediaWiki, so this procedure will not work with older versions. It is not compatible either with newest versions of MediaWiki.
To install the Jmol extension using Jmol 14:
- Download the latest release of Jmol (
Jmol-14.xx.xx-binary.zip
) You need version 14.29.32 or later. - Extract into a temporary location the jsmol.zip file from the Jmol release.
- Create a Jmol subfolder in the extensions folder of your MediaWiki installation.
- Extract (upload) into this Jmol folder the following contents from the jsmol.zip file:
To install the Jmol extension using Jmol 16:
- Download the latest release of Jmol (
Jmol-16.xx.xx-binary.zip
) Good compatibility may be expected, but has not been tested yet. - Extract into a temporary location the jsmol.zip file from the Jmol release.
- Create a Jmol subfolder in the extensions folder of your MediaWiki installation.
- Extract (upload) into this Jmol folder the following contents from the jsmol.zip file (all located inside a jsmol subfolder):
Further steps
- Download all the source files of the Jmol extension and place them in the
extensions/Jmol
folder. - Add the following line to your LocalSettings.php file (near the end):
require_once("extensions/Jmol/Jmol.php");
You can configure the Jmol extension with several settings added after the require_once
line (default value in bold):
- $wgJmolAuthorizeChoosingSignedApplet (true, false) : Authorize users to choose between the unsigned and the signed Jmol applet.
- $wgJmolAuthorizeUploadedFile (true, false) : Authorize the use of <uploadedFileContents>.
- $wgJmolAuthorizeUrl (true, false) : Authorize the use of <urlContents>.
- $wgJmolDefaultAppletSize (400) : Size in pixels of the Jmol applet.
- $wgJmolDefaultScript : Default script.
- $wgJmolExtensionPath (extensions/Jmol) : Path to the directory where the Jmol extension is installed. This must be an absolute path, therefore if you customize it, make sure it is prepended with $wgScriptPath (see example in Jmol.php).
- $wgJmolForceNameSpace : Force the NameSpace where the applet will go looking for wiki pages containing molecular data (using <wikiPageContents>).
- $wgJmolShowWarnings (true, false) : Display warnings when users try to use disabled features.
- $wgJmolUsingSignedAppletByDefault (true, false) : Choose if the signed Jmol applet will be used by default. Note: the signed Jmol applet is signed with a default certificate. If you want to use the signed Jmol applet in your wiki, I suggest resigning the Jmol applet with your own certificate.
Note: If you want to authorize users to upload files containing molecular data (for using the <uploadedFileContents> tag), you need to do the following:
- By default, MediaWiki authorizes the uploading of files whose name ends with a limited number of extensions. For example, if you want to authorize uploading *.cml files, add $wgFileExtensions[] = 'cml'; in LocalSettings.php.
- You can add an icon in the skins/common/images/icons/ directory for each extension (for example, fileicon-cml.png). In this wiki, we are using this image, which leads to the following result.
Deprecated
Installation of the Jmol extension was described on the Jmol extension page on MediaWiki.
That page has been removed since the Jmol Extension is not compatible with recent versions of MediaWiki.