aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/picture_modify.php74
-rw-r--r--include/page_tail.php20
-rw-r--r--include/picture_comment.inc.php69
-rw-r--r--include/picture_metadata.inc.php61
-rw-r--r--include/picture_rate.inc.php55
-rw-r--r--picture.php245
-rw-r--r--template/yoga/admin/picture_modify.tpl146
-rw-r--r--template/yoga/footer.tpl37
-rw-r--r--template/yoga/picture.tpl285
-rw-r--r--template/yoga/picture_nav_buttons.tpl173
-rw-r--r--template/yoga/slideshow.tpl27
11 files changed, 533 insertions, 659 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index 10f42d34c..6e320e902 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -224,7 +224,7 @@ else
'</p>';
}
-$template->assign_vars(
+$template->assign(
array(
'U_SYNC' =>
PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
@@ -265,29 +265,27 @@ $template->assign_vars(
if ($row['has_high'] == 'true')
{
- $template->assign_block_vars(
- 'high',
- array(
- 'FILESIZE' => isset($row['high_filesize'])
+ $template->assign(
+ 'HIGH_FILESIZE',
+ isset($row['high_filesize'])
? $row['high_filesize'].' KB'
- : l10n('unknown'),
- )
+ : l10n('unknown')
);
}
// image level options
-$blockname = 'level_option';
-$selected_level = isset($_POST['level']) ? $_POST['level'] : $row['level'];
+$tpl_options = array();
foreach ($conf['available_permission_levels'] as $level)
{
- $template->assign_block_vars(
- $blockname,
- array(
- 'VALUE' => $level,
- 'CONTENT' => l10n( sprintf('Level %d', $level) ),
- 'SELECTED' => ($level==$selected_level ? 'selected="selected"' : ''),
- ));
+ $tpl_options[$level] = l10n( sprintf('Level %d', $level) ).' ('.$level.')';
}
+$selected_level = isset($_POST['level']) ? $_POST['level'] : $row['level'];
+$template->assign(
+ array(
+ 'level_options'=> $tpl_options,
+ 'level_options_selected' => array($selected_level)
+ )
+ );
// creation date
unset($day, $month, $year);
@@ -308,9 +306,21 @@ else
{
list($year, $month, $day) = array('', 0, 0);
}
-get_day_list('date_creation_day', $day);
+
+
get_month_list('date_creation_month', $month);
-$template->assign_vars(array('DATE_CREATION_YEAR_VALUE' => $year));
+$month_list = $lang['month'];
+$month_list[0]='------------';
+ksort($month_list);
+
+$template->assign(
+ array(
+ 'DATE_CREATION_DAY_VALUE' => $day,
+ 'DATE_CREATION_MONTH_VALUE' => $month,
+ 'DATE_CREATION_YEAR_VALUE' => $year,
+ 'month_list' => $month_list,
+ )
+ );
$query = '
SELECT category_id, uppercats
@@ -321,27 +331,22 @@ SELECT category_id, uppercats
;';
$result = pwg_query($query);
-if (mysql_num_rows($result) > 1)
-{
- $template->assign_block_vars('links', array());
-}
-
while ($row = mysql_fetch_array($result))
{
$name =
get_cat_display_name_cache(
$row['uppercats'],
- PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id=',
+ get_root_url().'admin.php?page=cat_modify&amp;cat_id=',
false
);
if ($row['category_id'] == $storage_category_id)
{
- $template->assign_vars(array('STORAGE_CATEGORY' => $name));
+ $template->assign('STORAGE_CATEGORY', $name);
}
else
{
- $template->assign_block_vars('links.category', array('NAME' => $name));
+ $template->append('related_categories', $name);
}
}
@@ -395,12 +400,7 @@ else
if (isset($url_img))
{
- $template->assign_block_vars(
- 'jumpto',
- array(
- 'URL' => $url_img
- )
- );
+ $template->assign( 'U_JUMPTO', $url_img );
}
// associate to another category ?
@@ -411,7 +411,7 @@ SELECT id,name,uppercats,global_rank
WHERE image_id = '.$_GET['image_id'].'
AND id != '.$storage_category_id.'
;';
-display_select_cat_wrapper($query, array(), 'associated_option');
+display_select_cat_wrapper($query, array(), 'associated_options');
$result = pwg_query($query);
$associateds = array($storage_category_id);
@@ -424,7 +424,7 @@ SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE id NOT IN ('.implode(',', $associateds).')
;';
-display_select_cat_wrapper($query, array(), 'dissociated_option');
+display_select_cat_wrapper($query, array(), 'dissociated_options');
// representing
$query = '
@@ -432,7 +432,7 @@ SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE representative_picture_id = '.$_GET['image_id'].'
;';
-display_select_cat_wrapper($query, array(), 'elected_option');
+display_select_cat_wrapper($query, array(), 'elected_options');
$query = '
SELECT id,name,uppercats,global_rank
@@ -440,7 +440,7 @@ SELECT id,name,uppercats,global_rank
WHERE representative_picture_id != '.$_GET['image_id'].'
OR representative_picture_id IS NULL
;';
-display_select_cat_wrapper($query, array(), 'dismissed_option');
+display_select_cat_wrapper($query, array(), 'dismissed_options');
//----------------------------------------------------------- sending html code
diff --git a/include/page_tail.php b/include/page_tail.php
index 57f884338..dcb9155a3 100644
--- a/include/page_tail.php
+++ b/include/page_tail.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -31,19 +31,14 @@ $template->assign_vars(
array(
'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
'PHPWG_URL' => PHPWG_URL,
-
- 'L_TITLE_MAIL' => urlencode(l10n('title_send_mail')),
));
//--------------------------------------------------------------------- contact
if (!is_a_guest())
{
- $template->assign_block_vars(
- 'contact',
- array(
- 'MAIL' => get_webmaster_mail_address()
- )
+ $template->assign(
+ 'CONTACT_MAIL', get_webmaster_mail_address()
);
}
@@ -71,16 +66,11 @@ if ($conf['show_queries'])
$debug_vars = array_merge($debug_vars, array('QUERIES_LIST' => $debug) );
}
-if ( !empty($debug_vars) )
-{
- $template->assign_block_vars('debug',$debug_vars );
-}
+$template->assign('debug', $debug_vars );
trigger_action('loc_end_page_tail');
//
// Generate the page
//
-$template->parse('tail');
-
-$template->p();
+$template->pparse('tail');
?>
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index 1c6968e17..f966421c9 100644
--- a/include/picture_comment.inc.php
+++ b/include/picture_comment.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -73,14 +73,10 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
}
- $block_var = ($comment_action=='reject') ? 'errors.error' : 'infos.info';
- foreach ($infos as $info)
- {
- $template->assign_block_vars(
- $block_var,
- array( 'TEXT'=>$info )
- );
- }
+ $template->assign(
+ ($comment_action=='reject') ? 'errors' : 'infos',
+ $infos
+ );
// allow plugins to notify what's going on
trigger_action( 'user_comment_insertion',
@@ -108,7 +104,7 @@ if ($page['show_comments'])
$page['start'] = 0;
}
- $page['navigation_bar'] = create_navigation_bar(
+ $navigation_bar = create_navigation_bar(
duplicate_picture_url(array(), array('start')),
$row['nb_comments'],
$page['start'],
@@ -116,11 +112,10 @@ if ($page['show_comments'])
true // We want a clean URL
);
- $template->assign_block_vars(
- 'comments',
+ $template->assign(
array(
- 'NB_COMMENT' => $row['nb_comments'],
- 'NAV_BAR' => $page['navigation_bar'],
+ 'COMMENT_COUNT' => $row['nb_comments'],
+ 'COMMENT_NAV_BAR' => $navigation_bar,
)
);
@@ -138,39 +133,33 @@ SELECT id,author,date,image_id,content
while ($row = mysql_fetch_array($result))
{
- $template->assign_block_vars(
- 'comments.comment',
+ $tpl_comment =
array(
- 'COMMENT_AUTHOR' => trigger_event('render_comment_author',
+ 'AUTHOR' => trigger_event('render_comment_author',
empty($row['author'])
? l10n('guest')
: $row['author']),
- 'COMMENT_DATE' => format_date(
+ 'DATE' => format_date(
$row['date'],
'mysql_datetime',
true),
- 'COMMENT' => trigger_event('render_comment_content',$row['content']),
- )
+ 'CONTENT' => trigger_event('render_comment_content',$row['content']),
);
if (is_admin())
{
- $template->assign_block_vars(
- 'comments.comment.delete',
- array(
- 'U_COMMENT_DELETE' =>
- add_url_params(
- $url_self,
- array(
- 'action'=>'delete_comment',
- 'comment_to_delete'=>$row['id']
- )
- )
- )
- );
+ $tpl_comment['U_DELETE'] =
+ add_url_params(
+ $url_self,
+ array(
+ 'action'=>'delete_comment',
+ 'comment_to_delete'=>$row['id']
+ )
+ );
}
+ $template->append('comments', $tpl_comment);
}
}
@@ -184,19 +173,13 @@ SELECT id,author,date,image_id,content
{
$content = htmlspecialchars($comm['content']);
}
- $template->assign_block_vars('comments.add_comment',
+ $template->assign('comment_add',
array(
+ 'F_ACTION' => $url_self,
'KEY' => $key,
- 'CONTENT' => $content
+ 'CONTENT' => $content,
+ 'SHOW_AUTHOR' => !is_classic_user()
));
-
- // display author field if the user status is guest or generic
- if (!is_classic_user())
- {
- $template->assign_block_vars(
- 'comments.add_comment.author_field', array()
- );
- }
}
}
diff --git a/include/picture_metadata.inc.php b/include/picture_metadata.inc.php
index 513ee55c5..861a1e2c5 100644
--- a/include/picture_metadata.inc.php
+++ b/include/picture_metadata.inc.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -31,15 +30,15 @@
*/
include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
-$template->assign_block_vars('metadata', array());
if (($conf['show_exif']) and (function_exists('read_exif_data')))
{
if ($exif = @read_exif_data($picture['current']['image_path']))
{
$exif = trigger_event('format_exif_data', $exif, $picture['current'] );
- $template->assign_block_vars(
- 'metadata.headline',
- array('TITLE' => 'EXIF Metadata')
+
+ $tpl_meta = array(
+ 'TITLE' => 'EXIF Metadata',
+ 'lines' => array(),
);
foreach ($conf['show_exif_fields'] as $field)
@@ -53,14 +52,7 @@ if (($conf['show_exif']) and (function_exists('read_exif_data')))
{
$key = $lang['exif_field_'.$field];
}
-
- $template->assign_block_vars(
- 'metadata.line',
- array(
- 'KEY' => $key,
- 'VALUE' => $exif[$field]
- )
- );
+ $tpl_meta['lines'][$key] = $exif[$field];
}
}
else
@@ -73,19 +65,14 @@ if (($conf['show_exif']) and (function_exists('read_exif_data')))
{
$key = $lang['exif_field_'.$tokens[1]];
}
-
- $template->assign_block_vars(
- 'metadata.line',
- array(
- 'KEY' => $key,
- 'VALUE' => $exif[$tokens[0]][$tokens[1]]
- )
- );
+ $tpl_meta['lines'][$key] = $exif[$tokens[0]][$tokens[1]];
}
}
}
+ $template->append('metadata', $tpl_meta);
}
}
+
if ($conf['show_iptc'])
{
$iptc = get_iptc_data($picture['current']['image_path'],
@@ -93,27 +80,21 @@ if ($conf['show_iptc'])
if (count($iptc) > 0)
{
- $template->assign_block_vars(
- 'metadata.headline',
- array('TITLE' => 'IPTC Metadata')
+ $tpl_meta = array(
+ 'TITLE' => 'IPTC Metadata',
+ 'lines' => array(),
);
- }
- foreach ($iptc as $field => $value)
- {
- $key = $field;
- if (isset($lang[$field]))
+ foreach ($iptc as $field => $value)
{
- $key = $lang[$field];
+ $key = $field;
+ if (isset($lang[$field]))
+ {
+ $key = $lang[$field];
+ }
+ $tpl_meta['lines'][$key] = $value;
}
-
- $template->assign_block_vars(
- 'metadata.line',
- array(
- 'KEY' => $key,
- 'VALUE' => $value
- )
- );
+ $template->append('metadata', $tpl_meta);
}
}
diff --git a/include/picture_rate.inc.php b/include/picture_rate.inc.php
index 331cb41b0..4ffd0c8c1 100644
--- a/include/picture_rate.inc.php
+++ b/include/picture_rate.inc.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -35,24 +34,12 @@ if ($conf['rate'])
$query = '
SELECT COUNT(rate) AS count
, ROUND(AVG(rate),2) AS average
- , ROUND(STD(rate),2) AS STD
+ , ROUND(STD(rate),2) AS std
FROM '.RATE_TABLE.'
WHERE element_id = '.$picture['current']['id'].'
;';
$row = mysql_fetch_array(pwg_query($query));
- if ($row['count'] == 0)
- {
- $value = l10n('no_rate');
- }
- else
- {
- $value = sprintf(
- l10n('%.2f (rated %d times, standard deviation = %.2f)'),
- $row['average'],
- $row['count'],
- $row['STD']
- );
- }
+ $template->assign('rate_summary', $row);
$user_rate = null;
if ($conf['rate_anonymous'] or is_autorize_status(ACCESS_CLASSIC) )
@@ -83,37 +70,17 @@ SELECT COUNT(rate) AS count
}
}
- $template->assign_block_vars(
- 'rate',
- array(
- 'SENTENCE' =>isset($user_rate) ? l10n('update_rate') : l10n('new_rate'),
- 'F_ACTION' => add_url_params(
+ $template->assign(
+ 'rating',
+ array(
+ 'F_ACTION' => add_url_params(
$url_self,
array('action'=>'rate')
- )
+ ),
+ 'USER_RATE'=> $user_rate,
+ 'marks' => $conf['rate_items']
)
);
-
- $template->assign_block_vars('info_rate', array('CONTENT' => $value));
-
- foreach ($conf['rate_items'] as $num => $mark)
- {
- $template->assign_block_vars(
- 'rate.rate_option',
- array(
- 'OPTION' => $mark,
- 'SEPARATOR' => ($num > 0 ? '|' : ''),
- )
- );
- if (isset($user_rate) and $user_rate==$mark)
- {
- $template->assign_block_vars('rate.rate_option.my_rate', array() );
- }
- else
- {
- $template->assign_block_vars('rate.rate_option.not_my_rate', array() );
- }
- }
}
}
diff --git a/picture.php b/picture.php
index 052d9c325..07d6ef7cd 100644
--- a/picture.php
+++ b/picture.php
@@ -81,7 +81,7 @@ function default_picture_content($content, $element_info)
if ( !$page['slideshow'] and isset($element_info['high_url']) )
{
$uuid = uniqid(rand());
- $template->assign_block_vars(
+ $template->assign(
'high',
array(
'U_HIGH' => $element_info['high_url'],
@@ -89,7 +89,7 @@ function default_picture_content($content, $element_info)
)
);
}
- $template->assign_vars( array(
+ $template->assign( array(
'SRC_IMG' => $element_info['image_url'],
'ALT_IMG' => $element_info['file'],
'WIDTH_IMG' => @$element_info['scaled_width'],
@@ -472,19 +472,8 @@ $template->set_filenames(
array(
'picture' =>
(($page['slideshow'] and $conf['light_slideshow']) ? 'slideshow.tpl' : 'picture.tpl'),
- 'nav_buttons' => 'picture_nav_buttons.tpl'));
+ ));
-if ($page['slideshow'])
-{
- // Add local-slideshow.css file if exists
- // Not only for ligth
- $css = get_root_url() . get_themeconf('template_dir') . '/theme/'
- . get_themeconf('theme') . '/local-slideshow.css';
- if (file_exists($css))
- {
- $template->assign_block_vars('slideshow', array());
- }
-}
$title = $picture['current']['name'];
$title_nb = ($page['current_rank'] + 1).'/'.count($page['items']);
@@ -523,69 +512,67 @@ $picture = trigger_event('picture_pictures_data', $picture);
if (isset($picture['next']['image_url'])
and $picture['next']['is_picture'] )
{
- $template->assign_block_vars(
- 'prefetch',
- array (
- 'URL' => $picture['next']['image_url']
- )
- );
+ $template->assign('U_PREFETCH', $picture['next']['image_url'] );
}
//------------------------------------------------------- navigation management
-foreach (array('first','previous','next','last') as $which_image)
+foreach (array('first','previous','next','last', 'current') as $which_image)
{
if (isset($picture[$which_image]))
{
- $template->assign_block_vars(
+ $template->assign(
$which_image,
array(
- 'TITLE_IMG' => $picture[$which_image]['name'],
- 'IMG' => $picture[$which_image]['thumbnail'],
+ 'TITLE' => $picture[$which_image]['name'],
+ 'THUMB_SRC' => $picture[$which_image]['thumbnail'],
// Params slideshow was transmit to navigation buttons
'U_IMG' =>
add_url_params(
- $picture[$which_image]['url'], $slideshow_url_params)
+ $picture[$which_image]['url'], $slideshow_url_params),
+ 'U_DOWNLOAD' => @$picture['current']['download_url'],
)
);
}
- else
- {
- $template->assign_block_vars(
- $which_image.'_unactive',
- array()
- );
- }
}
if ($page['slideshow'])
{
+ // Add local-slideshow.css file if exists
+ // Not only for ligth
+ $css = PHPWG_ROOT_PATH . get_themeconf('template_dir') . '/theme/'
+ . get_themeconf('theme') . '/local-slideshow.css';
+ if (file_exists($css))
+ {
+ //TODO CORRECT THIS $template->assign_block_vars('slideshow', array());
+ }
+
+ $tpl_slideshow = array();
+
//slideshow end
- $template->assign_block_vars(
- 'stop_slideshow',
+ $template->assign(
array(
- 'U_SLIDESHOW' => $picture['current']['url'],
+ 'U_SLIDESHOW_STOP' => $picture['current']['url'],
)
);
foreach (array('repeat', 'play') as $p)
{
- $template->assign_block_vars(
- ($slideshow_params[$p] ? 'stop' : 'start').'_'.$p,
- array(
- // Params slideshow was transmit to navigation buttons
- 'U_IMG' =>
+ $var_name =
+ 'U_'
+ .($slideshow_params[$p] ? 'STOP_' : 'START_')
+ .strtoupper($p);
+
+ $tpl_slideshow[$var_name] =
add_url_params(
$picture['current']['url'],
array('slideshow' =>
encode_slideshow_params(
- array_merge($slideshow_params,
+ array_merge($slideshow_params,
array($p => ! $slideshow_params[$p]))
- )
)
)
- )
- );
+ );
}
foreach (array('dec', 'inc') as $op)
@@ -593,105 +580,73 @@ if ($page['slideshow'])
$new_period = $slideshow_params['period'] + ((($op == 'dec') ? -1 : 1) * $conf['slideshow_period_step']);
$new_slideshow_params =
correct_slideshow_params(
- array_merge($slideshow_params,
+ array_merge($slideshow_params,
array('period' => $new_period)));
- $block_period = $op.'_period';
if ($new_slideshow_params['period'] === $new_period)
{
- $template->assign_block_vars(
- $block_period,
- array(
- // Params slideshow was transmit to navigation buttons
- 'U_IMG' =>
+ $var_name = 'U_'.strtoupper($op).'_PERIOD';
+ $tpl_slideshow[$var_name] =
add_url_params(
$picture['current']['url'],
array('slideshow' => encode_slideshow_params($new_slideshow_params)
)
- )
- )
);
}
- else
- {
- $template->assign_block_vars(
- $block_period.'_unactive',
- array()
- );
- }
}
+ $template->assign('slideshow', $tpl_slideshow );
}
else
{
- $template->assign_block_vars(
- 'start_slideshow',
+ $template->assign(
array(
- 'U_SLIDESHOW' =>
+ 'U_SLIDESHOW_START' =>
add_url_params(
$picture['current']['url'],
array( 'slideshow'=>''))
)
);
- $template->assign_block_vars(
- 'up',array('U_URL' => $url_up));
}
-$template->assign_vars(
+$template->assign(
array(
'SECTION_TITLE' => $page['title'],
- 'PICTURE_TITLE' => $picture['current']['name'],
'PHOTO' => $title_nb,
- 'TITLE' => $picture['current']['name'],
+ 'SHOW_PICTURE_NAME_ON_TITLE' => $conf['show_picture_name_on_title'],
'LEVEL_SEPARATOR' => $conf['level_separator'],
+
+ 'FILE_PICTURE_NAV_BUTTONS' => 'picture_nav_buttons.tpl',
'U_HOME' => make_index_url(),
+ 'U_UP' => $url_up,
'U_METADATA' => $url_metadata,
- 'U_ADMIN' => $url_admin,
- 'U_ADD_COMMENT' => $url_self,
)
);
-if ($conf['show_picture_name_on_title'])
-{
- $template->assign_block_vars('title', array());
-}
//------------------------------------------------------- upper menu management
-// download link
-if ( isset($picture['current']['download_url']) )
-{
- $template->assign_block_vars(
- 'download',
- array(
- 'U_DOWNLOAD' => $picture['current']['download_url']
- )
- );
-}
-
-// button to set the current picture as representative
-if (is_admin() and isset($page['category']))
-{
- $template->assign_block_vars(
- 'representative',
- array(
- 'URL' => add_url_params($url_self,
- array('action'=>'set_as_representative')
- )
- )
- );
-}
-
-// caddie button
+// admin links
if (is_admin())
{
- $template->assign_block_vars(
- 'caddie',
+ if (isset($page['category']))
+ {
+ $template->assign(
+ array(
+ 'U_SET_AS_REPRESENTATIVE' => add_url_params($url_self,
+ array('action'=>'set_as_representative')
+ )
+ )
+ );
+ }
+
+ $template->assign(
array(
- 'URL' => add_url_params($url_self,
+ 'U_CADDIE' => add_url_params($url_self,
array('action'=>'add_to_caddie')
- )
+ ),
+ 'U_ADMIN' => $url_admin,
)
);
}
@@ -711,7 +666,7 @@ SELECT COUNT(*) AS nb_fav
if ($row['nb_fav'] == 0)
{
- $template->assign_block_vars(
+ $template->assign(
'favorite',
array(
'FAVORITE_IMG' =>
@@ -727,7 +682,7 @@ SELECT COUNT(*) AS nb_fav
}
else
{
- $template->assign_block_vars(
+ $template->assign(
'favorite',
array(
'FAVORITE_IMG' =>
@@ -742,11 +697,6 @@ SELECT COUNT(*) AS nb_fav
);
}
}
-//------------------------------------ admin link for information modifications
-if ( is_admin() )
-{
- $template->assign_block_vars('admin', array());
-}
//--------------------------------------------------------- picture information
$header_infos = array(); //for html header use
@@ -754,13 +704,11 @@ $header_infos = array(); //for html header use
if (isset($picture['current']['comment'])
and !empty($picture['current']['comment']))
{
- $template->assign_block_vars(
- 'legend',
- array(
- 'COMMENT_IMG' =>
+ $template->assign(
+ 'COMMENT_IMG',
trigger_event('render_element_description',
$picture['current']['comment'])
- ));
+ );
$header_infos['COMMENT'] = strip_tags($picture['current']['comment']);
}
@@ -780,10 +728,6 @@ if (!empty($picture['current']['author']))
$picture['current']['author'];
$header_infos['INFO_AUTHOR'] = $picture['current']['author'];
}
-else
-{
- $infos['INFO_AUTHOR'] = l10n('N/A');
-}
// creation date
if (!empty($picture['current']['date_creation']))
@@ -800,10 +744,6 @@ if (!empty($picture['current']['date_creation']))
$infos['INFO_CREATION_DATE'] =
'<a href="'.$url.'" rel="nofollow">'.$val.'</a>';
}
-else
-{
- $infos['INFO_CREATION_DATE'] = l10n('N/A');
-}
// date of availability
$val = format_date($picture['current']['date_available'], 'mysql_datetime');
@@ -836,10 +776,6 @@ if ($picture['current']['is_picture'] and isset($picture['current']['width']) )
$picture['current']['width'].'*'.$picture['current']['height'];
}
}
-else
-{
- $infos['INFO_DIMENSIONS'] = l10n('N/A');
-}
// filesize
if (!empty($picture['current']['filesize']))
@@ -847,10 +783,6 @@ if (!empty($picture['current']['filesize']))
$infos['INFO_FILESIZE'] =
sprintf(l10n('%d Kb'), $picture['current']['filesize']);
}
-else
-{
- $infos['INFO_FILESIZE'] = l10n('N/A');
-}
// number of visits
$infos['INFO_VISITS'] = $picture['current']['hit'];
@@ -858,47 +790,46 @@ $infos['INFO_VISITS'] = $picture['current']['hit'];
// file
$infos['INFO_FILE'] = $picture['current']['file'];
-// tags
+$template->assign($infos);
+
+// related tags
$tags = get_common_tags( array($page['image_id']), -1);
if ( count($tags) )
{
- $infos['INFO_TAGS'] = '';
- foreach ($tags as $num => $tag)
+ foreach ($tags as $tag)
{
- $infos['INFO_TAGS'] .= $num ? ', ' : '';
- $infos['INFO_TAGS'] .= '<a href="'
- .make_index_url(
+ $template->append(
+ 'related_tags',
array(
- 'tags' => array($tag)
+ 'ID' => $tag['id'],
+ 'NAME' => $tag['name'],
+ 'U_TAG' => make_index_url(
+ array(
+ 'tags' => array($tag)
+ )
+ ),
+ 'U_TAG_IMAGE' => duplicate_picture_url(
+ array(
+ 'section' => 'tags',
+ 'tags' => array($tag)
+ )
+ )
)
- )
- .'">'.$tag['name'].'</a>';
+ );
}
- $header_infos['INFO_TAGS'] = strip_tags($infos['INFO_TAGS']);
-}
-else
-{
- $infos['INFO_TAGS'] = l10n('N/A');
}
-$template->assign_vars($infos);
-
// related categories
foreach ($related_categories as $category)
{
- $template->assign_block_vars(
- 'category',
- array(
- 'LINE' => count($related_categories) > 3
+ $template->append(
+ 'related_categories',
+ count($related_categories) > 3
? get_cat_display_name_cache($category['uppercats'])
: get_cat_display_name_from_id($category['category_id'])
- )
);
}
-// assign tpl picture_nav_buttons
-$template->assign_var_from_handle('NAV_BUTTONS', 'nav_buttons');
-
// maybe someone wants a special display (call it before page_header so that
// they can add stylesheets)
$element_content = trigger_event(
@@ -906,7 +837,7 @@ $element_content = trigger_event(
'',
$picture['current']
);
-$template->assign_var( 'ELEMENT_CONTENT', $element_content );
+$template->assign( 'ELEMENT_CONTENT', $element_content );
// +-----------------------------------------------------------------------+
// | sub pages |
@@ -923,6 +854,6 @@ pwg_log($picture['current']['id'], 'picture');
include(PHPWG_ROOT_PATH.'include/page_header.php');
trigger_action('loc_end_picture');
-$template->parse('picture');
+$template->pparse('picture');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
diff --git a/template/yoga/admin/picture_modify.tpl b/template/yoga/admin/picture_modify.tpl
index b0fe64911..2dada069f 100644
--- a/template/yoga/admin/picture_modify.tpl
+++ b/template/yoga/admin/picture_modify.tpl
@@ -1,129 +1,125 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
-<h2>{lang:title_picmod}</h2>
+{* $Id$ *}
+<h2>{'title_picmod'|@translate}</h2>
-<img src="{TN_SRC}" alt="{lang:thumbnail}" class="thumbnail" />
+<img src="{$TN_SRC}" alt="{'thumbnail'|@translate}" class="thumbnail" />
<ul class="categoryActions">
- <!-- BEGIN jumpto -->
- <li><a href="{jumpto.URL}" title="{lang:jump to image}"><img src="{themeconf:icon_dir}/category_jump-to.png" class="button" alt="{lang:jump to image}" /></a></li>
- <!-- END jumpto -->
- <li><a href="{U_SYNC}" title="{lang:synchronize metadata}" {TAG_INPUT_ENABLED}><img src="{themeconf:icon_dir}/sync_metadata.png" class="button" alt="{lang:synchronize}" /></a></li>
+ {if isset($U_JUMPTO) }
+ <li><a href="{$U_JUMPTO}" title="{'jump to image'|@translate}"><img src="{$themeconf.icon_dir}/category_jump-to.png" class="button" alt="{'jump to image'|@translate}" /></a></li>
+ {/if}
+ <li><a href="{$U_SYNC}" title="{'synchronize metadata'|@translate}" {$TAG_INPUT_ENABLED}><img src="{$themeconf.icon_dir}/sync_metadata.png" class="button" alt="{'synchronize'|@translate}" /></a></li>
</ul>
-<form action="{F_ACTION}" method="post" id="properties">
+<form action="{$F_ACTION}" method="post" id="properties">
<fieldset>
- <legend>{lang:Informations}</legend>
+ <legend>{'Informations'|@translate}</legend>
<table>
<tr>
- <td><strong>{lang:Path}</strong></td>
- <td>{PATH}</td>
+ <td><strong>{'Path'|@translate}</strong></td>
+ <td>{$PATH}</td>
</tr>
<tr>
- <td><strong>{lang:Post date}</strong></td>
- <td>{REGISTRATION_DATE}</td>
+ <td><strong>{'Post date'|@translate}</strong></td>
+ <td>{$REGISTRATION_DATE}</td>
</tr>
<tr>
- <td><strong>{lang:Dimensions}</strong></td>
- <td>{DIMENSIONS}</td>
+ <td><strong>{'Dimensions'|@translate}</strong></td>
+ <td>{$DIMENSIONS}</td>
</tr>
<tr>
- <td><strong>{lang:Filesize}</strong></td>
- <td>{FILESIZE}</td>
+ <td><strong>{'Filesize'|@translate}</strong></td>
+ <td>{$FILESIZE}</td>
</tr>
-<!-- BEGIN high -->
+{if isset($HIGH_FILESIZE) }
<tr>
- <td><strong>{lang:High filesize}</strong></td>
- <td>{high.FILESIZE}</td>
+ <td><strong>{'High filesize'|@translate}</strong></td>
+ <td>{$HIGH_FILESIZE}</td>
</tr>
-<!-- END high -->
+{/if}
<tr>
- <td><strong>{lang:Storage category}</strong></td>
- <td>{STORAGE_CATEGORY}</td>
+ <td><strong>{'Storage category'|@translate}</strong></td>
+ <td>{$STORAGE_CATEGORY}</td>
</tr>
- <!-- BEGIN links -->
+ {if isset($related_categories) }
<tr>
- <td><strong>{lang:Linked categories}</strong></td>
+ <td><strong>{'Linked categories'|@translate}</strong></td>
<td>
<ul>
- <!-- BEGIN category -->
- <li>{links.category.NAME}</li>
- <!-- END category -->
+ {foreach from=$related_categories item=name}
+ <li>{$name}</li>
+ {/foreach}
</ul>
</td>
</tr>
- <!-- END links -->
+ {/if}
</table>
</fieldset>
<fieldset>
- <legend>{lang:Properties}</legend>
+ <legend>{'Properties'|@translate}</legend>
<table>
<tr>
- <td><strong>{lang:Name}</strong></td>
- <td><input type="text" name="name" value="{NAME}" /></td>
+ <td><strong>{'Name'|@translate}</strong></td>
+ <td><input type="text" name="name" value="{$NAME}" /></td>
</tr>
<tr>
- <td><strong>{lang:Author}</strong></td>
- <td><input type="text" name="author" value="{AUTHOR}" /></td>
+ <td><strong>{'Author'|@translate}</strong></td>
+ <td><input type="text" name="author" value="{$AUTHOR}" /></td>
</tr>
<tr>
- <td><strong>{lang:Creation date}</strong></td>
+ <td><strong>{'Creation date'|@translate}</strong></td>
<td>
- <label><input type="radio" name="date_creation_action" value="unset" /> {lang:unset}</label>
- <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {lang:set to}
+ <label><input type="radio" name="date_creation_action" value="unset" /> {'unset'|@translate}</label>
+ <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {'set to'|@translate}
<select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">
- <!-- BEGIN date_creation_day -->
- <option {date_creation_day.SELECTED} value="{date_creation_day.VALUE}">{date_creation_day.OPTION}</option>
- <!-- END date_creation_day -->
+ <option value="0">--</option>
+ {section name=day start=1 loop=31}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY_VALUE}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
</select>
<select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">
- <!-- BEGIN date_creation_month -->
- <option {date_creation_month.SELECTED} value="{date_creation_month.VALUE}">{date_creation_month.OPTION}</option>
- <!-- END date_creation_month -->
+ {html_options options=$month_list selected=$DATE_CREATION_MONTH_VALUE}
</select>
<input onmousedown="document.getElementById('date_creation_action_set').checked = true;"
name="date_creation_year"
type="text"
size="4"
maxlength="4"
- value="{DATE_CREATION_YEAR_VALUE}" />
+ value="{$DATE_CREATION_YEAR_VALUE}" />
</td>
</tr>
<tr>
- <td><strong>{lang:Tags}</strong></td>
- <td>{TAG_SELECTION}</td>
+ <td><strong>{'Tags'|@translate}</strong></td>
+ <td>{$TAG_SELECTION}</td>
</tr>
<tr>
- <td><strong>{lang:Description}</strong></td>
- <td><textarea name="description" class="description">{DESCRIPTION}</textarea></td>
+ <td><strong>{'Description'|@translate}</strong></td>
+ <td><textarea name="description" class="description">{$DESCRIPTION}</textarea></td>
</tr>
<tr>
- <td><strong>{lang:Minimum privacy level}</strong></td>
+ <td><strong>{'Minimum privacy level'|@translate}</strong></td>
<td>
<select name="level" size="1">
- <!-- BEGIN level_option -->
- <option {level_option.SELECTED} value="{level_option.VALUE}">{level_option.CONTENT} ({level_option.VALUE})</option>
- <!-- END level_option -->
+ {html_options options=$level_options selected=$level_options_selected}
</select>
</td>
</tr>
@@ -131,38 +127,34 @@
</table>
<p style="text-align:center;">
- <input class="submit" type="submit" value="{lang:Submit}" name="submit" {TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{lang:Reset}" name="reset" />
+ <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
+ <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
</p>
</fieldset>
</form>
-<form id="associations" method="post" action="{F_ACTION}#associations">
+<form id="associations" method="post" action="{$F_ACTION}#associations">
<fieldset>
- <legend>{lang:Association to categories}</legend>
+ <legend>{'Association to categories'|@translate}</legend>
<table class="doubleSelect">
<tr>
<td>
- <h3>{lang:Associated}</h3>
+ <h3>{'Associated'|@translate}</h3>
<select class="categoryList" name="cat_associated[]" multiple="multiple" size="30">
- <!-- BEGIN associated_option -->
- <option {associated_option.SELECTED} value="{associated_option.VALUE}">{associated_option.OPTION}</option>
- <!-- END associated_option -->
+ {html_options options=$associated_options}
</select>
- <p><input class="submit" type="submit" value="&raquo;" name="dissociate" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" value="&raquo;" name="dissociate" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
</td>
<td>
- <h3>{lang:Dissociated}</h3>
+ <h3>{'Dissociated'|@translate}</h3>
<select class="categoryList" name="cat_dissociated[]" multiple="multiple" size="30">
- <!-- BEGIN dissociated_option -->
- <option {dissociated_option.SELECTED} value="{dissociated_option.VALUE}">{dissociated_option.OPTION}</option>
- <!-- END dissociated_option -->
+ {html_options options=$dissociated_options}
</select>
- <p><input class="submit" type="submit" value="&laquo;" name="associate" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" value="&laquo;" name="associate" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
</td>
</tr>
</table>
@@ -170,30 +162,26 @@
</fieldset>
</form>
-<form id="representation" method="post" action="{F_ACTION}#representation">
+<form id="representation" method="post" action="{$F_ACTION}#representation">
<fieldset>
- <legend>{lang:Representation of categories}</legend>
+ <legend>{'Representation of categories'|@translate}</legend>
<table class="doubleSelect">
<tr>
<td>
- <h3>{lang:Represents}</h3>
+ <h3>{'Represents'|@translate}</h3>
<select class="categoryList" name="cat_elected[]" multiple="multiple" size="30">
- <!-- BEGIN elected_option -->
- <option {elected_option.SELECTED} value="{elected_option.VALUE}">{elected_option.OPTION}</option>
- <!-- END elected_option -->
+ {html_options options=$elected_options}
</select>
- <p><input class="submit" type="submit" value="&raquo;" name="dismiss" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" value="&raquo;" name="dismiss" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
</td>
<td>
- <h3>{lang:Does not represent}</h3>
+ <h3>{'Does not represent'|@translate}</h3>
<select class="categoryList" name="cat_dismissed[]" multiple="multiple" size="30">
- <!-- BEGIN dismissed_option -->
- <option {dismissed_option.SELECTED} value="{dismissed_option.VALUE}">{dismissed_option.OPTION}</option>
- <!-- END dismissed_option -->
+ {html_options options=$dismissed_options}
</select>
- <p><input class="submit" type="submit" value="&laquo;" name="elect" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
+ <p><input class="submit" type="submit" value="&laquo;" name="elect" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
</td>
</tr>
</table>
diff --git a/template/yoga/footer.tpl b/template/yoga/footer.tpl
index e21969078..37aab1fba 100644
--- a/template/yoga/footer.tpl
+++ b/template/yoga/footer.tpl
@@ -1,31 +1,32 @@
-<!-- DEV TAG: not smarty migrated -->
+{* $Id$ *}
<div id="copyright">
<a name="EoP"></a> <!-- End of Page -->
- <!-- BEGIN debug -->
- {lang:generation_time} {debug.TIME} ({debug.NB_QUERIES} {lang:sql_queries_in} {debug.SQL_TIME}) -
- <!-- END debug -->
+ {if isset($debug.TIME) }
+ {'generation_time'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'sql_queries_in'|@translate} {$debug.SQL_TIME}) -
+ {/if}
- <!-- Please, do not remove this copyright. If you really want to,
+ {* Please, do not remove this copyright. If you really want to,
contact us on http://phpwebgallery.net to find a solution on how
- to show the origin of the script...-->
+ to show the origin of the script...
+ *}
- {lang:powered_by}
+ {'powered_by'|@translate}
<a href="http://www.phpwebgallery.net" class="PWG">
<span class="P">Php</span><span class="W">Web</span><span class="G">Gallery</span></a>
- {VERSION}
- <!-- BEGIN contact -->
- - {lang:send_mail}
- <a href="mailto:{contact.MAIL}?subject={L_TITLE_MAIL}">{lang:Webmaster}</a>
- <!-- END contact -->
+ {$VERSION}
+ {if isset($CONTACT_MAIL)}
+ - {'send_mail'|@translate}
+ <a href="mailto:{$CONTACT_MAIL}?subject={'title_send_mail'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
+ {/if}
</div> <!-- copyright -->
-<!-- BEGIN footer_element -->
-{footer_element.CONTENT}
-<!-- END footer_element -->
+{if isset($footer_elemets)}
+{foreach from=$footer_elements item=v}
+{$v}
+{/foreach}
+{/if}
</div> <!-- the_page -->
-<!-- BEGIN debug -->
- {debug.QUERIES_LIST}
-<!-- END debug -->
+{if isset($debug.QUERIES_LIST)}{$debug.QUERIES_LIST}{/if}
</body>
</html>
diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl
index ebfba0998..9f77b8b56 100644
--- a/template/yoga/picture.tpl
+++ b/template/yoga/picture.tpl
@@ -1,207 +1,230 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- BEGIN errors -->
+{* $Id$ *}
+{if isset($errors)}
<div class="errors">
-<ul>
- <!-- BEGIN error -->
- <li>{errors.error.TEXT}</li>
- <!-- END error -->
-</ul>
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
</div>
-<!-- END errors -->
-<!-- BEGIN infos -->
+{/if}
+
+{if isset($infos)}
<div class="infos">
-<ul>
- <!-- BEGIN info -->
- <li>{infos.info.TEXT}</li>
- <!-- END info -->
-</ul>
+ <ul>
+ {foreach from=$infos item=info}
+ <li>{$info}</li>
+ {/foreach}
+ </ul>
</div>
-<!-- END infos -->
+{/if}
<div id="imageHeaderBar">
<div class="browsePath">
- <a href="{U_HOME}" rel="home">{lang:home}</a>
- {LEVEL_SEPARATOR}{SECTION_TITLE}
- {LEVEL_SEPARATOR}{PICTURE_TITLE}
+ <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
+ {$LEVEL_SEPARATOR}{$SECTION_TITLE}
+ {$LEVEL_SEPARATOR}{$current.TITLE}
</div>
- <div class="imageNumber">{PHOTO}</div>
- <!-- BEGIN title -->
- <h2>{TITLE}</h2>
- <!-- END title -->
+ <div class="imageNumber">{$PHOTO}</div>
+ {if $SHOW_PICTURE_NAME_ON_TITLE }
+ <h2>{$current.TITLE}</h2>
+ {/if}
</div>
<div id="imageToolBar">
<div class="randomButtons">
- <!-- BEGIN start_slideshow -->
- <a href="{start_slideshow.U_SLIDESHOW}" title="{lang:slideshow}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/slideshow.png" class="button" alt="{lang:slideshow}"></a>
- <!-- END start_slideshow -->
- <!-- BEGIN stop_slideshow -->
- <a href="{stop_slideshow.U_SLIDESHOW}" title="{lang:slideshow_stop}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/stop_slideshow.png" class="button" alt="{lang:slideshow_stop}"></a>
- <!-- END stop_slideshow -->
- <a href="{U_METADATA}" title="{lang:picture_show_metadata}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/metadata.png" class="button" alt="{lang:picture_show_metadata}"></a>
- <!-- BEGIN download -->
- <a href="{download.U_DOWNLOAD}" title="{lang:download_hint}"><img src="{pwg_root}{themeconf:icon_dir}/save.png" class="button" alt="{lang:download}"></a>
- <!-- END download -->
- {PLUGIN_PICTURE_ACTIONS}
- <!-- BEGIN favorite -->
- <a href="{favorite.U_FAVORITE}" title="{favorite.FAVORITE_HINT}"><img src="{favorite.FAVORITE_IMG}" class="button" alt="{favorite.FAVORITE_ALT}"></a>
- <!-- END favorite -->
- <!-- BEGIN representative -->
- <a href="{representative.URL}" title="{lang:set as category representative}"><img src="{pwg_root}{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}"></a>
- <!-- END representative -->
- <!-- BEGIN admin -->
- <a href="{U_ADMIN}" title="{lang:link_info_image}"><img src="{pwg_root}{themeconf:icon_dir}/preferences.png" class="button" alt="{lang:link_info_image}"></a>
- <!-- END admin -->
- <!-- BEGIN caddie -->
- <a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{pwg_root}{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"></a>
- <!-- END caddie -->
+ {if isset($U_SLIDESHOW_START) }
+ <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/slideshow.png" class="button" alt="{'slideshow'|@translate}"></a>
+ {/if}
+ {if isset($U_SLIDESHOW_STOP) }
+ <a href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}"></a>
+ {/if}
+ <a href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="{'picture_show_metadata'|@translate}"></a>
+ {if isset($current.U_DOWNLOAD) }
+ <a href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
+ {/if}
+ {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
+ {if isset($favorite) }
+ <a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="{$favorite.FAVORITE_ALT}"></a>
+ {/if}
+ {if !empty($U_SET_AS_REPRESENTATIVE) }
+ <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
+ {/if}
+ {if isset($U_ADMIN) }
+ <a href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'link_info_image'|@translate}"></a>
+ {/if}
+ {if isset($U_CADDIE) }
+ <a href="{$U_CADDIE}" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
+ {/if}
</div>
- {NAV_BUTTONS}
+ {include file=$FILE_PICTURE_NAV_BUTTONS}
</div> <!-- imageToolBar -->
<div id="theImage">
-{ELEMENT_CONTENT}
-<!-- BEGIN legend -->
-<p>{legend.COMMENT_IMG}</p>
-<!-- END legend -->
-<!-- BEGIN stop_slideshow -->
+{$ELEMENT_CONTENT}
+
+{if isset($COMMENT_IMG)}
+<p>{$COMMENT_IMG}</p>
+{/if}
+
+{if isset($U_SLIDESHOW_STOP) }
<p>
- [ <a href="{stop_slideshow.U_SLIDESHOW}">{lang:slideshow_stop}</a> ]
+ [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
</p>
-<!-- END stop_slideshow -->
+{/if}
+
</div>
-<!-- BEGIN previous -->
-<a class="navThumb" id="thumbPrev" href="{previous.U_IMG}" title="{lang:previous_page} : {previous.TITLE_IMG}" rel="prev">
- <img src="{previous.IMG}" class="thumbLink" id="linkPrev" alt="{previous.TITLE_IMG}">
+{if isset($previous) }
+<a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
+ <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
</a>
-<!-- END previous -->
-<!-- BEGIN next -->
-<a class="navThumb" id="thumbNext" href="{next.U_IMG}" title="{lang:next_page} : {next.TITLE_IMG}" rel="next">
- <img src="{next.IMG}" class="thumbLink" id="linkNext" alt="{next.TITLE_IMG}">
+{/if}
+{if isset($next) }
+<a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
+ <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
</a>
-<!-- END next -->
+{/if}
<table class="infoTable" summary="Some info about this picture">
<tr>
- <td class="label">{lang:Author}</td>
- <td class="value">{INFO_AUTHOR}</td>
+ <td class="label">{'Author'|@translate}</td>
+ <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
</tr>
<tr>
- <td class="label">{lang:Created on}</td>
- <td class="value">{INFO_CREATION_DATE}</td>
+ <td class="label">{'Created on'|@translate}</td>
+ <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
</tr>
<tr>
- <td class="label">{lang:Posted on}</td>
- <td class="value">{INFO_POSTED_DATE}</td>
+ <td class="label">{'Posted on'|@translate}</td>
+ <td class="value">{$INFO_POSTED_DATE}</td>
</tr>
<tr>
- <td class="label">{lang:Dimensions}</td>
- <td class="value">{INFO_DIMENSIONS}</td>
+ <td class="label">{'Dimensions'|@translate}</td>
+ <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
</tr>
<tr>
- <td class="label">{lang:File}</td>
- <td class="value">{INFO_FILE}</td>
+ <td class="label">{'File'|@translate}</td>
+ <td class="value">{$INFO_FILE}</td>
</tr>
<tr>
- <td class="label">{lang:Filesize}</td>
- <td class="value">{INFO_FILESIZE}</td>
+ <td class="label">{'Filesize'|@translate}</td>
+ <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
</tr>
<tr>
- <td class="label">{lang:Tags}</td>
- <td class="value">{INFO_TAGS}</td>
+ <td class="label">{'Tags'|@translate}</td>
+ <td class="value">
+ {if isset($related_tags)}
+ {foreach from=$related_tags item=tag name=tag_loop}
+ {if !$smarty.foreach.tag_loop.first}, {/if}
+ <a href="{$tag.U_TAG}">{$tag.NAME}</a>
+ {/foreach}
+ {/if}
+ </td>
</tr>
<tr>
- <td class="label">{lang:Categories}</td>
+ <td class="label">{'Categories'|@translate}</td>
<td class="value">
+ {if isset($related_categories)}
<ul>
- <!-- BEGIN category -->
- <li>{category.LINE}</li>
- <!-- END category -->
+ {foreach from=$related_categories item=cat}
+ <li>{$cat}</li>
+ {/foreach}
</ul>
+ {/if}
</td>
</tr>
<tr>
- <td class="label">{lang:Visits}</td>
- <td class="value">{INFO_VISITS}</td>
+ <td class="label">{'Visits'|@translate}</td>
+ <td class="value">{$INFO_VISITS}</td>
</tr>
- <!-- BEGIN info_rate -->
+ {if isset($rate_summary) }
<tr>
- <td class="label">{lang:Average rate}</td>
- <td class="value">{info_rate.CONTENT}</td>
+ <td class="label">{'Average rate'|@translate}</td>
+ <td class="value">
+ {if $rate_summary.count}
+ {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
+ {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
+ {else}
+ {'no_rate'|@translate}
+ {/if}
+ </td>
</tr>
- <!-- END info_rate -->
+ {/if}
</table>
-<!-- BEGIN metadata -->
+{if isset($metadata)}
<table class="infoTable" summary="Some more (technical) info about this picture">
- <!-- BEGIN headline -->
+{foreach from=$metadata item=meta}
<tr>
- <th colspan="2">{metadata.headline.TITLE}</th>
+ <th colspan="2">{$meta.TITLE}</th>
</tr>
- <!-- END headline -->
- <!-- BEGIN line -->
+ {foreach from=$meta.lines item=value key=label}
<tr>
- <td class="label">{metadata.line.KEY}</td>
- <td class="value">{metadata.line.VALUE}</td>
+ <td class="label">{$label}</td>
+ <td class="value">{$value}</td>
</tr>
- <!-- END line -->
+ {/foreach}
+{/foreach}
</table>
-<!-- END metadata -->
-
-<!-- BEGIN rate -->
-<form action="{rate.F_ACTION}" method="post" id="rateForm">
-<div>{rate.SENTENCE} :
-<!-- BEGIN rate_option -->
-{rate.rate_option.SEPARATOR}
-<!-- BEGIN my_rate -->
-<input type="button" name="rate" value="{rate.rate_option.OPTION}" class="rateButtonSelected" />
-<!-- END my_rate -->
-<!-- BEGIN not_my_rate -->
-<input type="submit" name="rate" value="{rate.rate_option.OPTION}" class="rateButton" />
-<!-- END not_my_rate -->
-<!-- END rate_option -->
-<script type="text/javascript" src="{pwg_root}{themeconf:template_dir}/rating.js"></script>
+{/if}
+
+{if isset($rating)}
+<form action="{$rating.F_ACTION}" method="post" id="rateForm">
+<div>
+{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}
+:
+{foreach from=$rating.marks item=mark name=rate_loop}
+{if !$smarty.foreach.rate_loop.first} | {/if}
+{if $mark==$rating.USER_RATE}
+ <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" />
+{else}
+ <input type="submit" name="rate" value="{$mark}" class="rateButton" />
+{/if}
+{/foreach}
+<script type="text/javascript" src="{$ROOT_URL}{$themeconf.template_dir}/rating.js"></script>
</div>
</form>
-<!-- END rate -->
+{/if}
<hr class="separation">
-<!-- BEGIN comments -->
+{if isset($COMMENT_COUNT)}
<div id="comments">
- <h2>[{comments.NB_COMMENT}] {lang:comments_title}</h2>
+ <h2>[{$COMMENT_COUNT}] {'comments_title'|@translate}</h2>
- <div class="navigationBar">{comments.NAV_BAR}</div>
+ <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
- <!-- BEGIN comment -->
+ {if isset($comments)}
+ {foreach from=$comments item=comment}
<div class="comment">
- <!-- BEGIN delete -->
+ {if isset($comment.U_DELETE)}
<p class="userCommentDelete">
- <a href="{comments.comment.delete.U_COMMENT_DELETE}" title="{lang:comments_del}">
- <img src="{pwg_root}{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{lang:delete}]"/>
+ <a href="{$comment.U_DELETE}" title="{'comments_del'|@translate}">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/>
</a>
</p>
- <!-- END delete -->
- <p class="commentInfo"><span class="author">{comments.comment.COMMENT_AUTHOR}</span> - {comments.comment.COMMENT_DATE}</p>
- <blockquote>{comments.comment.COMMENT}</blockquote>
+ {/if}
+ <p class="commentInfo"><span class="author">{$comment.AUTHOR}</span> - {$comment.DATE}</p>
+ <blockquote>{$comment.CONTENT}</blockquote>
</div>
- <!-- END comment -->
+ {/foreach}
+ {/if}
- <!-- BEGIN add_comment -->
- <form method="post" action="{U_ADD_COMMENT}" class="filter" id="addComment">
+ {if isset($comment_add)}
+ <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
<fieldset>
- <legend>{lang:comments_add}</legend>
- <!-- BEGIN author_field -->
- <label>{lang:upload_author}<input type="text" name="author"></label>
- <!-- END author_field -->
- <label>{lang:comment}<textarea name="content" rows="5" cols="80">{comments.add_comment.CONTENT}</textarea></label>
- <input type="hidden" name="key" value="{comments.add_comment.KEY}" />
- <input class="submit" type="submit" value="{lang:submit}">
+ <legend>{'comments_add'|@translate}</legend>
+ {if $comment_add.SHOW_AUTHOR}
+ <label>{'upload_author'|@translate}<input type="text" name="author"></label>
+ {/if}
+ <label>{'comment'|@translate}<textarea name="content" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
+ <input type="hidden" name="key" value="{$comment_add.KEY}" />
+ <input class="submit" type="submit" value="{'submit'|@translate}">
</fieldset>
</form>
- <!-- END add_comment -->
+ {/if}
</div>
-<!-- END comments -->
+{/if} {*comments*}
diff --git a/template/yoga/picture_nav_buttons.tpl b/template/yoga/picture_nav_buttons.tpl
index 4041f7b42..f82f5f467 100644
--- a/template/yoga/picture_nav_buttons.tpl
+++ b/template/yoga/picture_nav_buttons.tpl
@@ -1,90 +1,101 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div class="navButtons">
- <!-- BEGIN last -->
- <a class="navButton prev" href="{last.U_IMG}" title="{lang:last_page} : {last.TITLE_IMG}" rel="last"><img src="{pwg_root}{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a>
- <!-- END last -->
- <!-- BEGIN last_unactive -->
- <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/last_unactive.png" class="button" alt=""></a>
- <!-- END last_unactive -->
- <!-- BEGIN next -->
- <a class="navButton next" href="{next.U_IMG}" title="{lang:next_page} : {next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a>
- <!-- END next -->
- <!-- BEGIN next_unactive -->
- <a class="navButton next"><img src="{pwg_root}{themeconf:icon_dir}/right_unactive.png" class="button" alt=""></a>
- <!-- END next_unactive -->
- <!-- BEGIN start_play -->
- <a class="navButton play" href="{start_play.U_IMG}" title="{lang:start_play}" rel="play"><img src="{pwg_root}{themeconf:icon_dir}/play.png" class="button" alt="{lang:start_play}"></a>
- <!-- END start_play -->
- <!-- BEGIN stop_play -->
- <a class="navButton play" href="{stop_play.U_IMG}" title="{lang:stop_play}" rel="play"><img src="{pwg_root}{themeconf:icon_dir}/pause.png" class="button" alt="{lang:stop_play}"></a>
- <!-- END stop_play -->
- <!-- BEGIN up -->
- <a class="navButton up" href="{up.U_URL}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{lang:thumbnails}"></a>
- <!-- END up -->
- <!-- BEGIN previous -->
- <a class="navButton prev" href="{previous.U_IMG}" title="{lang:previous_page} : {previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a>
- <!-- END previous -->
- <!-- BEGIN previous_unactive -->
- <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/left_unactive.png" class="button" alt=""></a>
- <!-- END previous_unactive -->
- <!-- BEGIN first -->
- <a class="navButton prev" href="{first.U_IMG}" title="{lang:first_page} : {first.TITLE_IMG}" rel="first"><img src="{pwg_root}{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a>
- <!-- END first -->
- <!-- BEGIN first_unactive -->
- <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/first_unactive.png" class="button" alt=""></a>
- <!-- END first_unactive -->
- <!-- BEGIN start_repeat -->
- <a class="navButton repeat" href="{start_repeat.U_IMG}" title="{lang:start_repeat}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/start_repeat.png" class="button" alt="{lang:start_repeat}"></a>
- <!-- END start_repeat -->
- <!-- BEGIN stop_repeat -->
- <a class="navButton repeat" href="{stop_repeat.U_IMG}" title="{lang:stop_repeat}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/stop_repeat.png" class="button" alt="{lang:stop_repeat}"></a>
- <!-- END stop_repeat -->
- <!-- BEGIN inc_period -->
- <a class="navButton inc_period" href="{inc_period.U_IMG}" title="{lang:inc_period}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/inc_period.png" class="button" alt="{lang:inc_period}"></a>
- <!-- END inc_period -->
- <!-- BEGIN inc_period_unactive -->
- <a class="navButton inc_period" <img src="{pwg_root}{themeconf:icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
- <!-- END inc_period_unactive -->
- <!-- BEGIN dec_period -->
- <a class="navButton dec_period" href="{dec_period.U_IMG}" title="{lang:dec_period}" rel="repeat"><img src="{pwg_root}{themeconf:icon_dir}/dec_period.png" class="button" alt="{lang:dec_period}"></a>
- <!-- END dec_period -->
- <!-- BEGIN dec_period_unactive -->
- <a class="navButton dec_period" <img src="{pwg_root}{themeconf:icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
- <!-- END dec_period_unactive -->
+
+{if isset($last)}
+ <a class="navButton prev" href="{$last.U_IMG}" title="{'last_page'|@translate} : {$last.TITLE}" rel="last"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last.png" class="button" alt="{'last_page'|@translate}"></a>
+{else}
+ <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
+{/if}
+
+{if isset($next)}
+ <a class="navButton next" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" class="button" alt="{'next_page'|@translate}"></a>
+{else}
+ <a class="navButton next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_unactive.png" class="button" alt=""></a>
+{/if}
+
+{if isset($slideshow.U_START_PLAY)}
+ <a class="navButton play" href="{$slideshow.U_START_PLAY}" title="{'start_play'|@translate}" rel="play"><img src="{$ROOT_URL}{$themeconf.icon_dir}/play.png" class="button" alt="{'start_play'|@translate}"></a>
+{/if}
+
+{if isset($slideshow.U_STOP_PLAY)}
+ <a class="navButton play" href="{$slideshow.U_STOP_PLAY}" title="{'stop_play'|@translate}" rel="play"><img src="{$ROOT_URL}{$themeconf.icon_dir}/pause.png" class="button" alt="{'stop_play'|@translate}"></a>
+{/if}
+
+{if isset($U_UP) and !isset($slideshow)}
+ <a class="navButton up" href="{$U_UP}" title="{'thumbnails'|@translate}" rel="up"><img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png" class="button" alt="{'thumbnails'|@translate}"></a>
+{/if}
+
+{if isset($previous)}
+ <a class="navButton prev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" class="button" alt="{'previous_page'|@translate}"></a>
+{else}
+ <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
+{/if}
+
+{if isset($first)}
+ <a class="navButton prev" href="{$first.U_IMG}" title="{'first_page'|@translate} : {$first.TITLE}" rel="first"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first.png" class="button" alt="{'first_page'|@translate}"></a>
+{else}
+ <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_unactive.png" class="button" alt=""></a>
+{/if}
+
+
+{if isset($slideshow.U_START_REPEAT)}
+ <a class="navButton repeat" href="{$slideshow.U_START_REPEAT}" title="{'start_repeat'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_repeat.png" class="button" alt="{'start_repeat'|@translate}"></a>
+{/if}
+
+{if isset($slideshow.U_STOP_REPEAT)}
+ <a class="navButton repeat" href="{$slideshow.U_STOP_REPEAT}" title="{'stop_repeat'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_repeat.png" class="button" alt="{'stop_repeat'|@translate}"></a>
+{/if}
+
+{if isset($slideshow)}
+{if isset($slideshow.U_INC_PERIOD)}
+ <a class="navButton inc_period" href="{$slideshow.U_INC_PERIOD}" title="{'inc_period'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period.png" class="button" alt="{'inc_period'|@translate}"></a>
+{else}
+ <a class="navButton inc_period"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
+{/if}
+
+{if isset($slideshow.U_DEC_PERIOD)}
+ <a class="navButton dec_period" href="{$slideshow.U_DEC_PERIOD}" title="{'dec_period'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period.png" class="button" alt="{'dec_period'|@translate}"></a>
+{else}
+ <a class="navButton dec_period"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
+{/if}
+{/if}
+
</div>
<script type="text/javascript">
+{literal}
function keyboardNavigation(e)
{
- if(!e) var e=window.event;
- if (e.altKey) return true;
- var target = e.target || e.srcElement;
- if (target && target.type) return true; //an input editable element
- var keyCode=e.keyCode || e.which;
- var docElem = document.documentElement;
- switch(keyCode) {
-<!-- BEGIN next -->
- case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){window.location="{next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
-<!-- END next -->
-<!-- BEGIN previous -->
- case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ window.location="{previous.U_IMG}".replace("&amp;","&"); return false; } break;
-<!-- END previous -->
-<!-- BEGIN first -->
- /*Home*/case 36: if (e.ctrlKey){window.location="{first.U_IMG}".replace("&amp;","&"); return false; } break;
-<!-- END first -->
-<!-- BEGIN last -->
- /*End*/case 35: if (e.ctrlKey){window.location="{last.U_IMG}".replace("&amp;","&"); return false; } break;
-<!-- END last -->
-<!-- BEGIN up -->
- /*Up*/case 38: if (e.ctrlKey){window.location="{up.U_UP}".replace("&amp;","&"); return false; } break;
-<!-- END up -->
-<!-- BEGIN start_play -->
- /*Pause*/case 32: {window.location="{start_play.U_IMG}".replace("&amp;","&"); return false; } break;
-<!-- END start_play -->
-<!-- BEGIN stop_play -->
- /*Play*/case 32: {window.location="{stop_play.U_IMG}".replace("&amp;","&"); return false; } break;
-<!-- END stop_play -->
+ if(!e) var e=window.event;
+ if (e.altKey) return true;
+ var target = e.target || e.srcElement;
+ if (target && target.type) return true; //an input editable element
+ var keyCode=e.keyCode || e.which;
+ var docElem = document.documentElement;
+ switch(keyCode) {
+{/literal}
+{if isset($next)}
+ case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
+{/if}
+{if isset($previous)}
+ case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($first)}
+ /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($last)}
+ /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($U_UP) and !isset($slideshow)}
+ /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+
+{if isset($slideshow.U_START_PLAY)}
+ /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($slideshow.U_STOP_PLAY)}
+ /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
}
return true;
}
diff --git a/template/yoga/slideshow.tpl b/template/yoga/slideshow.tpl
index d55518eed..1bbc0029f 100644
--- a/template/yoga/slideshow.tpl
+++ b/template/yoga/slideshow.tpl
@@ -1,24 +1,23 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id$ -->
+{* $Id$ *}
<div id="imageHeaderBar">
<div class="browsePath">
- <!-- BEGIN stop_slideshow -->
- [ <a href="{stop_slideshow.U_SLIDESHOW}">{lang:slideshow_stop}</a> ]
- <!-- END stop_slideshow -->
+ {if isset($U_SLIDESHOW_STOP) }
+ [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
+ {/if}
</div>
- <div class="imageNumber">{PHOTO}</div>
- <!-- BEGIN title -->
- <h2 class="showtitle">{TITLE}</h2>
- <!-- END title -->
+ <div class="imageNumber">{$PHOTO}</div>
+ {if $SHOW_PICTURE_NAME_ON_TITLE }
+ <h2 class="showtitle">{$current.TITLE}</h2>
+ {/if}
</div>
<div id="imageToolBar">
- {NAV_BUTTONS}
+ {include file=$FILE_PICTURE_NAV_BUTTONS}
</div>
<div id="theImage">
- {ELEMENT_CONTENT}
- <!-- BEGIN legend -->
- <p class="showlegend">{legend.COMMENT_IMG}</p>
- <!-- END legend -->
+ {$ELEMENT_CONTENT}
+ {if isset($COMMENT_IMG)}
+ <p class="showlegend">{$COMMENT_IMG}</p>
+ {/if}
</div>