Customize Home menu
#16
Kricker,
there are more and more people that want custom Home menu items... I put in a TRAC ticket to have a method to do so without modifying the skins' core XMLs (so they are not overwritten when the skin is updated)
... maybe you can be an advocate for this feature for the community?
I'm not an expert but I play one at work.
Reply
#17
customisation built in would be great

looks like i'm a little late to the party
i figured this out on my own & posted a step-by-step in a new thread.
(sorry for the clutter)
rPi 2&3 | android phones | fireHD8 | linux | win10 + NFS NAS w/ mySQL + props to...
libreElecyatse, titan, AELflexGet, context.manageTags (a zosky original)
Reply
#18
Hello.
Wonderful post, but I seem to have some problems...

I manage to make my home menu. But my movies I want to put in there (I try to make a "Disney" Library) Always end up in movies.

As far as I can understand I have to make a Disney-Setting in "Set Content for it to scan into a library but not Movies.

But how do I do that?
Reply
#19
It's great for my edit submenu in Eden version, thank you.

(2010-01-03, 22:57)ijhammo Wrote:
kricker Wrote:..continued from the other post as it was getting too long.

Adding sub-menu items;
Starting at line 658 you can find the code for the TVshows sub menu items:
Code:
<control type="grouplist" id="9017">
    <posx>10</posx>
    <posy>0</posy>
    <width>240</width>
    <height>240</height>
    <align>center</align>
    <onleft>9000</onleft>
    <onright>Control.SetFocus(8001,0)</onright>
    <onup>9017</onup>
    <ondown>9017</ondown>
    <itemgap>0</itemgap>
    <visible>Container(9000).HasFocus(11)</visible>
    <control type="button" id="90171">
        <include>ButtonHomeSubCommonValues</include>
        <label>369</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowTitles,return)</onclick>
    </control>
    <control type="button" id="90172">
        <include>ButtonHomeSubCommonValues</include>
        <label>135</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowGenres,return)</onclick>
    </control>
    <control type="button" id="90173">
        <include>ButtonHomeSubCommonValues</include>
        <label>652</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowYears,return)</onclick>
    </control>
    <control type="button" id="90174">
        <include>ButtonHomeSubCommonValues</include>
        <label>344</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowActors,return)</onclick>
    </control>
    <control type="button" id="90175">
        <include>ButtonHomeSubCommonValues</include>
        <label>31328</label>
        <onclick>ActivateWindow(VideoLibrary,RecentlyAddedEpisodes,return)</onclick>
    </control>
</control>
How'd I know that was the code for the TVshows sub-menu items? I figured it out based on the <onclick> actions code. You can also see on the <visible> line it references the container 9000 and id number 11, which is the "TV Shows" main menu item. This is also the last block of sub-menu code. All the others are above it.

To add sub-menu items to Programs what I did was copy the TV Shows menu code above and pasted it back in right below itself. Make sure you paste it on a new line after the </control> on line 695. Then make sure you change the id on the first line of pasted code from 9017 to something else. I used 9018 as it seemed the logical choice. To confirm though, I scrolled up through the code for the other submenus to make sure that number was not already used. Then you will start editing the other lines starting with the <onleft> tag.

<onleft>9000</onleft>
What control gets focus when you navigate to the left of the sub-menu. Here the control changes back to the main menu, which if you remember was id 9000.

<onright>Control.SetFocus(8001,0)</onright>
What control gets focus when you navigate to the right of the sub-menu. Here the control changes to the recently added TVShow widget on the right, focusing the first item in the list. For my Programs submenu, there is no recently added widget so I changed it to be just like the <onleft> tag and put the value 9000 there.

<onup>9017</onup>
What control gets focus when you navigate up from the sub-menu. Here it just stays on itself, as 9017 is the id for the TV Show sub-menu. Since above I changed the sub-menu id to be 9018 for Programs I need to change the value here to 9018 as well.

<ondown>9017</ondown>
What control gets focus when you navigate down from the sub-menu. Here it just stays on itself, as 9017 is the id for the TV Show sub-menu. Since above I changed the sub-menu id to be 9018 for Programs I need to change the value here to 9018 as well.

<visible>Container(9000).HasFocus(11)</visible>
This tells the sub-menu when to show up. Make sure you edit the HasFocus(#) to match the main menu item that relates to this. For my purposes it was id 1. Remeber you can find this number by looking in the code block for the main menu items.

<control type="button" id="90171">
<include>ButtonHomeSubCommonValues</include>
<label>369</label>
<onclick>ActivateWindow(VideoLibrary,TVShowTitles,return)</onclick>
</control>

There are groups of these blocks of code. They are the items in the sub menu. Just keep however many of these blocks of code as you need and edit them to your liking. The descriptions of the <label> and <onclick> tags I already went over. You shouldn't need to change the <include> tag. The only other thing you need to pay attention to is the id="#" on the first line. Each one should be an independant number. The pattern used seems to be take the first 4 digits from the submenus id then add the last digit and number up. So for my sub-menu items I started at 90181 then numberd each item up from there. 9018 was the id I changed my sub-menu too if you remember.

I ended up with the following code:
Code:
<control type="grouplist" id="9018">
    <posx>10</posx>
    <posy>0</posy>
    <width>240</width>
    <height>240</height>
    <align>center</align>
    <onleft>9000</onleft>
    <onright>9000</onright>
    <onup>9018</onup>
    <ondown>9018</ondown>
    <itemgap>0</itemgap>
    <visible>Container(9000).HasFocus(1)</visible>
    <control type="button" id="90181">
        <include>ButtonHomeSubCommonValues</include>
        <label>Browse Web</label>
        <onclick>XBMC.System.Exec("D:\Communications\Firefox\firefox.exe")</onclick>
    </control>
    <control type="button" id="90182">
        <include>ButtonHomeSubCommonValues</include>
        <label>E-mail</label>
        <onclick>XBMC.System.Exec("D:\Communications\Firefox\firefox.exe" "https://mail.google.com/mail/" -p karl)</onclick>
    </control>
    <control type="button" id="90183">
        <include>ButtonHomeSubCommonValues</include>
        <label>PBS Kids</label>
        <onclick>XBMC.System.Exec("D:\Communications\Firefox\firefox.exe" "http;//pbskids.org/")</onclick>
    </control>
</control>
This gives me sub-menu items for browsing the web, checking my email (using firefox and Gmail), and going to PBSKids.org to play games for my son.

AWESOME POST!!! Big Grin Thanks Dude!

Reply
#20
I wonder if anyone can help me.
I had this working perfectly, but then I had to re-install raspbmc completely because of a bad nightly build that wouldn't allow me to access my raspbmc settings.
Now for some reason, I am not authorized to edit home.xml.
Does anyone have any ideas on why this might be?
I've been trying to figure it out for a while and I cant.
Thanks
P.S. Sorry to have posted this twice, the other board was 3 years old :p
Reply
#21
[DELETED]

Im sorry still new on here .. ok is there any where else i can get help with that? or another way to ask? want to just learn how to add any add on to my home favorites through script .xml files ... any help?
Reply
#22
Sorry, no support for Navi-X available here. See Forum_rules (wiki) regarding piracy policy.
Reply
#23
hi my name is ravivchandra

i want to change the position of the items in home

i want to make the home menu vertical
Reply
#24
(2010-01-03, 19:31)kricker Wrote: ..continued from the other post as it was getting too long.

Adding sub-menu items;
Starting at line 658 you can find the code for the TVshows sub menu items:
Code:
<control type="grouplist" id="9017">
    <posx>10</posx>
    <posy>0</posy>
    <width>240</width>
    <height>240</height>
    <align>center</align>
    <onleft>9000</onleft>
    <onright>Control.SetFocus(8001,0)</onright>
    <onup>9017</onup>
    <ondown>9017</ondown>
    <itemgap>0</itemgap>
    <visible>Container(9000).HasFocus(11)</visible>
    <control type="button" id="90171">
        <include>ButtonHomeSubCommonValues</include>
        <label>369</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowTitles,return)</onclick>
    </control>
    <control type="button" id="90172">
        <include>ButtonHomeSubCommonValues</include>
        <label>135</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowGenres,return)</onclick>
    </control>
    <control type="button" id="90173">
        <include>ButtonHomeSubCommonValues</include>
        <label>652</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowYears,return)</onclick>
    </control>
    <control type="button" id="90174">
        <include>ButtonHomeSubCommonValues</include>
        <label>344</label>
        <onclick>ActivateWindow(VideoLibrary,TVShowActors,return)</onclick>
    </control>
    <control type="button" id="90175">
        <include>ButtonHomeSubCommonValues</include>
        <label>31328</label>
        <onclick>ActivateWindow(VideoLibrary,RecentlyAddedEpisodes,return)</onclick>
    </control>
</control>
How'd I know that was the code for the TVshows sub-menu items? I figured it out based on the <onclick> actions code. You can also see on the <visible> line it references the container 9000 and id number 11, which is the "TV Shows" main menu item. This is also the last block of sub-menu code. All the others are above it.

To add sub-menu items to Programs what I did was copy the TV Shows menu code above and pasted it back in right below itself. Make sure you paste it on a new line after the </control> on line 695. Then make sure you change the id on the first line of pasted code from 9017 to something else. I used 9018 as it seemed the logical choice. To confirm though, I scrolled up through the code for the other submenus to make sure that number was not already used. Then you will start editing the other lines starting with the <onleft> tag.

<onleft>9000</onleft>
What control gets focus when you navigate to the left of the sub-menu. Here the control changes back to the main menu, which if you remember was id 9000.

<onright>Control.SetFocus(8001,0)</onright>
What control gets focus when you navigate to the right of the sub-menu. Here the control changes to the recently added TVShow widget on the right, focusing the first item in the list. For my Programs submenu, there is no recently added widget so I changed it to be just like the <onleft> tag and put the value 9000 there.

<onup>9017</onup>
What control gets focus when you navigate up from the sub-menu. Here it just stays on itself, as 9017 is the id for the TV Show sub-menu. Since above I changed the sub-menu id to be 9018 for Programs I need to change the value here to 9018 as well.

<ondown>9017</ondown>
What control gets focus when you navigate down from the sub-menu. Here it just stays on itself, as 9017 is the id for the TV Show sub-menu. Since above I changed the sub-menu id to be 9018 for Programs I need to change the value here to 9018 as well.

<visible>Container(9000).HasFocus(11)</visible>
This tells the sub-menu when to show up. Make sure you edit the HasFocus(#) to match the main menu item that relates to this. For my purposes it was id 1. Remeber you can find this number by looking in the code block for the main menu items.

<control type="button" id="90171">
<include>ButtonHomeSubCommonValues</include>
<label>369</label>
<onclick>ActivateWindow(VideoLibrary,TVShowTitles,return)</onclick>
</control>

There are groups of these blocks of code. They are the items in the sub menu. Just keep however many of these blocks of code as you need and edit them to your liking. The descriptions of the <label> and <onclick> tags I already went over. You shouldn't need to change the <include> tag. The only other thing you need to pay attention to is the id="#" on the first line. Each one should be an independent number. The pattern used seems to be take the first 4 digits from the sub-menus id then add the last digit and number up. So for my sub-menu items I started at 90181 then numbered each item up from there. 9018 was the id I changed my sub-menu too if you remember.

I ended up with the following code:
Code:
<control type="grouplist" id="9018">
    <posx>10</posx>
    <posy>0</posy>
    <width>240</width>
    <height>240</height>
    <align>center</align>
    <onleft>9000</onleft>
    <onright>9000</onright>
    <onup>9018</onup>
    <ondown>9018</ondown>
    <itemgap>0</itemgap>
    <visible>Container(9000).HasFocus(1)</visible>
    <control type="button" id="90181">
        <include>ButtonHomeSubCommonValues</include>
        <label>Browse Web</label>
        <onclick>XBMC.System.Exec("D:\Communications\Firefox\firefox.exe")</onclick>
    </control>
    <control type="button" id="90182">
        <include>ButtonHomeSubCommonValues</include>
        <label>E-mail</label>
        <onclick>XBMC.System.Exec("D:\Communications\Firefox\firefox.exe" "https://mail.google.com/mail/" -p karl)</onclick>
    </control>
    <control type="button" id="90183">
        <include>ButtonHomeSubCommonValues</include>
        <label>PBS Kids</label>
        <onclick>XBMC.System.Exec("D:\Communications\Firefox\firefox.exe" "http;//pbskids.org/")</onclick>
    </control>
</control>
This gives me sub-menu items for browsing the web, checking my email (using firefox and Gmail), and going to PBSKids.org to play games for my son.

Can any one tell me how to call any one installed app on android device through xbmc skining.

I want to set onclick listener on a button and when button will be clicked then i want to invoke my installed app. on that device.

Please Reply..............
Reply

Logout Mark Read Team Forum Stats Members Help
Customize Home menu1