Difference between revisions of "Talk:MediaWiki"

From Jmol
Jump to navigation Jump to search
(Bug/Patch)
(Defaults for Customizable Parameters)
 
(2 intermediate revisions by 2 users not shown)
Line 109: Line 109:
 
** {{Tag|header}} : A text that will be displayed, in bold, above the link, and will stay when the link is replaced by the applet. May be omitted.
 
** {{Tag|header}} : A text that will be displayed, in bold, above the link, and will stay when the link is replaced by the applet. May be omitted.
 
** {{Tag|caption}} : A text that will be displayed, in a smaller font, below  the link, and will stay when the link is replaced by the applet. May be omitted.
 
** {{Tag|caption}} : A text that will be displayed, in a smaller font, below  the link, and will stay when the link is replaced by the applet. May be omitted.
 +
::''(The plan is to have the header and caption display and hide together with the applet, but this is not yet implemented)''
 +
 +
==Defaults for Customizable Parameters==
 +
I may have missed it, but for the parameters that may be added to LocalSettings.php, indicating the defaults would be nice (so users know whether or not they need to include the parameters to achieve a desired effect). Just my two cents! [[User:Mevans86|Mevans86]]
 +
 +
:Thanks, Mike. It is there: [[MediaWiki#Installation]], 2nd block. Or do you mean something else? --[[User:AngelHerraez|AngelHerraez]] 19:42, 13 October 2010 (UTC)

Latest revision as of 19:42, 13 October 2010

Please, post your suggestions concerning the Jmol extension here.


Reading files

Suggestion

In the first version, the only way of giving a datafile to the applet is directly through the <onlineContents> tag.

Other ways need to be available:

  • Accessing a file previously uploaded in MediaWiki DONE<uploadedFileContents>
  • Accessing a file stored as a Wiki Page DONE<wikiPageContents>
  • Accessing a file through an URL. That may require several other modifications: DONE<urlContents>
    • Possibility to disable this feature in LocalSettings.php DONE
    • Possibility to use the signed applet to access a remote file (configurable in LocalSettings.php) DONE

Note: Accessing files directly will also give the possibility to load gzipped files directly since Jmol read gzipped files as well as non-compressed files.

Comments

  • all files should be accessible via a common category, this will allow to browse to all files at the same time. In other words, this will allow to build up a data repository, which allows downloading all at once.
<uploadedFileContents> can be used to use uploaded files. In the description of the file, it's possible to add the file in categories. On this Wiki, the category is Molecular Data. --Nico
<wikiPageContents> and $wgJmolForceNameSpace can be used to put all the files in one namespace (not a category). --Nico
  • If possible a second tool should be able to generate an archive file out of that.
  • Is it possible to extend this approach also to JChemPaint and CDK/JOELib to get 2D drawings and calculate physicochemical properties? E.g. toxicity, solubility, etc.?
Currently, I don't know how JChemPaint and CDK/JOELib work. I won't do it for the first version of the Jmol Extension, but I would happily discuss with people about this. --Nico


Extending to other tools of the Blue Obelisk

Since this approach is quite general for other tools, too. It might be interesting to include also other tools of the Blue Obelisk Movement, e.g.:

  • 2D layout and drawings: JChemPaint
  • feature calculation: CDK,JOELib
  • NMR predictions: CDK
  • etc.


Various

  • Enable non square applets.
This is already possible using e.g. <size>[300,150]</size>. The only issue is the setting of setZoomLarge, but that should better be inserted in the script tag by the person editing the page, as both options are reasonable.

Completion of current ideas for extension

Can the note near the top of the article be tempered now to indicate that development has stabalised and production testing is now needed? --Bduke 02:09, 27 April 2006 (CEST)

Done

Applet appears only in preview (solved)

I'm only seeing the applet in Preview; I'm using the extension files and Jmol files as downloaded yesterday (June 26,2008) MW 1.12 MacOSX 10.5.3/Apache 2

It appears that the js is not being added in the saved copy, but are being added in the preview. Via Google, I found similar problems in an earlier version, but it appears that the extension has been refactored, so I don't see how to apply the fixes, or if they are relevant to the problem.

Right now I have this on my laptop, so I can't send a URL. --JimHu 19:57, 27 June 2008 (CEST)

solution on laptop is to adjust the path in $wgJmolExtensionPath to reflect the httpd document root

Applet not loading

Although the extension is working on my laptop, I'm not getting it to run on the server. This looks like something is calling a file improperly. The access log reads:

GET /dev/extensions/Jmol/%ef%bb%bf%3c!DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201/0%20Transitional//EN%22%20%22http://www/w3/org/TR/xhtml1/DTD/xhtml1-transitional/dtd%22%3e.class HTTP/1.1" 302 13 "-" "Mozilla/4.0 (Mac OS X 10.5.3) Java/1.5.0_13"

weird! --JimHu 11:00, 29 June 2008 (CEST)

this appears to be a problem with the inline data only... the extension works on a file. --JimHu 11:37, 29 June 2008 (CEST)

Behavior in preview mode

Be careful when testing your edits involving the extension. Several things work differently in preview mode than in saved page. --AngelHerraez 23:36, 10 December 2008 (CET)

You may prefer to do your tests in the Sandbox.

Bug/Patch

in Jmol.body.php after line 262 add:

       if (is_null($title)) return $this->showWarning($this->mValUploadedFileContents.' file not found' );

This prevents the extension from crashing MW if a user puts invalid text in the uploaded file field. --JimHu 18:41, 10 April 2009 (CEST)

Thanks for reporting, but I cannot reproduce this problem. Can you give more details? --AngelHerraez 20:43, 8 June 2009 (CEST)
This is very odd. I have a memory of running into a problem where a crash happened due to Jmol needing to check something... but the code snippet above isn't in my copy of the file Jmol.body.php, and the modification date on the file is before the sig date on the comment above. In any case, it looks like a false alarm. Sorry about that. --JimHu 21:36, 8 June 2009 (CEST)

Update of the extension

These notes document work in progress to expand the Extension to other features; I will move them to the main page when the update is stable.--AngelHerraez 20:43, 8 June 2009 (CEST)

Simple usage

Jmol applet inserted into the page

To add a link that inserts (or 'pops-in', as I like to call it) a Jmol applet in the existing page (inline, in a div that was empty or not visible), use the <jmolAppletInlineLink>. For example:

<jmol>
  <jmolAppletInlineLink>
    <uploadedFileContents>file uploaded in the wiki containing the molecular data</uploadedFileContents>
    <size>size of the applet, in pixels</size>
    <text>text displayed in the link</text>
  </jmolAppletInlineLink>
</jmol>

The applet will show in place of the link. There will also be an [X] link that will hide again the applet and reveal the original link.

Reference

  • <jmolAppletInlineLink> : A link for inserting a Jmol Applet into the page. It can contain the same tags as the <jmolApplet> tag, and also the following tags :
    • <text> : Text of the link. If omitted, defaults to 'Jmol'.
    • <header> : A text that will be displayed, in bold, above the link, and will stay when the link is replaced by the applet. May be omitted.
    • <caption> : A text that will be displayed, in a smaller font, below the link, and will stay when the link is replaced by the applet. May be omitted.
(The plan is to have the header and caption display and hide together with the applet, but this is not yet implemented)

Defaults for Customizable Parameters

I may have missed it, but for the parameters that may be added to LocalSettings.php, indicating the defaults would be nice (so users know whether or not they need to include the parameters to achieve a desired effect). Just my two cents! Mevans86

Thanks, Mike. It is there: MediaWiki#Installation, 2nd block. Or do you mean something else? --AngelHerraez 19:42, 13 October 2010 (UTC)