PDA

View Full Version : Different skins based on incoming client IP address?



apb
2008-05-21, 08:40
I'm experimenting with controlling my Transporter with my Nokia phone (it has WiFi and a browser). I can connect just fine to port 9000 on the server machine using the built-in browser on the phone. However, to get this to work I have to set the skin to "Handheld" or I get out of memory errors. But then when I use SqueezeCenter on the main machine I have a stupidly ugly skin. Is there a way to configure the skin that SqueezeCenter uses based on the IP address of the request, or maybe a different url that will skin it differently? A url like http://<server>:9000/handheld would be perfect.

Mark Miksis
2008-05-21, 08:51
A url like hppt://<server>:9000/handheld would be perfect.

Um, did you try that? ;)

kdf
2008-05-21, 08:54
On 21-May-08, at 8:40 AM, apb wrote:
> A url like
> hppt://<server>:9000/handheld would be perfect.

substitute hppt for http and you have exactly what works now.
Did you try this?
-k

mherger
2008-05-21, 08:59
> different url that will skin it differently? A url like
> hppt://<server>:9000/handheld would be perfect.

Did you at least try this?

--

Michael

apb
2008-05-21, 08:59
Um, did you try that? ;)

Nope 8-). I only had a little time to play around with it yesterday. So is that URL known to work?

andyg
2008-05-21, 09:05
Isn't a better way to use the user-agent to determine which skin to use?

msherman
2008-05-21, 09:09
apb wrote:
> Fletch;303945 Wrote:
>> Um, did you try that? ;)
>
> Nope 8-). I only had a little time to play around with it yesterday. So
> is that known to work?

No, it's not known to work. That's why everyone keeps suggesting that
you just try it. Because we like wasting your time.

- Marc

Mark Miksis
2008-05-21, 10:02
Isn't a better way to use the user-agent to determine which skin to use?

FWIW, I've tried webmail clients that do this and found it to be a PITA unless there's also a way to override it in the URL or configure it in a user setting. It seems that there are always reasons to occasionally access the full skin on a handheld browser.

funkstar
2008-05-21, 10:10
FWIW, I've tried webmail clients that do this and found it to be a PITA unless there's also a way to override it in the URL or configure it in a user setting. It seems that there are always reasons to occasionally access the full skin on a handheld browser.
Then if that is the case, filtering by IP is going to have exaclty the same problem. And it is going to need to be constantly updated to handle new devices or changes in IP. Skins based on the user agent is the best way to do this.

appending the skin name to the server URL is a feature thats feen there for years, since the skin engine was implimented even. It is case sensative though.

kdf
2008-05-21, 10:24
On 21-May-08, at 10:10 AM, funkstar wrote:

> . It is case
> sensative though.

used to be, but shouldn't be any more
-kdf

funkstar
2008-05-21, 13:49
On 21-May-08, at 10:10 AM, funkstar wrote:

> . It is case
> sensative though.

used to be, but shouldn't be any more
-kdf
Missed that change, thanks KDF :)

apb
2008-05-22, 08:58
Thanks for the feedback. I tried this out and it worked great, except now we have a plethora of controllers for the Transport in our house and we are having major controller wars to see whose music reigns supreme 8-).

Btw, I really like the idea of the skin changing based on the user-agent idea as long as it is overridable.