Custom submenus / Hubs?
#1
Hey,

Is there anyway to get a custom submenu or a custom hub? Been playing around with the skin and cant seem to find it.

C
Reply
#2
anyone? :/
Reply
#3
Hi charliebrown,

this is the way how I create my custom hubs. Just ask if something is unclear.

Adding a custom hub to Eminence:

1. Navigate to skin.eminence/1080i

2. Create a new file Custom_Hub_Custom1.xml containing:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Foundation -->
<window type="window" id="3205">
    <defaultcontrol always="true">9500</defaultcontrol>
    <allowoverlay>false</allowoverlay>
    <onload condition="IsEmpty(Window(home).Property(librarynode))">SetProperty(librarynode,videodb://movies/titles/,home)</onload>
    <onload>SetProperty(previoushub,3205,home)</onload>
    <onunload>ClearProperty(librarynode,home)</onunload>
    <controls>
        <include>GlobalBackground</include>
        <include>GlobalTopBar</include>
        <include>DefRightSideArrow</include>
  
        <control type="group">
            <posx>horzpad</posx>
            <posy>topoffset</posy>
            <include>DialogVisibility</include>
            <include>Animation.SlideOpen.Right</include>
            <animation effect="slide" end="horznegpad" start="0" time="200" condition="ControlGroup(9000).HasFocus() | Window.IsActive(DialogContextMenu.xml)">Conditional</animation>
            
            <control type="label">
                <posx>984</posx>
                <posy>145</posy>
                <width>690</width>
                <font>Font-WidgetCategory</font>
                <label>15100</label>
                <textcolor>SideLabel</textcolor>
            </control>
            
            <control type="list" id="9500">
                <posx>984</posx>
                <posy>listy</posy>
                <width>widgethubrightw</width>
                <height>700</height>
                <include>HubMoveRight</include>
                <onleft>9501</onleft>                
                <onup>9500</onup>
                <ondown>9500</ondown>
                <orientation>vertical</orientation>
                <include>HubCategoriesLayout</include>
                <content>
                    <include>QuickNavCustom1Hub</include>
                </content>
            </control>
            <control type="label">
                <posx>listx</posx>
                <posy>145</posy>
                <width>globalh</width>
                <font>Font-WidgetCategory</font>
                <label>Custom Widget Label</label> <!-- TODO: SET YOUR LABEL -->
                <textcolor>SideLabel</textcolor>
            </control>
            <control type="group">
                <posx>listx</posx>
                <posy>listy</posy>
                <control type="group">
                    <visible>!Control.HasFocus(9501)</visible>
                    <control type="image">
                        <width>955</width>
                        <height>globalh</height>
                        <texture colordiffuse="PosterBorder" border="5">common/border-inner.png</texture>
                    </control>
                    <control type="label">
                        <posx>20</posx>
                        <posy>555</posy>
                        <width>825</width>
                        <align>left</align>
                        <label>$INFO[Container(9501).ListItem.Label]$INFO[Container(9501).ListItem.Label2, (,)]</label>
                    </control>
                    <control type="label">
                        <posx>935</posx>
                        <posy>555</posy>
                        <width>915</width>
                        <align>right</align>
                        <font>Font-ListInfo-Small</font>
                        <label>$INFO[Container(9501).CurrentPage] $LOCALIZE[20163] $INFO[Container(9501).NumPages]</label>
                    </control>
                    <control type="textbox">
                        <posx>20</posx>
                        <posy>606</posy>
                        <width>915</width>
                        <height>70</height>
                        <align>left</align>
                        <font>Font-ListInfo-Small</font>
                        <label>$VAR[WidgetPlot]</label>
                    </control>
                </control>
                <control type="group">
                    <visible>Control.HasFocus(9501)</visible>
                    <control type="image">
                        <width>955</width>
                        <height>globalh</height>
                        <texture colordiffuse="PosterHighlight" border="5">common/white.png</texture>
                    </control>
                    <control type="label">
                        <posx>20</posx>
                        <posy>555</posy>
                        <width>825</width>
                        <align>left</align>
                        <textcolor>Selected</textcolor>
                        <scroll>true</scroll>
                        <label>$INFO[Container(9501).ListItem.Label]$INFO[Container(9501).ListItem.Label2, (,)]</label>
                    </control>
                    <control type="label">
                        <posx>935</posx>
                        <posy>555</posy>
                        <width>915</width>
                        <align>right</align>
                        <font>Font-ListInfo-Small</font>
                        <textcolor>Selected</textcolor>
                        <label>$INFO[Container(9501).CurrentPage] $LOCALIZE[20163] $INFO[Container(9501).NumPages]</label>
                    </control>
                    <control type="textbox">
                        <posx>20</posx>
                        <posy>606</posy>
                        <width>915</width>
                        <height>70</height>
                        <align>left</align>
                        <font>Font-ListInfo-Small</font>
                        <textcolor>Selected</textcolor>
                        <label>$VAR[WidgetPlot]</label>
                    </control>
                </control>
                <control type="wraplist" id="9501">
                    <posx>globalpad</posx>
                    <posy>globalpad</posy>
                    <onright>9500</onright>
                    <width>935</width>
                    <height>538</height>
                    <orientation>vertical</orientation>
                    <preloaditems>1</preloaditems>
                    <autoscroll time="7000">!Control.HasFocus(9501)</autoscroll>
                    <scrolltime tween="cubic">500</scrolltime>
                    <itemlayout width="935" height="538">
                        <control type="image">
                            <width>935</width>
                            <height>538</height>
                            <texture>$VAR[WidgetFanart]</texture>
                            <aspectratio>scale</aspectratio>
                        </control>
                    </itemlayout>
                    <focusedlayout width="935" height="538">
                        <control type="image">
                            <width>935</width>
                            <height>538</height>
                            <texture>$VAR[WidgetFanart]</texture>
                            <aspectratio>scale</aspectratio>
                        </control>
                    </focusedlayout>
                    <content target="video">special://skin/path/to/your/playlist.xsp</content> <!-- TODO: SET YOUR WIDGET CONTENT -->
                </control>
      
            </control>
        </control>
        
    </controls>
    </window>

3. Modify all lines that are marked with TODO.

4. Edit file Includes_Hub.xml and paste the following right after <includes>
Code:
<include name="QuickNavCustom1Hub">
        <item id="1">
            <label>Label 1</label> <!-- TODO: SET YOUR LABEL -->    
            <onclick>ActivateWindow(Videos,special://skin/path/to/your/playlist.xsp,return)</onclick> <!-- TODO: SET YOUR PATH / ACTION -->    
            <icon>special://skin/path/to/your/icon.png</icon> <!-- TODO: SET YOUR ICON -->    
            <property name="Color">1</property>
        </item>
        <item id="2">
            <label>Label 2</label> <!-- TODO: SET YOUR LABEL -->    
            <onclick>ActivateWindow(Videos,special://skin/path/to/your/playlist.xsp,return)</onclick> <!-- TODO: SET YOUR PATH / ACTION -->    
            <icon>special://skin/path/to/your/icon.png</icon> <!-- TODO: SET YOUR ICON -->  
            <property name="Color">1</property>
        </item>
        <item id="3">
            <label>Label 3</label> <!-- TODO: SET YOUR LABEL -->    
            <onclick>ActivateWindow(Videos,special://skin/path/to/your/playlist.xsp,return)</onclick> <!-- TODO: SET YOUR PATH / ACTION -->    
            <icon>special://skin/path/to/your/icon.png</icon> <!-- TODO: SET YOUR ICON -->  
            <property name="Color">1</property>
        </item>
        <item id="4">
            <label>Label 4</label> <!-- TODO: SET YOUR LABEL -->    
            <onclick>ActivateWindow(Videos,special://skin/path/to/your/playlist.xsp,return)</onclick> <!-- TODO: SET YOUR PATH / ACTION -->    
            <icon>special://skin/path/to/your/icon.png</icon> <!-- TODO: SET YOUR ICON -->  
            <property name="Color">1</property>
        </item>
        <item id="5">
            <label>Label 5</label> <!-- TODO: SET YOUR LABEL -->    
            <onclick>ActivateWindow(Videos,special://skin/path/to/your/playlist.xsp,return)</onclick> <!-- TODO: SET YOUR PATH / ACTION -->    
            <icon>special://skin/path/to/your/icon.png</icon> <!-- TODO: SET YOUR ICON -->  
            <property name="Color">1</property>
        </item>
        <item id="6">
            <label>Label 6</label> <!-- TODO: SET YOUR LABEL -->    
            <onclick>ActivateWindow(Videos,special://skin/path/to/your/playlist.xsp,return)</onclick> <!-- TODO: SET YOUR PATH / ACTION -->    
            <icon>special://skin/path/to/your/icon.png</icon> <!-- TODO: SET YOUR ICON -->  
            <property name="Color">1</property>
        </item>
        <item id="7">
            <label>Label 7</label> <!-- TODO: SET YOUR LABEL -->    
            <onclick>ActivateWindow(Videos,special://skin/path/to/your/playlist.xsp,return)</onclick> <!-- TODO: SET YOUR PATH / ACTION -->    
            <icon>special://skin/path/to/your/icon.png</icon> <!-- TODO: SET YOUR ICON -->  
            <property name="Color">1</property>
        </item>
    </include>

5. Modify containing TODO marked lines as well.

6. Create a custom tile for your new custom hub via Eminence skin options and set it's path/action to: ActivateWindow(3205)
Reply
#4
How can you check what action/path you should use? Like for instance i would like to add all my video addons in one custom hub called Video Addons or something. But ive no idea what action i should use for that. and the path for icon etc...
Reply
#5
It depends on what addons you want to list. Within Includes_Hub.xml you can set seven addons.

Here's an example how the first entry could look like for Youtube:
Code:
        <item id="1">
            <label>Youtube</label>        
            <onclick>ActivateWindow(Videos,plugin://plugin.video.youtube,return)</onclick>
            <icon>special://skin/extras/icons/youtube.png</icon>
            <property name="Color">1</property>
        </item>

Just do it the same way for other addons.

Note:

special://skin/extras/icons/ is pointing to <userdata folder>/addons/skin.eminence/extras/icons/

plugin:// is pointing to <userdata folder>/addons

Launch video addon:
Code:
ActivateWindow(Videos,plugin://plugin.video.addonName,return)

Launch music addon:
Code:
ActivateWindow(Music,plugin://plugin.music.addonName,return)

Launch program addon:
Code:
ActivateWindow(Programs,plugin://plugin.program.addonName,return)
Reply
#6
This will help me alot,
if a plugin needs to be replace, this cannot be done from the skin-settings itself? Need to be done this way again?
If yes,

Is there a way to creat a custom hub with the option to add icons, plugins etc all from the skin-settings menu?
Reply
#7
how can i enter the setting of this hub from the setting of the theme ?
Reply
#8
and how can i change his bg ?
Reply
#9
(2015-06-23, 17:11)Devian Wrote: This will help me alot,
if a plugin needs to be replace, this cannot be done from the skin-settings itself? Need to be done this way again?
If yes,

Is there a way to creat a custom hub with the option to add icons, plugins etc all from the skin-settings menu?

(2015-07-06, 17:43)zeevgrim Wrote: how can i enter the setting of this hub from the setting of the theme ?

It isn't possible unless someone will do the work to create such a settings view for a custom hub.
As I'm only using such skin hacks for personal use and I'm totally fine with setting everything straight
within the XML files, I don't have the motivation to do so. Probably it's also not that hard to use the XML
code from the existing Eminence settings view and just change some ids and of course the variable names.

But for me personally it's more efficient to make changes just directly within the XML file as I didn't had
to change any item yet since the setup. And if there is a need to change an element, it would only take two
minutes via XML. Smile It's up to you if you want to check the Eminence settings and try to copy some
code to add your own configurable variables or also just use a text editor.


(2015-07-09, 19:03)zeevgrim Wrote: and how can i change his bg ?

Get the background widget working for custom hubs:

1. Navigate to skin.eminence/1080i

2. Open file Includes_WindowContent.xml and go to:
Code:
<variable name="GlobalFanart">        
        [...]
        <value condition="!IsEmpty(Container(9501).ListItem.Art(fanart)) + [Window.IsVisible(3201) | Window.IsVisible(3202)]">$INFO[Container(9501).ListItem.Art(fanart)]</value>
        <value condition="IsEmpty(Container(9501).ListItem.Art(fanart)) + [Window.IsVisible(3201) | Window.IsVisible(3202)]">$INFO[Container(9501).ListItem.Icon]</value>
        [...]
</variable>

3. Just add the Window.IsVisible condition for your custom hubs (e.g for a hub with ID 3205):
Code:
<variable name="GlobalFanart">        
        [...]
        <value condition="!IsEmpty(Container(9501).ListItem.Art(fanart)) + [Window.IsVisible(3201) | Window.IsVisible(3202) | Window.IsVisible(3205)]">$INFO[Container(9501).ListItem.Art(fanart)]</value>
        <value condition="IsEmpty(Container(9501).ListItem.Art(fanart)) + [Window.IsVisible(3201) | Window.IsVisible(3202) | Window.IsVisible(3205)]">$INFO[Container(9501).ListItem.Icon]</value>
        [...]
</variable>



Or alternatively:

Set alternative background image for custom hubs:

1. Navigate to skin.eminence/1080i

2. Open file Includes_WindowContent.xml and go to:
Code:
<variable name="GlobalFanart">        
        [...]
</variable>

3. Add a first line with a proper condition and value for the bg image (e.g for showing a static bg on a hub with ID 3205):
Code:
<variable name="GlobalFanart">        
        <value condition="Window.IsVisible(3205)">path/to/image.png</value>
        [...]
</variable>


cheers
Reply
#10
wow thx !!!! Smile
and how to add img to these box ?
Big Grin

Image
Reply
#11
Normally it should get its content from the video path you should've set within the Custom_Hub_Custom1.xml file.

See line 150:
Code:
<content target="video">special://skin/path/to/your/playlist.xsp</content> <!-- TODO: SET YOUR WIDGET CONTENT -->

What did you put in here?
Reply
#12
i want to have path to image file
Reply
#13
Well, to just set a single image file, it should be enough if you edit your custom hub file (e.g. Custom_Hub_Custom1.xml)
and replace every $VAR[WidgetFanart] with the path to your image file.


Alternatively you could edit Includes_Images.xml, find

Code:
<variable name="WidgetFanart">
        <value condition="!IsEmpty(ListItem.Art(fanart))">$INFO[ListItem.Art(fanart)]</value>
        <value condition="!IsEmpty(ListItem.Icon)">$INFO[ListItem.Icon]</value>
        <value>$INFO[ListItem.Thumb]</value>
</variable>

and add a line like:

Code:
<variable name="WidgetFanart">
        <value condition="Window.isVisible(3205)">path/to/image.png</value>
        <value condition="!IsEmpty(ListItem.Art(fanart))">$INFO[ListItem.Art(fanart)]</value>
        <value condition="!IsEmpty(ListItem.Icon)">$INFO[ListItem.Icon]</value>
        <value>$INFO[ListItem.Thumb]</value>
</variable>
(e.g for a hub with ID 3205)
Reply
#14
For some reason I can not get the image of the widget fanart working. The background Image has the same path and is working, but the image of the fanart is just not showing up. I tryed to replace the "$VAR[WidgetFanart]" with the path to my image file in the custom_hub_custom1.xml and also tryed the alternative way from above.

Making my custom hub xml as:
Code:
<itemlayout width="935" height="538">
                        <control type="image">
                            <width>935</width>
                            <height>538</height>
                            <texture>special://skin/extras/sporthub/backgroundwidget.jpg</texture>
                            <aspectratio>scale</aspectratio>
                        </control>
                    </itemlayout>
                    <focusedlayout width="935" height="538">
                        <control type="image">
                            <width>935</width>
                            <height>538</height>
                            <texture>special://skin/extras/sporthub/backgroundwidget.jpg</texture>
                            <aspectratio>scale</aspectratio>
                        </control>
                    </focusedlayout>

And when this did not do the trick, I have changed it back to the $VAR[WidgetFanart] and then this was my Includes_Images.xml:
Code:
<variable name="WidgetFanart">
        <value condition="Window.IsVisible(3205)">special://skin/extras/sporthub/backgroundwidget.jpg</value>    
        <value condition="!IsEmpty(ListItem.Art(fanart))">$INFO[ListItem.Art(fanart)]</value>
        <value condition="!IsEmpty(ListItem.Icon)">$INFO[ListItem.Icon]</value>
        <value>$INFO[ListItem.Thumb]</value>
    </variable>

Besides this problem, everything is working great. I have also made some icons to match the Eminence skin so thanks for this mod.
Reply
#15
Nobody knows the answer? It is strange, as i tryed everything. I would love to make more hubs, but then the image of the fanart widget needs to work first.
Reply

Logout Mark Read Team Forum Stats Members Help
Custom submenus / Hubs?1