From 89bc74b3f30e169ab51e5b2728767f02a94a991c Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 20 Dec 2015 15:44:01 +0100 Subject: feature #379, multiple format, labels Ability to customize, with $lang['format CR2'] = 'RAW Canon' (in LocalFiles Editor) for example --- picture.php | 7 +++++++ themes/default/template/picture.tpl | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/picture.php b/picture.php index f2dfecf0e..093e4b271 100644 --- a/picture.php +++ b/picture.php @@ -679,6 +679,13 @@ SELECT * $format['download_url'] = 'action.php?format='.$format['format_id']; $format['download_url'].= '&download='.substr(md5(time()), 0, 6); // a random string to avoid browser cache + $format['label'] = strtoupper($format['ext']); + $lang_key = 'format '.strtoupper($format['ext']); + if (isset($lang[$lang_key])) + { + $format['label'] = $lang[$lang_key]; + } + $format['filesize'] = sprintf('%.1fMB', $format['filesize']/1024); } } diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index c576748fb..f18fdd615 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -95,7 +95,7 @@ jQuery().ready(function() { -- cgit v1.2.3