aboutsummaryrefslogtreecommitdiffstats
path: root/admin/picture_modify.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-02-10 16:10:00 +0000
committermistic100 <mistic@piwigo.org>2012-02-10 16:10:00 +0000
commitd0303b4ff06829e2d13f8134cbbb7b44f74d30b0 (patch)
treed545a5408b00d8866d2f8e6b0efe8f811922ba87 /admin/picture_modify.php
parenta25fe0c7e86da6c60b22b7785d27832f0bb18b2a (diff)
feature 2564: display picture infos as list
git-svn-id: http://piwigo.org/svn/trunk@13084 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/picture_modify.php47
1 files changed, 11 insertions, 36 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index cfd119bf4..4de5f00e8 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -296,30 +296,15 @@ SELECT '.$conf['user_fields']['username'].' AS username
$result = pwg_query($query);
while ($user_row = pwg_db_fetch_assoc($result))
{
- $added_by = $user_row['username'];
+ $row['added_by'] = $user_row['username'];
}
-$intro = sprintf(
- l10n('This photo was posted on %s by %s.'),
- format_date($row['date_available']),
- $added_by
- );
-
-$intro.= ' ';
-
-$intro.= sprintf(
- l10n('Original file is %s, %ux%u pixels, %.2fMB.'),
- $row['file'],
- $row['width'],
- $row['height'],
- $row['filesize']/1024
- );
-
-$intro.= ' ';
-
-$intro.= sprintf(
- l10n('%u visits'),
- $row['hit']
+$intro_vars = array(
+ 'file' => sprintf(l10n('Original file : %s'), $row['file']),
+ 'added' => sprintf(l10n('Posted %s on %s by %s'), time_since($row['date_available'], 'month'), format_date($row['date_available'], false, false), $row['added_by']),
+ 'size' => $row['width'].'&times;'.$row['height'].' pixels, '.sprintf('%.2f', $row['filesize']/1024).'MB',
+ 'hits' => sprintf(l10n('%d visits'), $row['hit']),
+ 'id' => sprintf(l10n('Numeric identifier : %d'), $row['id']),
);
if ($conf['rate'] and !empty($row['rating_score']))
@@ -330,23 +315,13 @@ SELECT
FROM '.RATE_TABLE.'
WHERE element_id = '.$_GET['image_id'].'
;';
- list($nb_rates) = pwg_db_fetch_row(pwg_query($query));
+ list($row['nb_rates']) = pwg_db_fetch_row(pwg_query($query));
- $intro.= sprintf(
- l10n(', %u rates, rating score %s'),
- $nb_rates,
- $row['rating_score']
- );
+ $intro_vars['rate'] = sprintf(l10n('Rated %d times, score : %f'), $row['nb_rates'], $row['rating_score']);
}
-$intro.= '. ';
-
-$intro.= sprintf(
- l10n('Numeric identifier is %u.'),
- $row['id']
- );
-
-$template->assign('INTRO', $intro);
+$template->assign('INTRO', $intro_vars);
+
if (in_array(get_extension($row['path']),$conf['picture_ext']))
{