Ich hab jetzt eine kleine Modifikation gebaut, die es einem erlaubt das Mobile Template über den Adminbereich einfach zu aktivieren bzw. deaktivieren.
ANLEITUNG:Über phpMyAdmin folgenden SQL-Befehl ausführen:
INSERT INTO configuration (configuration_key, configuration_value, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('USE_MOBILE_TEMPLATE', 'true', 1, 27, '', NOW(), NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');
/lang/english/admin/configuration.phpSuchen:
define('CURRENT_TEMPLATE_DESC' , 'Choose a template set (theme). The theme must have been saved before in the following folder: www.Your-Domain.com/templates/'); Danach einfügen:
//Spegeli - MobileSTdefine('USE_MOBILE_TEMPLATE_TITLE' , 'Mobile Template');define('USE_MOBILE_TEMPLATE_DESC' , 'Choose if the mobile templateset (theme) shall be used for mobile devices.');//Spegeli - MobileST /lang/german/admin/configuration.phpSuchen:
define('CURRENT_TEMPLATE_DESC' , 'Wählen Sie ein Templateset (Theme) aus. Das Theme muss sich im Ordner www.Ihre-Domain.com/templates/ befinden.'); Danach einfügen:
//Spegeli - MobileSTdefine('USE_MOBILE_TEMPLATE_TITLE' , 'Mobile Template');define('USE_MOBILE_TEMPLATE_DESC' , 'Wählen Sie ob für Mobilgeräte das Mobile Templateset (Theme) benutzt werden soll.');//Spegeli - MobileST /includes/header.phpSuchen:
<?php if($_SESSION["tpl"]=="mobile" && file_exists(DIR_FS_CATALOG
."templates/".$_SESSION["tpl"])) { ?> Ersetzen mit:
<?php if($_SESSION["tpl"]=="mobile" && file_exists(DIR_FS_CATALOG
."templates/".$_SESSION["tpl"]) && USE_MOBILE_TEMPLATE
== "true") { ?> Suchen:
if(!($_SESSION["tpl"]=="mobile" && file_exists(DIR_FS_CATALOG
."templates/".$_SESSION["tpl"]))) { Ersetzen mit:
if(!($_SESSION["tpl"]=="mobile" && file_exists(DIR_FS_CATALOG
."templates/".$_SESSION["tpl"])) && USE_MOBILE_TEMPLATE
== "true") { /includes/application_top.phpSuchen:
if(isset($_GET["tpl"])) { $_SESSION["tpl"] = $_GET["tpl"];}if(isset($_SESSION["tpl"]) && file_exists(DIR_FS_CATALOG
."templates/".$_SESSION["tpl"])) { define("CURRENT_TEMPLATE", $_SESSION["tpl"]);} else { define("CURRENT_TEMPLATE", $template);} Ersetzen mit:
if(isset($_GET["tpl"]) && USE_MOBILE_TEMPLATE
== "true") { $_SESSION["tpl"] = $_GET["tpl"];}if(isset($_SESSION["tpl"]) && file_exists(DIR_FS_CATALOG
."templates/".$_SESSION["tpl"]) && USE_MOBILE_TEMPLATE
== "true") { define("CURRENT_TEMPLATE", $_SESSION["tpl"]);} else { define("CURRENT_TEMPLATE", $template);} Jetzt habt ihr im Adminbereich unter "Mein Shop" eine neue Option, mit der ihr das MobileST Template aktivieren bzw. deaktivieren könnt.
[
EDIT Tomcraft 27.04.2013: SQL-Code aus Screenshot in kopierbares SQL-Statement umgewandelt und Anleitung leicht überarbeitet.]
[
EDIT Tomcraft 27.04.2013: Anleitung in
Beitrag 1 eingefügt.]