Hi,
I'm an intermediate Drupal user (not a coder) and I'm totally new to Drupal For Mobiles. I've read some docu on drupal-mobile, but still can't make heads or tales of how to make it work, or where to start. So I would really appreciate a guiding hand: any pointers, advices, modules etc.
Here's the story: I've got a Drupal 5 site (which soon will be updated to 6x). My visitors keep asking me for a mobile version of my site. Something like http://m.digg.com or http://m.reddit.com . And I am totally lost as to how to do it, or even where to start???
Is it a just another theme? or is there more to it?
Do I need to create a separate Drupal installation in a subdirectory and point it at the oroginal database?
If it is just a case of building a separate theme, how can I make it located at m.example.com?
If it is just another theme, then how can I make the mobiles access it?
If someone could write or suggest a URL of a step-by-step guide of what to do for an intermediate Drupal user, I would really appreciate that.
Many thanks
Comments
solutions
Hi Drupalina,
You can always take a look at the resources in my delicious account http://delicious.com/tdrycker/mobile+drupal
I try to keep track of all the solutions allowing making mobile drupal.
I'll try to give you a short overview of what you can do (please other mobile developers, add where necessar :)).
There are basically 4 solutions:
The last two are the options that are in front of you, and that both can generate very good results if done properly.
So let’s say you choose option one, then you need two things:
- device detection
- a mobile theme
For device detection, there are several solutions, for example, your php code can look at
$_SERVER["HTTP_USER_AGENT"]There are also several webservices available that help you to detect the device (http://deviceatlas.com/). Problem with device detection is that daily new devices are brought to the market, and a simple agent detection, and they don't tell you anything about the device and its capabilities (screen size, video codec, …).
Next, if you managed detecting the device, you should try to switch themes. There are some modules that help you with al this:
You will see that these modules are not very active and only for Drupal 5... Next to the detection of devices (that is almost impossible to keep track of), there is a big complexity in transforming your content, like scaling images, enabling/disabling blocks, linearizing tables, pagination of long texts, putting menu items in user friendly select lists (or numbered items), optimisation of download size, etc … All things that are important for mobile sites… But I think if you use for example the accessibility module, you should already come far.
Then there is a second solution based upon intelligent content adaptation. This means that the regular desktop site is processed by special software in order to create a mobile version. An example is http://www.operamini.com/, where the browser sends the site to a adaptation server located elsewhere and that adapts the website.
Currently I am working on an integration of another adaptation server (http://open.siruna.org) with Drupal. The concept is that you make a regular desktop site and use Siruna (a free hosted server for non commercial usage) to convert your site. This concept is much simpler then making your own theme (after you learned the basics of the system). The system is based upon serial transformers doing something with your site.
The steps that you have to do are:
- make an account on http://composer.siruna.com
- start a new project (related to your website)
- add a filter
o this means that you can make a specific adaptation for each page you want,
o I am making a filter generator for Drupal, to make things easier in the future
- Now the difficult part (when you use it first) click on your new filter.
- You will see a preview of your mobile site in the left, and some code at the right
- You will see that your website is already very much adapted to the mobile world! And that your images are indeed smaller
- Now you can add some extra filters (contact me if you need help with them)
- e.g. to remove CSS attributes and specific < div > blocks
<map:transform type="sirunaCSSTransformer"><map:parameter name="task0" value="removeCSSItemAttribute(#wrapper #container,padding)" />
<map:parameter name="task1" value="changeCSSItemAttribute(#wrapper #container .sidebar, margin, 60px 0 0em)" />
</transform>
<map:transform type="sirunaElementTransformer">
<map:parameter name="task0" value="remove(//p:div[@id='block-user-0'])" />
</map:transform>
- http://open.siruna.org/documentation/sitemap-api for help
- use firebug to test what changes you have to make to let the site fit in the emulator
If you want to test the result on real devices, you can use the test-url that is given to you in the composer.
This sounds very complex, but actually ones you get the principle right, you can very quickly create your mobile site
Concerning the domain name, there are different options.
- choose a .mobi domain and use .mobi loader to switch the team if .mobi is detected. Just direct your .mobi domain to the same site as your regular domain
- choose a m. mobile. or .mobi domain and direct them to the siruna proxy (e.g. setting a cname towards the test url you get)
You see, currently going mobile with drupal is not yet a piece of cake :) It needs time and devotion....
If you need some more help, just contact me, I'll be happy to guide you through the Siruna basic configuration
I hope someone else can give a more elaborate overview on the creation of a own mobile theme!
Tom
Well theme switcher & new thems
Well we did a mobile version of one of the biggest Drupal sites in France. The idea is that you'll need several things
Take a look over WURLF & http://www.handsetdetection.com
The idea is to be able to switch between 4 - 5 differents themes.
You'll need to support a lightweight HTML theme for iPhone & latest SmartPhones (No or very few JS, lightwieght or no CSS, lightweight pages, new simplified content organisation....).
As I said you'll need a light HTML, several XHTML and one WML themes. Why several XHMLT ? because many terminals supports differently XHMLT, for example BlackBerry 8320 and previous have a very strange behaviour by removing almost all CSS.
As for themes you'll probably need to extend image cache module to adapt your images to terminals screen sizes.
We'll soon publish modules to support all this on drupal.org. Keep informed.
Maxime TOPOLOV
Adyax / http://www.adyax.com
+33 6 42 77 11 87
Maxime TOPOLOV
Adyax / http://www.adyax.com
+33 1 76 77 34 60
Siruna Platform
Hi,
I am new to this world of Mobile Internet.
I am using siruna platform. I have downloaded the siruna platform. I created the project as mentioned in documents. The thing i want to know is how to use filter for different web pages. Right n ow my filter is being used for default home page.
How can i use for multiple web pages. Please explain me briefly with example. I am a slow learner. if possible explain with snapshots
i will be waiting for your reply