/Customscript ODB tree: Difference between revisions
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
= Purpose = | = Purpose = | ||
The optional <span style="color:purple; font-style:italic">/Customscript</span> ODB tree provides the user with a way to execute a script when a button on a [[mhttpd]] [[Custom Page]] is clicked, including the capability of passing parameters from the ODB to the user-written script. This tree is similar to the [[/Script ODB tree]]. | The optional <span style="color:purple; font-style:italic">/Customscript</span> ODB tree provides the user with a way to execute a script when a button on a [[mhttpd]] [[Custom Page]] is clicked, including the capability of passing parameters from the ODB to the user-written script. This tree is similar to the [[/Script ODB tree]], except instead of producing [[/Script ODB tree#Script-button|script-buttons]] on the [[Status Page]], it produces [[#Customscript-button|customscript-buttons]] on a user-written [[Custom Page]]. | ||
= Creating the /Customscript tree = | = Creating the /Customscript tree = | ||
The <span style="color:purple; font-style:italic">/Customscript</span> ODB tree is created by the user. This tree is optional, and | The <span style="color:purple; font-style:italic">/Customscript</span> ODB tree is [[ODB#Creating ODB keys|created]] by the user. This tree is optional, and the names of any keys in this tree are chosen by the user. | ||
= <span style="color:purple; font-style:italic"><customscript-name></span> key or subtree = | |||
<div id="Customscript-button"></div> | <div id="Customscript-button"></div> | ||
Any key created in the <span style="color:purple; font-style:italic">/Customscript</span> tree will appear as a '''''customscript-button''''' <span style="color: #444444; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;"><customscript-name></span> | |||
on the default [[mhttpd]] [[Status Page]]. | |||
Otherwise, the syntax of the <span style="color:purple; font-style:italic">/Customscript</span> tree is exactly the same as that of the <span style="color:purple; font-style:italic">/Script</span> tree. See [[/Script ODB tree#<script-name> key or subtree|Script tree]] for details. | |||
[[Category:ODB Tree]] | [[Category:ODB Tree]] |
Revision as of 15:06, 24 September 2014
Links
Purpose
The optional /Customscript ODB tree provides the user with a way to execute a script when a button on a mhttpd Custom Page is clicked, including the capability of passing parameters from the ODB to the user-written script. This tree is similar to the /Script ODB tree, except instead of producing script-buttons on the Status Page, it produces customscript-buttons on a user-written Custom Page.
Creating the /Customscript tree
The /Customscript ODB tree is created by the user. This tree is optional, and the names of any keys in this tree are chosen by the user.
<customscript-name> key or subtree
Any key created in the /Customscript tree will appear as a customscript-button <customscript-name> on the default mhttpd Status Page.
Otherwise, the syntax of the /Customscript tree is exactly the same as that of the /Script tree. See Script tree for details.