On Tue, Dec 09, 2008 at 01:21:01PM +0100, Angel Herraez wrote:
> I'd like to keep this discussion going, so here is a little bit more, 
> picking up on the possibilities to have Jmol supported in Wikipedia 
> and other Wikis:

[Nico's message snipped]
 
> And on 1 Dec 2008 9:49, Brian Salter-Duke wrote:
> > I am just thinking aloud here. I think there could be a solution to add
> > a chaneg to medciawiki itself to have some specific Jmol tags, something
> > like:
> > 
> > <jmolimage> ... </jmolimage>
> 
> We already have the <jmol> tag added by the extension. Is there any 
> difference intended?
> 
> > avoiding all calls to Jmol itself. 
> 
> I don't quite understand. There is no call to Jmol until the 
> extension inserts the Jmol code. And by using <jmolAppletButton>
> or <jmolAppletLink>  one avoids Jmol to be loaded until the visitor 
> requests it.

This is an example of an image inserted on wikipedia:-

[[Image:Meissner effect zoom.jpg|thumb|200px|right|A [[magnet]]
levitating above a [[high-temperature superconductor]] demonstrates the
[[Meissner effect]].]]

Everything is together. I presume the bits are handled by mediawiki.

In contrast, a simple Jmol call is full of html/javascript like stuff.

<jmol><jmolApplet><script>set spin X 10; spin on</script>
<name>ethane_s1</name><color>palegreen</color><size>250</size>
<uploadedFileContents>ethane_s.pdb</uploadedFileContents>
</jmolApplet>
<jmolButton><script>spin on</script><name>ethane_s1</name><text>Start
spinning</text></jmolButton>
<jmolButton><script>spin off</script><name>ethane_s1</name><text>Stop
spinning</text></jmolButton>
</jmol>

What if it was like this:-

[[Jmolimage:ethane_s.pdb|color=palegreen|script=spin X 10|script=spin
on|size=250|button=(spin on,Start spinning)|button=(spin off,Stop
spining)]]

Jmolimage:ethane_s.pdb starts it all off and includes:-
<uploadedFileContents>ethane_s.pdb</uploadedFileContents>

color=palegreen includes <color>palegreen</color>

size=250 includes <color>palegreen</color>

script=spin X 10| script=spin on would generate:-
<script>set spin X 10; spin on</script>

button=(spin on,Start spinning) is interpreted as:-
<jmolButton><script>spin on</script><name>ethane_s1</name><text>Start
spinning</text></jmolButton>

button=(spin off,Stop spining) is interpreted as:-
<jmolButton><script>spin off</script><name>ethane_s1</name><text>Stop
spinning</text></jmolButton>

I suspect this would be easier for users and could likely be made more
secure. However, I have no idea how this would be implemented. The
mediawiki language seems to aim to remove as much direct html use as
possible.
 
> > The parameters for jmolimage would
> > give everything that was needed, method, file names, etc. Mediawiki
> > itself would then be doing any chaecks that were needed. It would also
> > be easier for wikipedia editors and I suspect the wikipedia techs would
> > prefer this solution. Is this worth following up? I do nopt>set spin
> > X 10; spin on</script>t know
> > mediawiki and could be just talking nonsense.
> 
> I think it is the JmolMediaWiki Extension that must do all this 
> anyway, not the generic MediaWiki software. And it is doing so 
> already, by using the different sub-tags of the <jmol> tag. Do you 
> envisage any differences, Brian? Please ellaborate on that.
> 
> The configuration in the server (LocalSettings.php) may block the use 
> of external URLs for models, or of uploaded files,  may block or 
> impose the use of signed applet. The rest of the task in inside the 
> Extension.
> 
> 
> > Another advantage of this approach is that wikipedia could limit the
> > mehtods available and perhaps limit them to file upload only. 
> 
> Already possible (see above).

I understand this. When the extension was first written, it was
understandable that a number of different approaches were tried. Maybe
it is time to limit these choices and make it simpler. Particularly on
wikipedia, which has a large number of editors who are likely to be less
familiar with Jmol than users on say the Jmol wiki, I think we have to
decide. The choice is I think really between an uploaded file (on either
wikipedia or Commons) and inline data. The latter will be seen as
clumsy, but it makes it all self contained and does not mean that the
whole upload business has to be altered - see below. The former would be
better, but changes would be needed. 

> > The
> > mediawiki code would need changing anyway to allow use of Jmol files on
> > Commons as well as wikipedia. 
> 
> This needs further work, but is related to the above config. 
> settings.

Whether Commons or the home wiki (say wikipedia or wikiversity) many
changes would be needed. First, upload is restricted to files with
certain extensions. We would have to decide which file types we wanted
and allow those extensions to the upload. Second, we need to think about
copyright issues on uploaded files and how these are going to be added.
If you click on an image, it brings up the image page that displays both
the image and all the upload, copyright, etc. details. How would this
work for say a pdb file. So, third, we have a different image page.
Adding an new prefix "Jmolimage" may facilitate this. Finally, we have
to disguise the "Look on Commons first for the Jmol file; then look on
the local wiki; then fail".

I'm still thinking aloud here and the above is a bit different to what
Angel is responding to.

Brian.

-- 
A child of five could understand this!  Fetch me a child of five. 
                                               -- Marx (guess which one)
Brian Salter-Duke (Brian Duke) Email: b_duke(AT)bigpond(DOT)net(DOT)au


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to