Detect Mobile Device Browser-Access and render Drupal pages accordingly

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

hier der Link zu einem PHP Script, mit dem sich feststellen läßt ob von einem Mobile Device aus auf die Website zugegriffen wird:

http://mobiforge.com/developing/story/lightweight-device-detection-php

Auf der Drupal Website in der page.tpl.php könnte dann folgendes stehen um die Ausgabe für Moile Devices zu rendern:

<?php
include_once('smartphone/smartphone_detection.php');
if (is_smartphone()) {
print '

<link rel="stylesheet" 
      type="text/css" 
    rel="stylesheet"
          href="' . base_path() .'sites/all/themes/mytheme/smartphone/iphone.css" 
          media="only screen and (max-width:480px)"/>

';

 print '

Only local images are allowed. ';
print $content;
print '

';
return;
}

München

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: