View unanswered posts | View active topics It is currently Thu May 23, 2013 12:57 am



Reply to topic  [ 5 posts ] 
 How to modify metadata on Control Pages 
Author Message

Joined: Dec 07, 2009
Posts: 13
Post How to modify metadata on Control Pages
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. :(


Sat Mar 13, 2010 5:30 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6659
Location: Austin, Texas
Post Re: How to modify metadata on Control Pages
Metadata? What data are you talking about?

_________________
Jay (Indigo Support)
Image


Sat Mar 13, 2010 5:51 pm
Profile WWW

Joined: Dec 07, 2009
Posts: 13
Post Re: How to modify metadata on Control Pages
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


Sat Mar 13, 2010 6:04 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6659
Location: Austin, Texas
Post Re: How to modify metadata on Control Pages
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.

_________________
Jay (Indigo Support)
Image


Sat Mar 13, 2010 6:56 pm
Profile WWW

Joined: Dec 07, 2009
Posts: 13
Post Re: How to modify metadata on Control Pages
Thanks for the fast reply. I will post the results when I figure this out.

Doug


Sat Mar 13, 2010 7:57 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.