PDA

View Full Version : Display IP when set to Automatic(DHCP)


Nightbird
2005-10-28, 22:41
any chance of having the ip being received by xbmc when in dhcp mode displayed on the main screen. some dashboards like unleashx display this on the main screen when in dhcp mode. reason i ask is my last numbers can change every few days eg (always 192.168.0.*** <these change) and i have to look in unleashx first to see what it is then alter the last numbers in flashfxp accordingly. so any chance of an ip display in xbmc.
cheers.

kraqh3d
2005-10-29, 17:16
already there, mate. there is an info tag you can use -- network.ipaddress. but you need to add it to home.xml on your own.

you can even use the visible tag of system.hasnetwork to hide it the tag if there's no network connection.

here's a start for you:

<control>
<description>ip address label</description>
<type>label</type>
<id>0</id>
<posx>###</posx>
<posy>###</posy>
<width>###</width>
<info>network.ipaddress</network>
<align>right|left|center</align>
<font>somefont</font>
<visible>system.hasnetwork</visible>
</control>


labels arent focusable so the id isnt as important. just make sure that its not a duplicate of a focusable control. id0 is usually where generic images are located so thats ok. or anything unique would be fine.

posx/posy is the position on the screen

width is how wide you want the text field. if its too short, the text will be truncated with "..."

align is the alignment of the text within the given width\

and you need to get a valid font. check other controls or open up font.xml to find a valid font.

Nightbird
2005-10-30, 00:33
kraqh3d. thanks a lot for your help. i used the code you gave me to create an entry in the home.xml. took me about an hour of black screens, but with trial and error finally sussed out where to put the code. below is the entry i used, i now have a decent positioned ip display which will fade smoothly in and out when i plug in and unplug my network cable.
cheers kraqh3d, much appreciated.

* *<control>
* * *<description>ip address label</description>
* * *<type>label</type>
* * *<id>0</id>
* * *<posx>120</posx>
* * *<posy>495</posy>
* * *<info>network.ipaddress</info>
* * *<align>left</align>
* * *<font>special12</font>
* * *<visible effect="fade" time="1000">system.hasnetwork</visible>
* *</control>

looks like:
http://www.dreamwell.pwp.blueyonder.co.uk/ipxbmc.jpg

jmarshall
2005-10-30, 01:59
nice - i've added a link to this from the tutorials section of the online manual :)

http://manual.xboxmediacenter.de/wakka.php?wakka=skinningtutorials

thanks!

BritneysPAIRS
2005-10-30, 03:14
info lable for ip wont be dispayed if no network cable is in anyway. unless its booted with it in and then you unplug it.

i added ip to the fileamanager like picture, made it gigs though and removed text i didnt really need.

http://www.thraxen.com/britneyspairs/q.jpg