fixes #1069 config settings to promote mobile app (iOS only for now)

This commit is contained in:
plegall
2020-09-29 15:12:19 +02:00
parent 83242047f1
commit b24c6c48f1
9 changed files with 71 additions and 0 deletions

View File

@@ -43,6 +43,8 @@ $main_checkboxes = array(
'log',
'history_admin',
'history_guest',
'show_mobile_app_banner_in_gallery',
'show_mobile_app_banner_in_admin',
);
$sizes_checkboxes = array(

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -19,6 +19,13 @@
});
})(target);
};
jQuery('.tiptip-with-img').tipTip({
maxWidth: "300px",
delay: 0,
fadeIn: 200,
fadeOut: 200
});
}());
{if !isset($ORDER_BY_IS_CUSTOM)}
@@ -183,6 +190,24 @@ jQuery("input[name='mail_theme']").change(function() {
</label>
</li>
<li>
<strong>{'Promote mobile app on mobile devices'|translate}</strong>
<label class="font-checkbox no-bold">
<span class="icon-check"></span>
<input type="checkbox" name="show_mobile_app_banner_in_gallery" {if ($main.show_mobile_app_banner_in_gallery)}checked="checked"{/if}>
{'in gallery'|translate}
</label>
<label class="font-checkbox no-bold">
<span class="icon-check"></span>
<input type="checkbox" name="show_mobile_app_banner_in_admin" {if ($main.show_mobile_app_banner_in_admin)}checked="checked"{/if}>
{'in administration'|translate}
</label>
<span class="icon-help-circled tiptip-with-img show-mobile-app-banner-tooltip" title="{'Displays a banner to install or open the official Piwigo app'|translate}<br><img src='admin/themes/default/images/piwigo_app_banner.jpg' style='width:100%;margin-top:5px;'>" style="cursor:help"></span>
</li>
<li>
<label>{'Mail theme'|translate}</label>
@@ -204,6 +229,7 @@ jQuery("input[name='mail_theme']").change(function() {
{/foreach}
</div>
</li>
</ul>
</fieldset>

View File

@@ -5,6 +5,9 @@
<!DOCTYPE html>
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
{if $SHOW_MOBILE_APP_BANNER}
<meta name="apple-itunes-app" content="app-id=472225196">
{/if}
<meta charset="{$CONTENT_ENCODING}">
<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">

View File

@@ -13,6 +13,12 @@ $template->set_filenames(array('header'=>'header.tpl'));
trigger_notify('loc_begin_page_header');
$show_mobile_app_banner = conf_get_param('show_mobile_app_banner_in_gallery', false);
if (defined('IN_ADMIN') and IN_ADMIN)
{
$show_mobile_app_banner = conf_get_param('show_mobile_app_banner_in_admin', true);
}
$template->assign(
array(
'GALLERY_TITLE' =>
@@ -39,6 +45,8 @@ $template->assign(
'U_HOME' => get_gallery_home_url(),
'LEVEL_SEPARATOR' => $conf['level_separator'],
'SHOW_MOBILE_APP_BANNER' => $show_mobile_app_banner,
));

View File

@@ -0,0 +1,21 @@
<?php
// +-----------------------------------------------------------------------+
// | This file is part of Piwigo. |
// | |
// | For copyright and license information, please view the COPYING.txt |
// | file that was distributed with this source code. |
// +-----------------------------------------------------------------------+
if (!defined('PHPWG_ROOT_PATH'))
{
die('Hacking attempt!');
}
$upgrade_description = 'add config parameters to display smart app banner';
conf_update_param('show_mobile_app_banner_in_admin', true);
conf_update_param('show_mobile_app_banner_in_gallery', false);
echo "\n".$upgrade_description."\n";
?>

View File

@@ -1011,3 +1011,7 @@ $lang['Posted %s'] = 'Posted %s';
$lang['File type: %s'] = 'File type: %s';
$lang['or'] = 'or';
$lang['Open in gallery'] = "Open in gallery";
$lang['Promote mobile app on mobile devices'] = 'Promote mobile app on mobile devices';
$lang['in gallery'] = 'in gallery';
$lang['in administration'] = 'in administration';
$lang['Displays a banner to install or open the official Piwigo app'] = 'Displays a banner to install or open the official Piwigo app';

View File

@@ -1016,3 +1016,7 @@ $lang['Some checksums are missing.'] = 'Il manque des sommes de contrôle';
$lang['Display category date'] = 'Afficher la date de la catégorie';
$lang['Deletion in progress'] = 'Suppression en cours';
$lang['Open in gallery'] = "Ouvrir dans la galerie";
$lang['Promote mobile app on mobile devices'] = 'Promouvoir l\'application mobile sur les smartphones et tablettes';
$lang['in gallery'] = 'dans la galerie';
$lang['in administration'] = 'dans l\'administration';
$lang['Displays a banner to install or open the official Piwigo app'] = 'Affiche une bannière pour installer et/ou ouvrir l\'application mobile officielle Piwigo';

View File

@@ -1,6 +1,9 @@
<!DOCTYPE html>
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
{if $SHOW_MOBILE_APP_BANNER}
<meta name="apple-itunes-app" content="app-id=472225196">
{/if}
<meta charset="{$CONTENT_ENCODING}">
<meta name="generator" content="Piwigo (aka PWG), see piwigo.org">