- Home
- My Page
- Recent changes
- Reports
-
- Watched Pages
- Contributions
- My Preferences
- Userlist
- RSS feeds
- Templates
- Sitemap
- Save as PDF
- Popular pages
- Table of contents
- Wiki Help
Hard Coded Labels Removed from #itemcount and #play.current
Table of contents
Purpose
Since SVN 25661 hard coded labels are removed from:
- #itemcount (the word Objects no longer appears)
- #Play.Current.Year (used in MyMusicPlayingNow.xml, MyMusicFullScreenVisualization.xml and videoOverlay.xml). Also in some skins, musicOverlay.xml (or imported overlays) and plugins like Lyrics
- #Play.current.Track (used in MyMusicPlayingNow.xml) and in some skins, musicOverlay.xml (or imported overlays) and plugins like Lyrics
- #Play.current.Duration (used mainly in videoOverlay.xml, musicOverlay.xml or in some skins imported media overlays)
-
Although no changes are required, skins may wish to add labels, especially for #itemcount and #play.current.track. Special care is required for #itemcount in Music Views which display the total duration. See Forum post Hard Coded Labels
-
In future, we hope to offer more options than #itemtype to allow skin designers and plugin developers greater flexibility and more user friendly display of text with #itemcount.
Description of change
Since SVN commit 25916, a new property #itemtype displays and translates String(507) = "items"
- Thus #itemtype can be used to add translated labels to #itemcount = "xxx items"
- #currentmodule can also be used in many windows with #itemcount to display "xxx Music/Artists" for example, this will also translate, and is much better than calling 'artists' 'objects'
XML/Code Samples
So a combination of #currentmodule and #itemtype can be used in a common window as follows:
<!-- Itemcount + Current Module (Most Windows) -->
<control>
<description>Itemcount CurrentModule</description>
<type>fadelabel</type>
<id>0</id>
<posX>30</posX>
<posY>505</posY>
<width>260</width>
<height>100</height>
<label>#selectedindex/#itemcount #currentmodule</label>
<textalign>left</textalign>
<textcolor>77ffffff</textcolor>
<visible>string.equals(#selectedindex)+string.equals(#itemcount)+[!window.isvisible(603)+!window.isvisible(601)+!window.isvisible(604)+!window.isvisible(607)+!window.isvisible(608)]</visible>
</control>
<control>
<description>Itemcount no Selectedindex</description>
<type>fadelabel</type>
<id>0</id>
<posX>30</posX>
<posY>507</posY>
<width>260</width>
<label>#itemcount #currentmodule</label>
<align>left</align>
<textcolor>77ffffff</textcolor>
<visible>!string.equals(#selectedindex)+string.equals(#itemcount)+string.equals(#currentmodule)+[!window.isvisible(603)+!window.isvisible(601)+!window.isvisible(604)+!window.isvisible(607)+!window.isvisible(608)]</visible>
</control>
<!-- Itemcount (TV Search, RecordedTV, Scheduled TV) -->
<control>
<description>Itemcount Itemtype</description>
<type>textboxscrollup</type>
<id>0</id>
<posX>30</posX>
<posY>505</posY>
<width>260</width>
<height>100</height>
<label>#selectedindex/#itemcount #itemtype</label>
<textalign>left</textalign>
<textcolor>77ffffff</textcolor>
<visible>string.equals(#selectedindex)+string.equals(#itemcount)+[window.isvisible(603)|window.isvisible(601)|window.isvisible(604)|window.isvisible(607)|window.isvisible(608)|!string.equals(#currentmodule]</visible>
</control>
Please note: the above example also makes use of two new MP 1.1.0 properties: string.equals (to ensure the properties only display when they exist or are true) and #selectedindex which adds the index number of the item in the list.

