{
public $DTD = null;
public $serveMobile = false;
+ public $mobileFeatures = array();
function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd')
{
// Or, detect the mobile devices based on their support for
// MP 1.0, 1.1, or 1.2 may be ideal. Possible?
- $this->mobiledevices =
- array(
+ $this->mobiledevices = array(
'alcatel',
'android',
'audiovox',
foreach($this->mobiledevices as $md) {
if (strstr($httpuseragent, $md) !== false) {
+ setMobileFeatures($httpuseragent);
+
$this->serveMobile = true;
break;
}
}
+ function setMobileFeatures($useragent)
+ {
+ /* List of devices that support input type="file" */
+ $mobiledeviceInputFileType = array(
+ 'nokia'
+ );
+
+ $this->mobileFeatures['inputfiletype'] = false;
+
+ foreach($mobiledeviceInputFileType as $md) {
+ if (strstr($useragent, $md) !== false) {
+ $this->mobileFeatures['inputfiletype'] = true;
+ break;
+ }
+ }
+ }
+
+
function onStartShowHeadElements($action)
{
if (!$action->serveMobile) {