aboutsummaryrefslogtreecommitdiffstats
path: root/themes/smartpocket/themeconf.inc.php
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2013-06-30 21:15:06 +0000
committerflop25 <flop25@piwigo.org>2013-06-30 21:15:06 +0000
commit18cfd1bb208eb12cd1be736780d813fb2de6830e (patch)
treedf9b2b4ad981c6bdd1b5f0425e5b6678b39ec08b /themes/smartpocket/themeconf.inc.php
parent19ae5b7e2ecd0948f202ac72e714b87808db7ccb (diff)
bug:2848
added two options for the slideshow ToDo lang var git-svn-id: http://piwigo.org/svn/trunk@23718 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--themes/smartpocket/themeconf.inc.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/themes/smartpocket/themeconf.inc.php b/themes/smartpocket/themeconf.inc.php
index e4104c9aa..546280274 100644
--- a/themes/smartpocket/themeconf.inc.php
+++ b/themes/smartpocket/themeconf.inc.php
@@ -12,6 +12,11 @@ $themeconf = array(
'mobile' => true,
);
+// Need upgrade?
+global $conf;
+include(PHPWG_THEMES_PATH.'smartpocket/admin/upgrade.inc.php');
+
+
// Redirect if page is not compatible with mobile theme
/*if (!in_array(script_basename(), array('index', 'register', 'profile', 'identification', 'ws', 'admin')))
redirect(duplicate_index_url());
@@ -56,20 +61,19 @@ if (!empty($_COOKIE['screen_size']))
$this->assign('picture_derivative_params', ImageStdParams::get_by_type($type));
$this->assign('thumbnail_derivative_params', ImageStdParams::get_by_type(IMG_SQUARE));
-//------------------------------------------------------------- mobile version
+//------------------------------------------------------------- mobile version & theme config
add_event_handler('init', 'mobile_link');
function mobile_link()
{
global $template, $conf;
+ $config = unserialize( $conf['smartpocket'] );
+ $template->assign( 'smartpocket', $config );
if ( !empty($conf['mobile_theme']) && (get_device() != 'desktop' || mobile_theme()))
{
- $template->assign('TOGGLE_MOBILE_THEME_URL',
- add_url_params(
- duplicate_index_url(),
- array('mobile' => mobile_theme() ? 'false' : 'true')
- )
- );
+ $template->assign(array(
+ 'TOGGLE_MOBILE_THEME_URL' => add_url_params(duplicate_index_url(),array('mobile' => mobile_theme() ? 'false' : 'true')),
+ ));
}
}