Ok, I apologize if this common knowledge, or already been posted, however, I wasn't able to find the answer anywhere via a search.
It seems that there have been numerous posts regarding the icons on the Ultra View2 Status page. I haven't been an Ultra View 2 user for quite some time because I found that every time I added a device to Ultra View Status, I had to manually add code to display the proper icon and text. I like most people run numerous scripts and plug ins that use hs.SetDeviceString to add html to embed text and an icon already. So having to redo this logic for UltraView every time, became rather annoying.
After several hours of research, I did finally find the answer.
If you run a network status plug in or script, as an example, that uses hs.SetDeviceString to add an icon and text to a device, you'll need to modify ultra_view2_status_network.xsl.
Remove the following two lines:
<xsl:apply-templates select="ICON" />
<xsl:apply-templates select="STRING" />
And add:
<xsl:value-of select="STRING" disable-output-escaping="yes"/>
Now modify ultra_view2_xml.inc, in the select case strDeviceType section, add a case statement, say one that looks for a device type called 'Computer'. The only line of code you need to add to this is:
strDeviceString = hs.DeviceString(strDeviceCode)
Now, when you run Ultra View2 Status, it'll automatically pick up the text and the icons already associated with thoses devices. In theory, this should also work for the Weather scripts, DooMotion plug in, etc and you won't have to mess with re-writing a bunch of code to fetch the icons to display on the Ultra View2 Status page.
It seems that there have been numerous posts regarding the icons on the Ultra View2 Status page. I haven't been an Ultra View 2 user for quite some time because I found that every time I added a device to Ultra View Status, I had to manually add code to display the proper icon and text. I like most people run numerous scripts and plug ins that use hs.SetDeviceString to add html to embed text and an icon already. So having to redo this logic for UltraView every time, became rather annoying.
After several hours of research, I did finally find the answer.
If you run a network status plug in or script, as an example, that uses hs.SetDeviceString to add an icon and text to a device, you'll need to modify ultra_view2_status_network.xsl.
Remove the following two lines:
<xsl:apply-templates select="ICON" />
<xsl:apply-templates select="STRING" />
And add:
<xsl:value-of select="STRING" disable-output-escaping="yes"/>
Now modify ultra_view2_xml.inc, in the select case strDeviceType section, add a case statement, say one that looks for a device type called 'Computer'. The only line of code you need to add to this is:
strDeviceString = hs.DeviceString(strDeviceCode)
Now, when you run Ultra View2 Status, it'll automatically pick up the text and the icons already associated with thoses devices. In theory, this should also work for the Weather scripts, DooMotion plug in, etc and you won't have to mess with re-writing a bunch of code to fetch the icons to display on the Ultra View2 Status page.
Comment