Seitenhierarchie

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.38
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download




Skin Functions is new as of version 1.3.0 beta and later.

Overview

Skin functions extend the use of Skin Expressions and Skin Settings by providing access to MediaPortal conditions from skin expressions in skin xml.

Skin functions, like skin settings, must be defined and referred to using a leading hash ('#') character and enclosed by parenthesis; e.g. #(ThisIsASkinFunction()), ThisIsNotASkinFunction().  An attempt to use a skin function without a leading hash character and in parenthesis will result in intepretation of the skin function as a string literal.

Skin Functions

The names of functions are case-sensitive.

plugin.isenabled(pluginName)

[Since 1.3]

Returns true if the specified plugin name is enabled.  The pluginName must be quoted (e.g., 'my plugin'). Useful in skin expressions.

Examples:

The skin xml file is included if the Moving Pictures plugin is enabled.

<include condition="#(plugin.isenabled('Moving Pictures'))">mySkinFile.xml</include>

skin.setfocus(windowId,controlId)

[Since 1.3]

Sets the focus to the specified controlId in the specified window (windowId).  Useful in <onclick> control attributes (e.g., button onclick).

Examples:

Use in a checkbutton to have the specified control gain focus when the checkbutton is clicked.

<onclick>#(skin.setfocus(600,20))</onclick>

 

Additional Information and References

  • Mantis Issue: 4010, 4022

   

 

This page has no comments.