Kodi Community Forum

Full Version: How to ceate a new button?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

at first sorry for my englisch. I have installed xbmc + 1.7.0 VDR on Ubuntu 9.04. So i would like to create a new button (VDR) in the menu who starting a phyton script. I don´t need help with the scripts, only how to create the button who execute the script. My Skin is PM3.HD.

Thank you!
Do you want a complete new button or just to rename one of the current ones.

Button controls are found within home.xml
@ekim232

Thank´s for your answer. Yes I want a complete new button, but i don´t understand how to edit the home.xml. Can you help me?
The problem with adding a new button completely is the fact that the background image around the button would need to be edited to hold a new button. I would suggest that you turn on "show programs on home menu" within the skin settings. This will add another button to the homepage with a background that Jezz already has in the skin. From there we can change that button.

If this will work for you, let me know know what you want the button to be labeled and what action it will pefrom. I will make you a new homepage and send it to you.
OK i understand. Now i have one more button with "Programs". You will rename this button into "VDR" and this button should be activate a phyton script. My wish is that the button is the first! And I think i must send you my home.xml because xbmc is patched and now there is one more button with "TV" for looking tv in xbmc. At this time it look´s: XBMC/9.04-beta1 r19616

TV
Videos
Music
Pictures
Programs
Weather
Scripts
Settings

My wish is:

VDR (if you push the button a phyton-scripts start)
TV
Videos
Music
Pictures
Weather
Scripts
Settings

Is this possible? Let me know what you need.
put your home.xml on pastebin and post the link. I will make the changes and repost it for you.

I will also need to know your script path so I can activate it properly. Are you on PC or Xbox?
Here is the link http://pastebin.com/d5a5aac4d. I´m on PC. I have created under /root/.xbmc/scripts/vdr.py

#!/usr/bin/python
import os
os.system('/etc/vdr/switch.sh')

/etc/vdr/switch.sh:

#!/bin/bash

if [ -e /tmp/xinevdr ]; then
echo "Stoppe XBMC"
killall xbmc.bin
rm /tmp/xinevdr
exit 0
else
echo "Stoppe VDR"
killall vdr-sxfe
touch /tmp/xinevdr
fi

You are my HERO!!!! THANK YOU!!!!
Here is your new homepage. Keep in mind that your images will not match the section unless you edit your customskinsettings.xml.

On line 983 you will see the following..

<onclick>XBMC.RunScript(put your full script path HERE!)</onclick>

Just stick your full script path there and you should be all good. Let me know how it works out. Enjoy!

http://pastebin.com/m6f83a395
Keep in mind that your images will not match the section unless you edit your customskinsettings.xml ---- I don´t know what you mean? After editing the home.xml i see the VDR Button!!! Great Job. Can I change the picture? Is this possible?
Do you use a folder with images in it for each section on your home page or do you just have the image pm3.hd uses for each section. I have a good image pack in my link below if you want to use them for your image folders or as a starter.

Custom images are set within settings>skin settings>backgrounds

Then just set the folder you want for each section. Keep in mind that I altered your home page so your buttons do not line up with with the labels in skin settings. Pastebin me your custom_SkinSetting_1111.xml and I can straighten that out real quick as well.
Hmmm, http://pastebin.com/m4bec6bf4

I don´t have changed anything. There are a folder /usr/share/xbmc/skin/PM3.HD/media with pictures. I would this picture for VDR -- http://www.unterbrecher.de/vdr/logo.jpg
I have downloaded your Background.rar. It looks very good, how can i change the pictures? Is that easy?
Here is your new custom skin menu and I fixed the homepage to reflect the proper fallback images when you din't use a folder path. Just stick that vdr image you had inside the "media" folder within the pm3.hd skin and name it vdr.jpg

Hope it all works good for ya. Let me know if any mistakes, I did it in a rush.

Homepage

Skin settings

Also, where did you get this version of PM3.HD from? It has some stuff in it that was not in the original and I want to check it out. Thanks.
Thank you it work´s!!! But one problem, the button "Music" shows no picture? Here is the patch against r19616 http://trac.xbmc.org/attachment/ticket/5...r.patch.gz
And i installed XBMC from PPA V 9.04-beta1 r19616 Compiled Apr 22 2009.

My log shows: User-Agent: XBMC/9.04-beta1 r19616 (Linux; Ubuntu 9.04; Linux 2.6.28-11-generic; http://www.xbmc.org)

Is that Information good for you? Need you more details?

EDIT: Everything works fine!!! I have fixed the problem (Music button), it was my mistake. Can i change the other pictures against your folder (Home Backgrounds)? Is that easy or a lot of work?

!!!!!THANK YOU FOR YOUR WORK!!!!!!
Good to hear it is working. Whatever pictures you want displayed, just put them in the folders for each section and select that folder in skin settings for backgrounds
Pages: 1 2