Page 1 of 1

How to modify metadata on Control Pages

PostPosted: Sat Mar 13, 2010 5:30 pm
by dsloar
Trying to get the Control Pages to display properly on my Palm Pre. How do I modify the metadata on the control pages? I can't find them in the WebServer folder. Thanks. :(

Re: How to modify metadata on Control Pages

PostPosted: Sat Mar 13, 2010 5:51 pm
by jay (support)
Metadata? What data are you talking about?

Re: How to modify metadata on Control Pages

PostPosted: Sat Mar 13, 2010 6:04 pm
by dsloar
The metadata in the HTML code that looks at whether an iphone is connecting. I was able to spoof an iphone user agent on an earlier version of webOS. That changed with the webOS 1.4 update. The buttons I created on the Control Pages are to small to use on my Pre. It works fine when viewing from an iphone. I would like to change the "Viewport" settings to hopefully make the Control Pages on usable my Pre.

Doug

Re: How to modify metadata on Control Pages

PostPosted: Sat Mar 13, 2010 6:56 pm
by jay (support)
Ah, User-Agent sniffing. In the basereqhandler.py file, located here:

Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 4/IndigoWebServer/indigopy/


There is a method called _IsiPhone (line 292) - it snarfs out whether the User-Agent header contains "iPhone" or "iPod", and returns True if it does, False otherwise. We then set a global boolean template variable, $iphone, to that value and use it in various templates to show/hide/reformat things. You can probably just hack the IsiPhone method to also search for the appropriate User-Agent information for the Pre - apparently it does contain "Pre" so it should be rather simple. Let us know if it works and we'll add it in.

General note to everyone: if you write IWS plugins, you also have access to that variable (or if you're hacking the built-in templates) so feel free to use it.

Re: How to modify metadata on Control Pages

PostPosted: Sat Mar 13, 2010 7:57 pm
by dsloar
Thanks for the fast reply. I will post the results when I figure this out.

Doug