Code Panel
It is possible to enter codes (i.e. numbers) with the integrated code panel. These codes can either be processed at the server or plugin level or embedded directly into action strings. This feature is available since version 0.1.0, but was significantly expanded in version 0.1.167.
Usage[edit]
There are various actions for opening the code panel. Depending on the action, the code is then processed further.
| Syntax | Example | Since Version | Description |
|---|---|---|---|
enter
|
enter
|
0.1.167 |
The entered code is embedded in the indicated action by replacing the keyword |
enter:{CODE}
|
enter:1234
|
0.1.0 |
If the entered code is correct, the indicated action is executed. The data must contain an |
|
|
|
0.1.30 |
Executes an action on server side, the player, or the interaction plugin with an entered code and returns an action to be executed (e.g. to show a success/error message). Please see Actions#Server Actions for more information. |
interaction:commit:code
|
interaction:commit:code
|
0.1.82 |
Commits a code to the interaction plugin. |
player:commit:code
|
player:commit:code
|
0.1.40 |
Commits a code to the video/audio plugin. |
Syntax[edit]
| Property | Type | Default Value | Mandatory | Since Version | Description |
|---|---|---|---|---|---|
headline |
string |
"Enter Code" |
No | 0.1.0 |
The headline of the code panel. This property supports Inline Expressions. |
extension |
string |
null |
No | 0.1.0 |
The extension of the code panel. This property can be used to display a small label in the upper right corner. This property supports Inline Expressions and Live Inline Expressions. |
description |
string |
null |
No | 0.1.167 |
The description of the code panel. This property supports Inline Expressions. Note: This property is only used if the |
value |
string |
null |
No | 0.1.0 |
The initial value of the code panel. The value must consist only of numbers and must not exceed the maximum length, otherwise it is ignored. |
placeholder |
string |
"Code" |
No | 0.1.0 |
The placeholder value of the code panel. This value is displayed if no code is entered. This property supports Inline Expressions. Note: This property is ignored if the |
secret |
boolean |
false |
No | 0.1.0 |
Indicates if the code is secret and should not be displayed. |
digits |
number |
-1 |
No | 0.1.167 |
Specifies a specific number of digits that should be entered. The value must be between |
clear |
boolean |
false|true |
No | 0.1.167 |
Indicates if the code should be cleared when it has been processed.
By default, the code is retained if the |
delay |
number |
-1 |
No | 0.1.167 |
Specifies a delay in milliseconds after which the entered code should be automatically processed. Note: This property is ignored if the |
action |
string |
null |
Only if enter or enter:{CODE} action is used |
0.1.0 |
The code action that is executed if the Please see Actions for possible values. |
data |
object |
null |
No | 0.1.0 |
The additional data of the code action that is used if the action is executed. Please see Actions for possible values. |
Example[edit]
Screenshot[edit]
Code[edit]
{
"type": "list",
"headline": "Code Panel",
"template": {
"enumerate": false,
"icon": "dialpad",
"type": "button",
"layout": "0,0,3,3"
},
"items": [{
"label": "Default",
"action": "execute:code:http://msx.benzac.de/services/echo.php"
}, {
"label": "Secret",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter Secret Code",
"placeholder": "Secret Code",
"secret": true,
"clear": true
}
}, {
"label": "Prefilled + Extension",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"value": "1234",
"extension": "Prefilled"
}
}, {
"label": "1 Digit",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter 1 Digit",
"digits": 1
}
}, {
"label": "3 Digits + Decription",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter 3 Digits",
"description": "Execution takes place automatically as soon as all digits have been entered.",
"digits": 3
}
}, {
"label": "6 Secret Digits",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter 6 Secret Digits",
"digits": 6,
"secret": true
}
}, {
"badge": "Enter Action",
"label": "Switch Channel",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "enter",
"data": {
"headline": "Switch Channel",
"placeholder": "Channel Number",
"extension": "Delay: 3 sec",
"action": "player:goto:number:{CODE}",
"delay": 3000
}
}, {
"badge": "Enter Action",
"label": "Switch Channel",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "enter",
"data": {
"headline": "Switch Channel",
"description": "Enter the channel number to switch to this channel. Please load a playlist first so that this action can be executed.",
"action": "player:goto:number:{CODE}",
"digits": 4
}
}]
}