User talk:Bduke

From Jmol
Jump to navigation Jump to search

Hi, I saw that you did a few tries and found some errors. I have very recently upgraded this wiki to MediaWiki 1.11.

A few answers :

  • Uploading files: I forgot to enable again the uploading of chemical files, that should work now.
  • PDB files: do they work with Jmol applet/application outside the Wiki ?
  • urlContents: not sure it's the only problem, but it probably requires the signed applet to work. And I am not sure that mixing signed/unsigned applets in the same page works.

--NicolasVervelle 19:18, 10 December 2007 (CET)

I'll try uploading later and let you know if it does not work.

The PDB files used to work here and work on a off-wiki site but with an older Jmol. First, I will try uploading these files. Second, I will update Jmol on the other server.

urlContents is not that important. I suspect Wikipedia and Wikiversity will insist on uploads only so they are checkable and controlled like images are. All in all that is probably a sensible attitude for them to take.

Many thanks for your help. Brian. --Bduke 22:13, 10 December 2007 (CET)

The start / stop spinning buttons under the left-side, green background, staggered ethane were acting instead on the top-right, red background, applet. I'm trying to find out why. Aha! both applets had the same name, so the first one was being targeted. I have fixed that now, using different names for all applets. --AngelHerraez 01:22, 30 November 2008 (CET)

The inline pdb examples that did not work are now working after I inserted a vertical bar (or pipe) at the beginning of each line of data (I remembered this issue posted some time ago in the users list, so I've given it a try, and works -- there must have been a change in behaviour along Jmol versions). --AngelHerraez 01:43, 30 November 2008 (CET)

Many thanks. However, I had an edit conflict with you and canceled my edit. Then everything worked. I then made the edit on the first section which should not affect anything and now only the inline content ones work and the others all say permission denied. Very puzzling. --Bduke 01:51, 30 November 2008 (CET)

Permissions? Sounds like a frequent error given by recent Java versions that is often solved by reloading the page. And I was editing again meanwhile. --AngelHerraez 02:01, 30 November 2008 (CET)
All the applets in the page are working for me right now. --AngelHerraez 02:05, 30 November 2008 (CET)
I have tried reloading but it is still only running the inline examples that you fixed. I'll have to leave this for a while now. Thanks for all your help. --Bduke 02:18, 30 November 2008 (CET)

The problem with <wikiPageContents> was the same as with <inlineContents>, but I had to add the pipes at the end of each line; the beginning did not work. So that position should be a safer choice for all cases.

This means that uploaded molecular files cannot be used straight away, but need a manual edit of the file's page to insert the pipes :-( --AngelHerraez 02:01, 30 November 2008 (CET)

That would deter some people from uploading files! I am still trying to think through whether wikipedia should use all posible methods or just a limited set. Ideally uploading files to Commons would be best so that the images could be used on all wikimedia projects, but I suspect there would be all kinds of objections from the people who control Commons. It would need approval for a new set of extensions to "image" file that are allowed on Commons or indeed allowed for image upload on wikipedia. An easier way to slip Jmol in without too many people having to agree would be inline contents of the data, or perhaps subpages, but they may raise security issues. --Bduke 02:18, 30 November 2008 (CET)
The insertion of the pipe characters could perhaps be done automatically by the extension, if that is confirmed to be the solution. Also, the inline MOL demo is failing, and I think it is because apparently every line break is being substituted by two line breaks. The inline CML works, and coincidentally? it is using <![CDATA[ and ]]> tags. Maybe that is doing the trick. I'll try and have a look at the extension code to shed some light. --AngelHerraez 19:22, 30 November 2008 (CET)

As far as I can see, Jmol.js does the task of replacing newlines with the pipe | when doing inline applets. So, it seems that everything comes to the Jmol MediaWiki extension code. In Jmol.body.php, there is this piece:

$this->mValInlineContents = preg_replace("/\n/", "\\n'+\n'", $this->mValInlineContents);

which I don't quite understand, but to me seems like the cause of the inline MOL not working in Inlined MDL Molfile. I copied the rendered code from that page to a local file and this is what I see:

  • the javascript section has \\n\'+\n\' between lines (probably received from the wiki page code parsed by the extension)
  • the generated html inline applet has \n'+|' (which makes no sense to me, as the quote has not been opened)

It may be that there has been an update in Jmol.js that has made the extension dysfunctional.

  • when I replace all instances of \n'+|' with \n|, the applet works in my local copy.

So I think that the extension replace code needs to be fixed. User:SHL already reported in Inlined MDL Molfile that commenting out that line fixed the problem.

OK, so after a revision of the extension (8 Dec.) everything should be working, and the inline data or the wiki-page data do not need manually inserted pipe characters. (I will edit them and remove the pipes just to make things clearer.) --AngelHerraez 11:02, 9 December 2008 (CET)