Hi,
I'm trying to create a new extension that enables the embedding of MarvinSketch Java applets (I have a marvin.js file, along with several .jar files that came with one of their free downloads. http://dl.chemaxon.com/marvin/15.2.9.0/marvin-all-15.2.9.0.zip is what I downloaded and extracted) into articles. This Marvin download came with several examples of how the applets could be embedded into HTML files and the proper syntax in HTML and I was wondering if there was some way of using this knowledge to create PHP files for a Marvin extension (Marvin.body.php, Marvin.php. I am neglecting Marvin.i18n.php as my Wiki is only in English and it just makes it simpler if I can leave this bit out). I have made pretty lousy efforts, but I really don't know what I'm doing. I have read https://www.mediawiki.org/wiki/Manual:Developing_extensions if you're wondering, but it didn't really help me as I know little about PHP. Like I know some really basic things like that:
- variables start with $ - each line is ends with ; - the file needs to start with <?php and end with ?> - What appears between /* */ and after // is not rendered. - Blocks are pieces of code that are executed together. - Functions take variables and give an output and are ended with return. - " " evaluates variables - echo " " hands whatever is between the quotation marks to be rendered as HTML.
Despite this I am determined to do at least some of this coding myself, but I could do with some help, if possible. See I am basing these PHP files on those of the JSmol extension (namely, the one created by Jaime Prilusky @ http://proteopedia.org/wiki/support/JSmolExtension/JSmolExtension.zip) and without annotated notes in the PHP file it is difficult to know what I should copy in my Marvin PHPs and which I should not.
So what I would like to know is:
* If my idea of basing it on the JSmol extension's PHP files is the way to go. If not, what better way(s) exist. Please give me detailed examples of these better ways as otherwise I'll be stuck with my PHP ignorance. * If basing it on JSmol is a decent way to do this then the purpose of each function listed in Jmol.php and Jmol.body.php would be helpful.
Thanks for your time, Brenton
mediawiki-l@lists.wikimedia.org