Inlined MDL Molfile
Inlined MDL Molfile
This page does not currently display correctly. the problem seems to be the first three lines of the Molfile. If lines 2 and 3 are left blank, the current system strips these lines out entirely, invalidating the Molfile. A title in line 2 preserves it, but we are currently finding out what line 3 should be!
The solution is to preserve blank lines in inlined data files.--Rzepa 08:58, 8 June 2006 (CEST)
- I get it working when commenting out the following line in JmolExtension.php:
$this->mValInlineContents = preg_replace("/\n/", "\\n'+\n'", $this->mValInlineContents);
--SHL 06:13, 21 February 2007 (CET)
I think the problem is not in the contents of the first 3 lines, but in the MediaKiwi extension parsing incorrectly the newline characters (the code mentioned above by SHL and belonging to Jmol.body.php), which inserts literal single quotes in the call to jmolAppletInline() that remain there after being passed through Jmol.js. Since this latter inserts a vertical bar (pipe, |) in every new line, I think that the quotes and the excess \n are not needed any longer. The same ought to happen with an Inlined PDB File. Inlined CML File works I guess because it does not depend on newlines, or maybe because of the CDATA tags. I cannot test it since I don't have a WikiMedia implementation of my own. --AngelHerraez 21:32, 30 November 2008 (CET)