Today im going to continue with part 2 of designing for mobile. Though essentially this has nothing to do with designing for mobile, i'm explaining how i created a mobile theme for my community site and made it work.
I guess initially its best to know what you need to carry out the job in hand, so here are the modules I used.
Browsecap: I found this module wasn't perfect and a little problematic to get working correctly. The module is essentially used as device detection. Don't worry if you cannot get this going, it's not essential as we will be using mobile tools also (this requires browsecap module) and essentially does the job to a higher degree.
Mobile Tools: This is the nerve center of your mobile site. It decides everything, or at least allows you to. Now there are a few ways to achieve your goal here, I will give you the details of how I achieved mine but be aware that there are other options available.
In mobile tools you can decide everything from the proposed url of your mobile/desktop site (if you wish to redirect users) to which theme you wish to use for mobile. On the initial page Notification/redirection I have kept standard settings.
Mobile roles tab. Initially I did not create any mobile roles, but eventually did. This could be important if you wish to limit certain tasks on a mobile device. Maybe you don't want users to upload or even log in on your mobile site, or exclude blocks for a anonymous mobile user.
Theme Switching tab. You will need to install the module 'mobile theme' here to get the desired results. This is what blew me away about this module. In this section you can choose a different theme for each and every mobile device, be it iPhone, iPod, iPad, android, blackberry and even opera mini. I chose the option to 'switch theme for a mobile device' instead of 'based on the URL' and chose a mobile theme for all devices except iPad. The screen for iPad i feel is big enough to support a desktop theme.
The last tab for external modules is where i selected 'Mobile Tools' to be my detection module instead of Browscap.
So thats how you get the site detection working. Maybe this would be a good time to fire up iOS simulator and test to see if the new theme is being used correctly. I would recommend playing around with the mobile tools settings to see what suits your needs. A good resource site is the site of the 'mobile tools' creater www.mobiledrupal.com Full of mobile info goodness.
So once your theme is up and running you are left with the fun and creative task of theming your mobile site. There are a few mobile themes out there to choose from, including text based or full iPhone-esque app like themes.
The best theme i found was the iui. This theme looks snazzy and has some added JQuery to give a page transition swipe effect. I nice added touch. Needless to say I didn't just use this theme out of the box and pretty much re-themed cosmetically. I did however add a touch of my own. You will find things a bit fiddly adding blocks here and there and trying to make the mobile site clean without effecting blocks on the main site.
My solution was to add a new region in my mobile theme called $front_page. You notice that many many apps have a very simple layout that generally include a menu on the front page. So by creating a region that appears only on the homepage of the site, i was able to drop a menu in without effecting the blocks on the main site. The rest of my site would simply use the $content region for other blocks, set page specific.
This isn't the only solution or even the best solution, if your site is complex in any way you will run into block placement/visibility issues and a solution i recommend you consider is multiblock. The ability to duplicate a block and set its visibility separately from its original.
And now you have a mobile theme. This of course is A way of creating a mobile site, not THE way. Take a look at the modules and themes available and get creative. Its how we evolve.



powered by drupal