Last modified: 2014-03-28 16:11:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18491, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16491 - Support for Chemical Markup Language
Support for Chemical Markup Language
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 17598 multimedia 54213
  Show dependency treegraph
 
Reported: 2008-11-29 01:34 UTC by Eugene Zelenko
Modified: 2014-03-28 16:11 UTC (History)
14 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Eugene Zelenko 2008-11-29 01:34:40 UTC
Please allow uploading of files in Chemical Markup Language format (http://cml.sourceforge.net).

There is also Java-based free software Jmol viewer (http://jmol.sourceforge.net) for CML and extension for MediaWiki is already implemented (http://wiki.jmol.org/index.php/MediaWiki). Extension was implemented for 1.12 and some security concerns exists.
Comment 1 Ilmari Karonen 2008-11-29 10:21:26 UTC
At a quick glance, it looks like the extensions may be exposing a bit too much of the nuts and bolts.  IMHO, the ideal syntax for Wikimedia use would be similar to the <math> or <timeline> tags: just "<cml>CML MARKUP GOES HERE</cml>".  There's no need to expose details like whether to use a signed or unsigned applet: such things are for the server admins to configure.

A CML/MDL media handler might be more convenient than a parser tag extension, anyway.  Then you'd just upload the file and use it as if it were an image.  From what I've seen, CML markup doesn't really look like something most people would want to edit by hand, at least no more so than SVG is.
Comment 2 Ilmari Karonen 2008-11-29 12:51:18 UTC
Anyway, it's definitely not ready for prime time, security-wise: http://wiki.jmol.org/index.php/User:Ilmari_Karonen/JS_injection_demo
Comment 3 Platonides 2008-11-29 13:19:13 UTC
Viewing the docs, javascript embedding is feature.
I think it should be rewritten as a media handler.
Comment 4 Brion Vibber 2008-11-30 00:25:27 UTC
I'd tend to agree on the media handler thing. The extension syntax seems much more verbose and complicated than it needs to be, and seems to be bloated up with random features like extra UI scripting.

That said I'd generally recommend against too many application-specific formats like this which will make it more difficult for third-party users of Wikipedia material to support stuff.

Please also consider issues with printing and non-Java fallback displays.
Comment 5 Ilmari Karonen 2008-11-30 02:28:20 UTC
The docs indicate it should be possible to run Jmol on the server side for static thumbnail generation.  Alternatively, OpenRasMol might also be usable as a server side rasterizer.

In general, I think this should be treated a lot like the Cortado media player: users with Java get a nice little inline viewer, while the rest get a thumbnail and the ability to view the files using a browser plugin (like Chime) or download them for local viewing.

All that said, it does occur to me that there's one important difference between video clips and chemical structure data.  Video files are "WYSIWYG"; they really only have one "normal" rendering, which the file format unambiguously specifies.  Chemical structure data formats (like CML, MDL, PDB, etc.), on the other hand, generally just specify an abstract set of spatial data that can be rendered in a number of different ways.  For RasMol-style renderers (which includes Jmol), this extra presentational information is effectively supplied via a scripting language that controls the viewer.

One possibility, if we want to go the media handler way, might be to add an extra "script=" parameter to the image link syntax, supporting a limited subset of the RasMol scripting language.  Of course, we'd presumably have to parse the code and validate it, especially if we were to use it for server side rasterization.  Even so, I'd prefer to use something based on RasMol script syntax rather than inventing our own, if only because people are likely to be familiar with it, and because there are probably tools out there that generate it.  It's also pretty easy to read and edit,at least as long as you don't get too clever with it (which is about what one could say of wiki markup, too).

That said, both thumbnailing and scripting are really second-step features.  The first step would be to get the media handler working at all.
Comment 6 Eugene Zelenko 2008-11-30 16:27:39 UTC
May be CML support will complicate life of MediaWiki developers, but from other side it'll definitely simplify life of those who maintain chemistry related topics on Commons. Different representations of same molecule and views from different angles in different files could be avoided (see http://commons.wikimedia.org/wiki/Category:Ethanol or http://commons.wikimedia.org/wiki/Category:Benzene as example).

Of course, chemistry is relatively small area in compare with Harry Potter, Pokemon, etc. :-) but definitely important one to justify support for special file format.
Comment 7 Gerard Meijssen 2009-02-13 22:11:44 UTC
(In reply to comment #2)
> Anyway, it's definitely not ready for prime time, security-wise:
> http://wiki.jmol.org/index.php/User:Ilmari_Karonen/JS_injection_demo
> 

This problem has been fixed. Thanks, GerardM
Comment 8 NicoV 2010-11-28 00:28:23 UTC
I have started working again on the Jmol extension.

I agree that the media handler would be really nice, and a lot easier to use than the existing jmol tag.
Creating a media handler requires quite some work and to understand how MediaWiki code is working internally for several points. I decided to start with an easier solution, and to work on the media handler later.

I have worked on a tag much easier to use than the existing jmol tag. For example, you can now use <jmolFile>Chair.cml</jmolFile> to have access to a popup window containing a Jmol applet displaying the molecular file uploaded as File:Chair.cml.
Working example can be seen at http://wiki.jmol.org/index.php/MediaWiki/Basic_Example

What do you think of this ?

I still want to add a few thing to this new tag : ability to use a preview image instead of a link (either generated on the server if I manage to do this, or using a static image), maybe allow a Jmol script to setup the display options, ...
Comment 9 Quim Gil 2013-10-30 20:27:37 UTC
Should we think of this feature as a VisualEditor plugin?
Comment 10 Eugene Zelenko 2013-10-30 20:43:17 UTC
If this will help to finally add visualization, you could do this :-)

But really this is data visualization, not editing. May be will be better to consider CML support as part of Media Viewer development?
Comment 11 Quim Gil 2013-10-30 22:19:02 UTC
CCing Fabrice to weigh in ref Media Viewer.
Comment 12 Quim Gil 2013-11-27 16:52:24 UTC
The Facebook Open Academy Program [1] is interested in this project, but we would need a technical mentor.

[1] http://lists.wikimedia.org/pipermail/wikitech-l/2013-November/073226.html
Comment 13 Rainer Rillke @commons.wikimedia 2013-11-27 17:26:12 UTC
(In reply to comment #12)
I could help with reviewing JavaScript (if you permit me) and also have some understanding of the requirements (Chemical markup, Wikipedia, Commons) but I am lacking PHP-skills as well general practice in MW-development. Let me know if I can help!
Comment 14 Quim Gil 2013-11-27 18:07:22 UTC
Thank you for the offer, Rainer.

We still need to confirm the best approach to provide this feature. Currently this report is still sitting in MediaWiki/Unknown. CCing Multimedia devs to get more feedback.
Comment 15 vladjohn2013 2013-12-01 15:45:19 UTC
Hi, this project is still listed at  https://www.mediawiki.org/wiki/Mentorship_programs/Possible_projects#Accessibility_for_the_colour-blind 

Should this project be still listed in that page? If not, please remove it. If it still makes sense, then it could be moved to the "Featured projects" section if it has community support and mentors.
Comment 16 Rainer Rillke @commons.wikimedia 2014-03-28 15:37:29 UTC
[[:mw:User:Rillke/Chemical Markup support for Wikimedia Commons]]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links