I am currently doing this by specifying a different (more-or-less identical) theme for each mobile platform and then finding out which them is being used with the following code:


        global $theme_path;

        if (!isset($theme_path)) {
          drupal_theme_initialize();
        }

        if (strpos($theme_path,'ipadtheme')){
          $video_node=$a->field_vid_node_value;
        }

This works, although it is obviously highly inefficient.

Does anyone have a better suggestion? Indeed, is there a way of doing this without jumping through these hoops?

Comments

minoroffense’s picture

Status: Active » Closed (works as designed)

I would look at http://drupal.org/project/wurfl or http://drupal.org/project/browscap

If you need help specifically with using mobile tools to do this, feel free to reopen the issue