Help:Editing: Difference between revisions

From Proteopedia
Jump to navigationJump to search
Eran Hodis (talk | contribs)
Eran Hodis (talk | contribs)
No edit summary
Line 13: Line 13:


==Proteopedia Jmol Applets==
==Proteopedia Jmol Applets==
Displaying a Proteopedia Scene requires an instance of the Jmol applet on the page, in order to display the molecular scene. The wikitext for inserting a Jmol applet must be typed into the page by hand following the format below.  (Or you could copy and paste the applet wikitext from a different page, and then edit the parameters.)  
Displaying a Proteopedia Scene requires an instance of the Jmol applet on the page, in order to display the molecular scene. The wikitext for inserting a Jmol applet must be typed into the page by hand following the format below.  But the simplest way to get the wikitext for an applet is by clicking the "3D" button just above the wikitext area when editing a page. (Or you could copy and paste the applet wikitext from a different page, and then edit the parameters.)  


: <nowiki><applet load='X' size='X' color='X' frame='X' align='X' caption='X' scene='X'/></nowiki>
: <nowiki><applet load='X' size='X' frame='X' align='X' caption='X' scene='X'/></nowiki>


Each X represents a parameter that you enter. For example, this generates the Jmol applet on this page:
Each X represents a parameter that you enter (and many of them are Optional). For example, this generates the Jmol applet on this page:


: <nowiki><applet load='1ea5' size='300' color='white' frame='true' align='right' caption='testcaption' /></nowiki>
: <nowiki><applet load='1ea5' size='300' color='white' frame='true' align='right' caption='testcaption' /></nowiki>
   
   
<applet load='1ea5' size='300' color='white' frame='true' align='right' caption='testcaption' />
<applet load='1ea5' size='300' frame='true' align='right' caption='testcaption' />


The order of the parameters does not matter. Explanations of each parameter follow:
The order of the parameters does not matter. Explanations of each parameter follow:
Line 28: Line 28:
Specify a [[PDB code]] (ex: load='2ace') to have the applet load the protein with the matching PDB code from the [[PDB]] database.  Specify a file name (ex: load='2ace.pdb') to have the applet load the file from Proteopedia's uploaded files.  If your desired file is not in the PDB database and not yet uploaded to Proteopedia, you may upload it here [[Special:Upload]].
Specify a [[PDB code]] (ex: load='2ace') to have the applet load the protein with the matching PDB code from the [[PDB]] database.  Specify a file name (ex: load='2ace.pdb') to have the applet load the file from Proteopedia's uploaded files.  If your desired file is not in the PDB database and not yet uploaded to Proteopedia, you may upload it here [[Special:Upload]].
====size='X'====
====size='X'====
Optional (default value is 400 pixels).
This is the size in pixels of the applet's height and width.  It will be square.
This is the size in pixels of the applet's height and width.  It will be square.
====color='X'====
Background color.
====frame='X'====
====frame='X'====
Optional (default value is 'true').
If this value is not 'false' then the Jmol applet will appear on the page surrounded by a frame similar to inserting in image in wikitext and using its "frame" parameter like so: <nowiki>[[Image:someImageName.jpg|frame|someCaption]]</nowiki>.  If frame is set to false than no caption can be displayed.
If this value is not 'false' then the Jmol applet will appear on the page surrounded by a frame similar to inserting in image in wikitext and using its "frame" parameter like so: <nowiki>[[Image:someImageName.jpg|frame|someCaption]]</nowiki>.  If frame is set to false than no caption can be displayed.
====align='X'====
====align='X'====
Optional and only relevant if the frame parameter is set to true.
Determines where on the page the Jmol applet should appear.  align='right' would have it right-aligned.  Options include 'left' and 'center'.
Determines where on the page the Jmol applet should appear.  align='right' would have it right-aligned.  Options include 'left' and 'center'.
====caption='X'====
====caption='X'====
Optional and only relevant if the frame parameter is set to true.
This is what will appear under the Jmol applet if frame is not set to 'false'.
This is what will appear under the Jmol applet if frame is not set to 'false'.
====scene='X'====
====scene='X'====
Optional.
The scene specified here uses the same format used to specify the "name" parameter when typing the wikitext to insert a scene:  Pagename/Scriptname/Versionnumber (ex: scene='Hemoglobin/Cavity/14').
The scene specified here uses the same format used to specify the "name" parameter when typing the wikitext to insert a scene:  Pagename/Scriptname/Versionnumber (ex: scene='Hemoglobin/Cavity/14').


====name='X'====
Optional.
This sets the name of the applet.  This is useful if you wish to have a green scene link act on a specific applet that is not the applet directly above the green scene link.  See section entitled "More than one Jmol applet on a page" below for more information.
==Proteopedia Scenes==
==Proteopedia Scenes==
To insert a scene, type <nowiki><scene name='PageName/SceneName/Version#'>Text Displayed On Page</scene></nowiki>
To insert a scene, type <nowiki><scene name='PageName/SceneName/Version#'>Text Displayed On Page</scene></nowiki>
Line 50: Line 62:
When there is more than one Jmol applet on a page, scenes automatically go to the applet above the <nowiki><scene ...>...</scene></nowiki> tag in the wikitext.   
When there is more than one Jmol applet on a page, scenes automatically go to the applet above the <nowiki><scene ...>...</scene></nowiki> tag in the wikitext.   


If you wish to have a green scene link act on a specific applet that is not the applet directly above the green scene link, then you must set the "target" parameter inside the wikitext for a scene link like so:  <nowiki><scene name='PageName/SceneName/Version#' target='2'>Text Displayed On Page</scene></nowiki> where " target='2' " tells this scene link to act on the 2nd applet on the page.
If you wish to have a green scene link act on a specific applet that is not the applet directly above the green scene link, then you must set the "target" parameter inside the wikitext for a scene link like so:  <nowiki><scene name='PageName/SceneName/Version#' target='AppletName'>Text Displayed On Page</scene></nowiki> where " target='AppletName' " tells this scene link to act on the applet with the name 'AppletName' on the page (set by using the applet's "name" parameter in the applet's wikitext).  If the applet you wish to target has not been given a name using the name parameter, you may instead set target to the applet's number.  For instance setting target='2' would have the green scene link act on the 3rd applet on the page, because by default, if applets are not given names, they take the sequential names 0, 1, 2, ... in the order in which they appear on a page.


==Jmol extension==
==Jmol extension==