home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Quality Assurance
Default Skins Feedback
Skin functions on opening a window
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="CyberSimian" data-source="post: 1285870" data-attributes="member: 141969"><p>Here are a couple of examples from my skin:</p><p></p><p>[code]<!-- height of TV and radio guides --></p><p><define property="true" evaluateNow="true"</p><p> >#cw.guide.h:#(</p><p> div(add(mul(cint(#cw.guide.rows),3733),6319),100))</define></p><p></p><p><!-- number of rows in a name list (use skin setting) --></p><p><!-- note: value is stored as "#(n)", so need to remove "#()" --></p><p><define property="true" evaluateNow="true"</p><p> >#cw.nlist.rows:#(string.trim(#skin.list.rows,'()#'))</define>[/code]</p><p></p><p>These examples are ones that return string values, with no side effects. I think that "skin.setfocus()" also returns a string value (the null string), but its primary purpose is the side effect of setting the focus. I don't know whether that would work in a <define>. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite26" alt=":unsure:" title="Unsure :unsure:" loading="lazy" data-shortname=":unsure:" /></p><p></p><p>Here is a more-complex example from "DefaultWideHD":</p><p></p><p>[code]<define property="true" evaluateNow="true"</p><p> >#TV8:#(string.format('{0}{1}',#TV8.name,iif(eq(#TV8.active,' '),'',#PLUGERROR))</p><p> )</define>[/code]</p><p></p><p>When I want to understand how something is used, I first scan my own skin to see if I have already used it and forgotten, and then I scan DWHD to see if DWHD has used it. I use the Windows "findstr.exe" to search the skin files, and direct the output to a file to browse at my leisure. Example: to find occurrences of the <define> tag:</p><p></p><p>[code]findstr.exe "<define" *.xml >findstr.out[/code]</p><p></p><p>-- from CyberSimian in the UK</p></blockquote><p></p>
[QUOTE="CyberSimian, post: 1285870, member: 141969"] Here are a couple of examples from my skin: [code]<!-- height of TV and radio guides --> <define property="true" evaluateNow="true" >#cw.guide.h:#( div(add(mul(cint(#cw.guide.rows),3733),6319),100))</define> <!-- number of rows in a name list (use skin setting) --> <!-- note: value is stored as "#(n)", so need to remove "#()" --> <define property="true" evaluateNow="true" >#cw.nlist.rows:#(string.trim(#skin.list.rows,'()#'))</define>[/code] These examples are ones that return string values, with no side effects. I think that "skin.setfocus()" also returns a string value (the null string), but its primary purpose is the side effect of setting the focus. I don't know whether that would work in a <define>. :unsure: Here is a more-complex example from "DefaultWideHD": [code]<define property="true" evaluateNow="true" >#TV8:#(string.format('{0}{1}',#TV8.name,iif(eq(#TV8.active,' '),'',#PLUGERROR)) )</define>[/code] When I want to understand how something is used, I first scan my own skin to see if I have already used it and forgotten, and then I scan DWHD to see if DWHD has used it. I use the Windows "findstr.exe" to search the skin files, and direct the output to a file to browse at my leisure. Example: to find occurrences of the <define> tag: [code]findstr.exe "<define" *.xml >findstr.out[/code] -- from CyberSimian in the UK [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Quality Assurance
Default Skins Feedback
Skin functions on opening a window
Contact us
RSS
Top
Bottom