mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #1069 config settings to promote mobile app (iOS only for now)
This commit is contained in:
@@ -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(
|
||||
|
||||
BIN
admin/themes/default/images/piwigo_app_banner.jpg
Normal file
BIN
admin/themes/default/images/piwigo_app_banner.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -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>
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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,
|
||||
));
|
||||
|
||||
|
||||
|
||||
21
install/db/157-database.php
Normal file
21
install/db/157-database.php
Normal 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";
|
||||
|
||||
?>
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user