23 Settings::setDefaultValue(
"mobile_settings",
"mobile_content_mode",
"Deliver Full Content", String,
"Sets the content delivery mode for mobile content",
"",
"Deliver Full Content\nUse Mobile Template\nDedicated Mobile Section");
24 Settings::setDefaultValue(
"mobile_settings",
"mobile_content_section",
"", String,
"The identifier of the section providing dedicated mobile content");
26 Settings::setDefaultValue(
"mobile_settings",
"use_native_form_controls",
false, Boolean,
"Use native HTML 5 controls for date and time fields (when available on mobile device)");
33 global $auto_form_defaults;
46 if ($useMobile && !$isTablet)
48 $auto_form_defaults[
"default_layout"] =
"mobile";
51 if ($useMobile && $useNative)
54 if ($detect->isiPhone() || $detect->isiPad())
64 if (
$mode !=
"Dedicated Mobile Section" || !$useMobile)
return;
66 trace (
"Using Dedicated Mobile Section", 4);
68 $section = checkIdentifier($_GET[
"section"]);
72 if ($mobileSection ==
"")
return;
74 trace(
"Mobile: $mobileSection vs $section", 4);
83 $pattern = (
$section ==
"") ?
"#^/#" :
"#/^{$section}/#";
84 $uri = preg_replace($pattern,
"/{$mobileSection}/", $_SERVER[
"REQUEST_URI"]);
89 $uri = ($mobileSection ==
"/") ?
"/" :
"/{$mobileSection}/";
92 trace(
"Redirecting to mobile section at $uri", 3);
100 $auto_form_defaults[
"default_layout"] =
"mobile";
116 trace(
"OverrideTemplate: $template -> $out", 4);
124 $mobileTablets =
Settings::getValue(
"mobile_settings",
"send_mobile_content_to_tablets");
130 if ($detect->isTablet())
134 else $mobile = $detect->isMobile();
136 trace(
"useMobile: ".(
$mobile?
'true':
'false'), 4);
144 return $detect->isTablet();
static usingFeature()
Uses the specified framework feature(s).
static using()
Import the datamodels, views and manifest for the specified component(s).
Provides a central management class for event handlers and common functionality for the mobile compon...
static overrideTemplate($template, &$continue)
static findSection($section_name)
static getValue($component, $name)
Retrieve the value of the specified Setting.
static setDefaultValue($component, $name, $value, $field_type="String", $annotation="", $category="", $options="", $weight=0)
Sets the default value of the given component setting.
if($config["default_content_type"]) $isAction