How to use different skin for mobiles ?

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
4/25/2011 8:26:02 AM
Gravatar
Total Posts 7

How to use different skin for mobiles ?

Hi

I added the following keys to the user.config

  <add key="UseMobileSpecificSkin" value="true" />
  <add key="MobilePhoneSkin" value="jqueryui-1" />
  <add key="MobilePhoneUserAgents" value="iphone,android" />

Now when I try to look using the android I got the new skin...but from iPhone I got the regular skin.

What is wrong?

Thanks

Daniel

4/25/2011 8:56:22 AM
Gravatar
Total Posts 18439

Re: How to use different skin for mobiles ?

Hi Daniel,

It does work for me when I test using a different skin for mobile it works on my iphone (I don't have any Android device), so maybe you have it cached and need to refresh the page or something. Make sure you touch Web.config after changing user.config

I think there is more to making a mobile phone optimized experience than just changing the skin (though that will be part of the solution) and I have not yet figured out all the pieces to the puzzle to really be able to make it possible to optimize for smart phones in mojoPortal. Whenever I do get it figured out I will then document it because it would be a very valuable feature to be able to do that. It is not an easy problem, I think you can only get so far with skinning, though it may help.

If you do manage to make a skin that makes a substantially better experience for smart phones I hope you'll share it.

Best,

Joe

4/25/2011 10:19:52 PM
Gravatar
Total Posts 7

Re: How to use different skin for mobiles ?

Hello Joe,

 

I made some more tests trying to understand where is the problem...

Here is where the application is installed : http://mp.scop-sys.com/

Please open it using your iPhone and let me know what skin do u have. If you see the default skin than it's not working.

I use iPhone 3GS with iOs 4.3.2 (latest and greatest).

Thanks

Daniel

4/26/2011 6:23:03 AM
Gravatar
Total Posts 18439

Re: How to use different skin for mobiles ?

Hi Daniel,

Visiting your site with the pc I see the artisteer-greenlagooon skin, visiting with my iPhone I see the jqueryui-1 skin. My iPhone is older either first or second version of iPhone with latest updates.

I would look through your web logs and try to find requests from your iphone and see what the user agent string looks like. As long as it contains "iphone" it should work. Unless you are accessing the web via a proxy server or something that either changes or removes the user agent string, then it would not be able to detect iphone.

Best,

Joe

4/26/2011 6:50:01 AM
Gravatar
Total Posts 7

Re: How to use different skin for mobiles ?

Hi

Ok. I use iPhone 3Gs with the latest updates. Please let me know where to look and search for the issue and when I will find it I will pass you the fix..

Daniel

4/26/2011 6:58:09 AM
Gravatar
Total Posts 18439

Re: How to use different skin for mobiles ?

As I said, you could look in your web site logs, all requests are logged and you can see the user agent string there.

But an easier way is to visit this site WhatsMyUserAgent.com

As far as I know all versions of iPhone have the text iphone in the user agent string, so it should work. We are lower casing the user agent string before looking for iphone in it so case should not matter.

Best,

Joe

4/26/2011 8:05:44 AM
Gravatar
Total Posts 7

Re: How to use different skin for mobiles ?

I hope solved ...(I can't test it right now)...

the problem is that now the iphone id is : iPhone (with capital "P").

 

4/26/2011 8:06:57 AM
Gravatar
Total Posts 7

Re: How to use different skin for mobiles ?

Hi

An idea.. I think that the system should have the list inside and not to have to be defined in parameter ( the parameter shall be just to add more to the "default").

Regards

Daniel

4/26/2011 8:16:02 AM
Gravatar
Total Posts 18439

Re: How to use different skin for mobiles ?

I already told you we lower case the whole user agent string before we look for "iphone", the P has always been capitalized in every version of iPhone user agent string as far as I know but that should not matter since we lower case it.

Keeping track of all current and future user agent strings is beyond the scope of anything I care to work on, it would be a huge project unto itself and doesn't scratch anything that itches me. Having a config setting means it can be adjusted as needed by anyone who needs to. 

Best,

Joe

4/26/2011 8:40:40 AM
Gravatar
Total Posts 7

Re: How to use different skin for mobiles ?

How can I pass u the logs ?

4/26/2011 9:04:32 AM
Gravatar
Total Posts 18439

Re: How to use different skin for mobiles ?

you can send it to me at joe dot audette at g mail dotcom

Just send the latest log file.

Is there anything else about your iPhone that might be different, like is it configured for a language other than English?

Any kind of privacy configuration or do no track mode that might prevent it from passing the user agent?

 

4/26/2011 11:49:22 AM
Gravatar
Total Posts 18439

Re: How to use different skin for mobiles ?

Hi Daniel,

The only iphone traffic I see in your latest log file is from me, I do see what is probably your iphone in the previous day log. From what I can see it should work fine for your iphone. your user agent has the expected iPhone in it and that should be all that is needed.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.