aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/category_default.inc.php18
-rw-r--r--include/config_default.inc.php20
-rw-r--r--include/functions.inc.php4
-rw-r--r--include/functions_picture.inc.php108
-rw-r--r--index.php23
-rw-r--r--install/db/67-database.php51
-rw-r--r--language/en_UK/common.lang.php8
-rw-r--r--language/es_ES/common.lang.php9
-rw-r--r--language/fr_FR/common.lang.php8
-rw-r--r--language/nl_NL/common.lang.php9
-rw-r--r--picture.php186
-rw-r--r--plugins/c13y_upgrade/initialize.inc.php53
-rw-r--r--plugins/c13y_upgrade/language/en_UK/plugin.lang.php9
-rw-r--r--plugins/c13y_upgrade/language/es_ES/plugin.lang.php8
-rw-r--r--plugins/c13y_upgrade/language/fr_FR/plugin.lang.php8
-rw-r--r--template/yoga/icon/dec_period.pngbin0 -> 1087 bytes
-rw-r--r--template/yoga/icon/dec_period_unactive.pngbin0 -> 1169 bytes
-rw-r--r--template/yoga/icon/inc_period.pngbin0 -> 1209 bytes
-rw-r--r--template/yoga/icon/inc_period_unactive.pngbin0 -> 1255 bytes
-rw-r--r--template/yoga/icon/pause.pngbin0 -> 1597 bytes
-rw-r--r--template/yoga/icon/play.pngbin0 -> 1568 bytes
-rw-r--r--template/yoga/icon/slideshow.pngbin1229 -> 1264 bytes
-rw-r--r--template/yoga/icon/start_repeat.pngbin0 -> 1691 bytes
-rw-r--r--template/yoga/icon/stop_repeat.pngbin0 -> 1683 bytes
-rw-r--r--template/yoga/icon/stop_slideshow.pngbin0 -> 1245 bytes
-rw-r--r--template/yoga/index.tpl4
-rw-r--r--template/yoga/picture.tpl104
-rw-r--r--template/yoga/picture_nav_buttons.tpl91
-rw-r--r--template/yoga/slideshow.tpl11
29 files changed, 574 insertions, 158 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index ef029eee6..402df757b 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.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$
@@ -66,6 +66,22 @@ if (count($pictures) > 0)
$template->assign_block_vars('thumbnails.line', array());
// current row displayed
$row_number = 0;
+
+ // define category slideshow url
+ $row = reset($pictures);
+ $page['cat_slideshow_url'] =
+ add_url_params(
+ duplicate_picture_url(
+ array(
+ 'image_id' => $row['id'],
+ 'image_file' => $row['file']
+ ),
+ array('start')
+ ),
+ array('slideshow' =>
+ (isset($_GET['slideshow']) ? $_GET['slideshow']
+ : '' ))
+ );
}
trigger_action('loc_begin_index_thumbnails', $pictures);
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 6a294236c..67369119e 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.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$
@@ -66,10 +66,6 @@
// the date_available
$conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC';
-// slideshow_period : waiting time in seconds before loading a new page
-// during automated slideshow
-$conf['slideshow_period'] = 4;
-
// file_ext : file extensions (case sensitive) authorized
$conf['file_ext'] = array('jpg','JPG','jpeg','JPEG',
'png','PNG','gif','GIF','mpg','zip',
@@ -692,8 +688,20 @@ $conf['filter_pages'] = array
);
// +-----------------------------------------------------------------------+
-// | Light slideshow |
+// | Slideshow |
// +-----------------------------------------------------------------------+
+// slideshow_period : waiting time in seconds before loading a new page
+// during automated slideshow
+// slideshow_period_min, slideshow_period_max are bounds of slideshow_period
+// slideshow_period_step is the step of navigation between min and max
+$conf['slideshow_period_min'] = 1;
+$conf['slideshow_period_max'] = 10;
+$conf['slideshow_period_step'] = 1;
+$conf['slideshow_period'] = 4;
+
+// slideshow_repeat : slideshow loops on pictures
+$conf['slideshow_repeat'] = true;
+
// $conf['light_slideshow'] indicates to use slideshow.tpl in state of
// picture.tpl for slideshow
// Take care to have slideshow.tpl in all available templates
diff --git a/include/functions.inc.php b/include/functions.inc.php
index afc91c9c2..243f2481b 100644
--- a/include/functions.inc.php
+++ b/include/functions.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$
@@ -749,6 +749,8 @@ function redirect_http( $url )
{
ob_clean();
}
+ // default url is on html format
+ $url = html_entity_decode($url);
header('Request-URI: '.$url);
header('Content-Location: '.$url);
header('Location: '.$url);
diff --git a/include/functions_picture.inc.php b/include/functions_picture.inc.php
index d11574b57..13a09834d 100644
--- a/include/functions_picture.inc.php
+++ b/include/functions_picture.inc.php
@@ -1,7 +1,7 @@
<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -223,4 +223,110 @@ function get_download_url($what_part, $element_info)
return trigger_event( 'get_download_url', $url, $element_info);
}
+/*
+ * get slideshow default params into array
+ *
+ * @param void
+ *
+ * @return slideshow default values into array
+ */
+function get_default_slideshow_params()
+{
+ global $conf;
+
+ return array(
+ 'period' => $conf['slideshow_period'],
+ 'repeat' => $conf['slideshow_repeat'],
+ 'play' => true,
+ );
+}
+
+/*
+ * check and correct slideshow params from array
+ *
+ * @param array of params
+ *
+ * @return slideshow corrected values into array
+ */
+function correct_slideshow_params($params = array())
+{
+ global $conf;
+
+ if ($params['period'] < $conf['slideshow_period_min'])
+ {
+ $params['period'] = $conf['slideshow_period_min'];
+ }
+ else if ($params['period'] > $conf['slideshow_period_max'])
+ {
+ $params['period'] = $conf['slideshow_period_max'];
+ }
+
+ return $params;
+}
+
+/*
+ * Decode slideshow string params into array
+ *
+ * @param string params like ""
+ *
+ * @return slideshow values into array
+ */
+function decode_slideshow_params($encode_params = null)
+{
+ global $conf;
+
+ $result = get_default_slideshow_params();
+
+ if (is_numeric($encode_params))
+ {
+ $result['period'] = $encode_params;
+ }
+ else
+ {
+ $matches = array();
+ if (preg_match_all('/([a-z]+)-(\d+)/', $encode_params, $matches))
+ {
+ $matchcount = count($matches[1]);
+ for ($i = 0; $i < $matchcount; $i++)
+ {
+ $result[$matches[1][$i]] = $matches[2][$i];
+ }
+ }
+
+ if (preg_match_all('/([a-z]+)-(true|false)/', $encode_params, $matches))
+ {
+ $matchcount = count($matches[1]);
+ for ($i = 0; $i < $matchcount; $i++)
+ {
+ $result[$matches[1][$i]] = get_boolean($matches[2][$i]);
+ }
+ }
+ }
+
+ return correct_slideshow_params($result);
+}
+
+/*
+ * Encode slideshow array params into array
+ *
+ * @param array params
+ *
+ * @return slideshow values into string
+ */
+function encode_slideshow_params($decode_params = array())
+{
+ global $conf;
+
+ $params = array_diff_assoc(correct_slideshow_params($decode_params), get_default_slideshow_params());
+ $result = '';
+
+ foreach ($params as $name => $value)
+ {
+ // boolean_to_string return $value, if it's not a bool
+ $result .= '+'.$name.'-'.boolean_to_string($value);
+ }
+
+ return $result;
+}
+
?>
diff --git a/index.php b/index.php
index 3a084147e..815b9376c 100644
--- a/index.php
+++ b/index.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$
@@ -67,7 +67,7 @@ if (isset($page['category']))
check_restrictions($page['category']['id']);
}
-if ( count($page['items']) > $user['nb_image_page'])
+if (count($page['items']) > $user['nb_image_page'])
{
$page['navigation_bar'] = create_navigation_bar(
duplicate_index_url(array(), array('start')),
@@ -99,7 +99,7 @@ $page['body_id'] = 'theCategoryPage';
$template->set_filenames( array('index'=>'index.tpl') );
//-------------------------------------------------------------- category title
$template_title = $page['title'];
-if ( count($page['items']) > 0)
+if (count($page['items']) > 0)
{
$template_title.= ' ['.count($page['items']).']';
}
@@ -192,7 +192,7 @@ if (isset($page['category']) and is_admin())
);
}
-if (is_admin() and !empty($page['items']) )
+if (is_admin() and !empty($page['items']))
{
$template->assign_block_vars(
'caddie',
@@ -262,6 +262,21 @@ if ( !empty($page['items']) )
}
//------------------------------------------------------- category informations
+// slideshow
+// execute after init thumbs in order to have all picture informations
+if (!empty($page['cat_slideshow_url']))
+{
+ if (isset($_GET['slideshow']))
+ {
+ redirect($page['cat_slideshow_url']);
+ }
+ else
+ {
+ $template->assign_block_vars(
+ 'slideshow', array('URL' => $page['cat_slideshow_url']));
+ }
+}
+
// navigation bar
if ($page['navigation_bar'] != '')
{
diff --git a/install/db/67-database.php b/install/db/67-database.php
new file mode 100644
index 000000000..8162f73d8
--- /dev/null
+++ b/install/db/67-database.php
@@ -0,0 +1,51 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file : $Id$
+// | last update : $Date$
+// | last modifier : $Author$
+// | revision : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+ die('Hacking attempt!');
+}
+
+$upgrade_description = 'Uninstall dew plugin';
+
+include_once(PHPWG_ROOT_PATH.'include/constants.php');
+
+// +-----------------------------------------------------------------------+
+// | Upgrade content |
+// +-----------------------------------------------------------------------+
+
+$query = "
+delete from ".PLUGINS_TABLE." where id ='dew';
+";
+pwg_query($query);
+
+echo
+"\n"
+.'"'.$upgrade_description.'"'.' ended'
+."\n"
+;
+
+?>
diff --git a/language/en_UK/common.lang.php b/language/en_UK/common.lang.php
index dd23da6d5..23a7c8e1c 100644
--- a/language/en_UK/common.lang.php
+++ b/language/en_UK/common.lang.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$
@@ -382,5 +382,11 @@ $lang['reg_err_mail_address_dbl'] = 'a user use already this mail address';
$lang['Category results for'] = 'Category results for';
$lang['Tag results for'] = 'Tag results for';
$lang['from %s to %s'] = 'from %s to %s';
+$lang['start_play'] = 'Play of slideshow';
+$lang['stop_play'] = 'Pause of slideshow';
+$lang['start_repeat'] = 'Repeat the slideshow';
+$lang['stop_repeat'] = 'Not repeat the slideshow';
+$lang['inc_period'] = 'Increase waiting between pictures';
+$lang['dec_period'] = 'Decrease waiting between pictures';
?> \ No newline at end of file
diff --git a/language/es_ES/common.lang.php b/language/es_ES/common.lang.php
index 1e03c9b98..e8e312ca7 100644
--- a/language/es_ES/common.lang.php
+++ b/language/es_ES/common.lang.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 : $ $
// | last update : $2007-10-12 (ven., 12 oct. 2007)) $
@@ -381,4 +381,11 @@ $lang['reg_err_mail_address_dbl'] = 'Un utilizador ya utiliza esta dirección e-
$lang['Category results for'] = 'Los resultados de las categorías para';
$lang['Tag results for'] = 'Los resultados de los tags para';
$lang['from %s to %s'] = 'de %s a %s';
+/* TODO */ $lang['start_play'] = 'Play of slideshow';
+/* TODO */ $lang['stop_play'] = 'Pause of slideshow';
+/* TODO */ $lang['start_repeat'] = 'Repeat the slideshow';
+/* TODO */ $lang['stop_repeat'] = 'Not repeat the slideshow';
+/* TODO */ $lang['inc_period'] = 'Increase waiting between pictures';
+/* TODO */ $lang['dec_period'] = 'Decrease waiting between pictures';
+
?> \ No newline at end of file
diff --git a/language/fr_FR/common.lang.php b/language/fr_FR/common.lang.php
index 46507322f..8efc46286 100644
--- a/language/fr_FR/common.lang.php
+++ b/language/fr_FR/common.lang.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$
@@ -381,5 +381,11 @@ $lang['reg_err_mail_address_dbl'] = 'un utilisateur utilise déjà cette adresse
$lang['Category results for'] = 'Résultats des catégories pour';
$lang['Tag results for'] = 'Résultats des tags pour';
$lang['from %s to %s'] = 'de %s à %s';
+$lang['start_play'] = 'Lecture du diaporama';
+$lang['stop_play'] = 'Pause du diaporama';
+$lang['start_repeat'] = 'Répeter le diaporama';
+$lang['stop_repeat'] = 'Ne pas répeter le diaporama';
+$lang['inc_period'] = 'Augmenter l\'attente entre les images';
+$lang['dec_period'] = 'Diminuer l\'attente entre les images';
?> \ No newline at end of file
diff --git a/language/nl_NL/common.lang.php b/language/nl_NL/common.lang.php
index efe9f27a5..188e26f6f 100644
--- a/language/nl_NL/common.lang.php
+++ b/language/nl_NL/common.lang.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$
@@ -382,4 +382,11 @@ $lang['reg_err_mail_address_dbl'] = 'Een andere gebruiker maakt al gebruik van d
$lang['Category results for'] = 'Categorie resultaten voor';
$lang['Tag results for'] = 'Tag resultaten voor';
$lang['from %s to %s'] = 'van %s tot %s';
+/* TODO */ $lang['start_play'] = 'Play of slideshow';
+/* TODO */ $lang['stop_play'] = 'Pause of slideshow';
+/* TODO */ $lang['start_repeat'] = 'Repeat the slideshow';
+/* TODO */ $lang['stop_repeat'] = 'Not repeat the slideshow';
+/* TODO */ $lang['inc_period'] = 'Increase waiting between pictures';
+/* TODO */ $lang['dec_period'] = 'Decrease waiting between pictures';
+
?> \ No newline at end of file
diff --git a/picture.php b/picture.php
index ad8f67700..26e461daf 100644
--- a/picture.php
+++ b/picture.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$
@@ -78,7 +78,7 @@ function default_picture_content($content, $element_info)
array('default_content'=>'picture_content.tpl')
);
- if ( !isset($page['slideshow']) and isset($element_info['high_url']) )
+ if ( !$page['slideshow'] and isset($element_info['high_url']) )
{
$uuid = uniqid(rand());
$template->assign_block_vars(
@@ -424,38 +424,65 @@ $url_admin =
.'&amp;image_id='.$page['image_id']
;
-$url_slide = add_url_params(
- $picture['current']['url'],
- array( 'slideshow'=>$conf['slideshow_period'] )
- );
-
+$slideshow_params = array();
+$slideshow_url_params = array();
-$template->set_filename('picture', 'picture.tpl');
-if ( isset( $_GET['slideshow'] ) )
+if (isset($_GET['slideshow']))
{
- $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
$page['slideshow'] = true;
- if ( $conf['light_slideshow'] )
- { // Change template file
- // Add local-slideshow.css file if exists
- $template->set_filename('picture', 'slideshow.tpl');
- $css = get_root_url() . get_themeconf('template_dir') . '/theme/'
- . get_themeconf('theme') . '/local-slideshow.css';
- if (file_exists($css))
+ $page['meta_robots'] = array('noindex'=>1, 'nofollow'=>1);
+
+ $slideshow_params = decode_slideshow_params($_GET['slideshow']);
+ $slideshow_url_params['slideshow'] = encode_slideshow_params($slideshow_params);
+
+ if ($slideshow_params['play'])
+ {
+ $id_pict_redirect = '';
+ if (isset($page['next_item']))
+ {
+ $id_pict_redirect = 'next';
+ }
+ else
{
- $template->assign_block_vars('slideshow', array());
+ if ($slideshow_params['repeat'] and isset($page['first_item']))
+ {
+ $id_pict_redirect = 'first';
+ }
+ }
+
+ if (!empty($id_pict_redirect))
+ {
+ // $redirect_msg, $refresh, $url_link and $title are required for creating
+ // an automated refresh page in header.tpl
+ $refresh = $slideshow_params['period'];
+ $url_link = add_url_params(
+ $picture[$id_pict_redirect]['url'],
+ $slideshow_url_params
+ );
+ $redirect_msg = nl2br(l10n('redirect_msg'));
}
}
- if ( isset($page['next_item']) )
+}
+else
+{
+ $page['slideshow'] = false;
+}
+
+$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))
{
- // $redirect_msg, $refresh, $url_link and $title are required for creating
- // an automated refresh page in header.tpl
- $refresh= $_GET['slideshow'];
- $url_link = add_url_params(
- $picture['next']['url'],
- array('slideshow'=>$refresh)
- );
- $redirect_msg = nl2br(l10n('redirect_msg'));
+ $template->assign_block_vars('slideshow', array());
}
}
@@ -514,7 +541,10 @@ foreach (array('first','previous','next','last') as $which_image)
array(
'TITLE_IMG' => $picture[$which_image]['name'],
'IMG' => $picture[$which_image]['thumbnail'],
- 'U_IMG' => $picture[$which_image]['url'],
+ // Params slideshow was transmit to navigation buttons
+ 'U_IMG' =>
+ add_url_params(
+ $picture[$which_image]['url'], $slideshow_url_params)
)
);
}
@@ -527,6 +557,85 @@ foreach (array('first','previous','next','last') as $which_image)
}
}
+
+if ($page['slideshow'])
+{
+ //slideshow end
+ $template->assign_block_vars(
+ 'stop_slideshow',
+ array(
+ 'U_SLIDESHOW' => $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' =>
+ add_url_params(
+ $picture['current']['url'],
+ array('slideshow' =>
+ encode_slideshow_params(
+ array_merge($slideshow_params,
+ array($p => ! $slideshow_params[$p]))
+ )
+ )
+ )
+ )
+ );
+ }
+
+ foreach (array('dec', 'inc') as $op)
+ {
+ $new_period = $slideshow_params['period'] + ((($op == 'dec') ? -1 : 1) * $conf['slideshow_period_step']);
+ $new_slideshow_params =
+ correct_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' =>
+ add_url_params(
+ $picture['current']['url'],
+ array('slideshow' => encode_slideshow_params($new_slideshow_params)
+ )
+ )
+ )
+ );
+ }
+ else
+ {
+ $template->assign_block_vars(
+ $block_period.'_unactive',
+ array()
+ );
+ }
+ }
+}
+else
+{
+ $template->assign_block_vars(
+ 'start_slideshow',
+ array(
+ 'U_SLIDESHOW' =>
+ add_url_params(
+ $picture['current']['url'],
+ array( 'slideshow'=>''))
+ )
+ );
+ $template->assign_block_vars(
+ 'thumbnails',array('U_UP' => $url_up));
+}
+
$template->assign_vars(
array(
'SECTION_TITLE' => $page['title'],
@@ -537,10 +646,8 @@ $template->assign_vars(
'LEVEL_SEPARATOR' => $conf['level_separator'],
'U_HOME' => make_index_url(),
- 'U_UP' => $url_up,
'U_METADATA' => $url_metadata,
'U_ADMIN' => $url_admin,
- 'U_SLIDESHOW'=> $url_slide,
'U_ADD_COMMENT' => $url_self,
)
);
@@ -642,7 +749,7 @@ if ( is_admin() )
}
//--------------------------------------------------------- picture information
-$header_infos = array(); //for html header use
+$header_infos = array(); //for html header use
// legend
if (isset($picture['current']['comment'])
and !empty($picture['current']['comment']))
@@ -789,21 +896,8 @@ foreach ($related_categories as $category)
);
}
-//slideshow end
-if (isset($_GET['slideshow']))
-{
- if (!is_numeric($_GET['slideshow']))
- {
- $_GET['slideshow'] = $conf['slideshow_period'];
- }
-
- $template->assign_block_vars(
- 'stop_slideshow',
- array(
- 'U_SLIDESHOW' => $picture['current']['url'],
- )
- );
-}
+// 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)
diff --git a/plugins/c13y_upgrade/initialize.inc.php b/plugins/c13y_upgrade/initialize.inc.php
index 7f0accc43..24de4d9cf 100644
--- a/plugins/c13y_upgrade/initialize.inc.php
+++ b/plugins/c13y_upgrade/initialize.inc.php
@@ -41,10 +41,14 @@ function c13y_upgrade()
/* Check user with same e-mail */
$query = '
-select count(*)
-from '.USERS_TABLE.'
-where '.$conf['user_fields']['email'].' is not null
-group by upper('.$conf['user_fields']['email'].')
+select
+ count(*)
+from
+ '.USERS_TABLE.'
+where
+ '.$conf['user_fields']['email'].' is not null
+group by
+ upper('.$conf['user_fields']['email'].')
having count(*) > 1
limit 0,1
;';
@@ -53,12 +57,49 @@ limit 0,1
{
$can_be_deactivate = false;
add_c13y(
- l10n('c13y_exif_dbl_email_user'),
+ l10n('c13y_dbl_email_user'),
null,
null,
- l10n('c13y_exif_correction_dbl_email_user'));
+ l10n('c13y_correction_dbl_email_user'));
}
+ /* Check plugin included in Piwigo sources */
+ $included_plugins = array('dew');
+ $query = '
+select
+ id
+from
+ '.PLUGINS_TABLE.'
+where
+ id in ('.
+ implode(
+ ',',
+ array_map(
+ create_function('$s', 'return "\'".$s."\'";'),
+ $included_plugins
+ )
+ )
+ .')
+;';
+
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_assoc($result))
+ {
+ $can_be_deactivate = false;
+
+ $uninstall_msg_link =
+ '<a href="'.
+ PHPWG_ROOT_PATH.
+ 'admin.php?page=plugins&amp;plugin='.$row['id'].'&amp;action=uninstall'.
+ '" onclick="window.open(this.href, \'\'); return false;">'.
+ sprintf(l10n('c13y_correction_obsolete_plugin'), $row['id']).'</a>';
+
+ add_c13y(
+ l10n('c13y_obsolete_plugin'),
+ null,
+ null,
+ $uninstall_msg_link);
+ }
/* Check if this plugin must deactivate */
if ($can_be_deactivate)
diff --git a/plugins/c13y_upgrade/language/en_UK/plugin.lang.php b/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
index d8db86284..90a712369 100644
--- a/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
+++ b/plugins/c13y_upgrade/language/en_UK/plugin.lang.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$
@@ -27,6 +27,9 @@
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
$lang['c13y_upgrade_no_anomaly'] = 'No anomaly detected after application upgrade';
$lang['c13y_upgrade_deactivate'] = 'You can deactivate "Check upgrades" plugin';
-$lang['c13y_exif_dbl_email_user'] = 'Users with same email address';
-$lang['c13y_exif_correction_dbl_email_user'] = 'Delete duplicate users';
+$lang['c13y_dbl_email_user'] = 'Users with same email address';
+$lang['c13y_correction_dbl_email_user'] = 'Delete duplicate users';
+$lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
+$lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
+
?>
diff --git a/plugins/c13y_upgrade/language/es_ES/plugin.lang.php b/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
index ebe427afe..45e5d5c5e 100644
--- a/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
+++ b/plugins/c13y_upgrade/language/es_ES/plugin.lang.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$
@@ -27,7 +27,9 @@
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
$lang['c13y_upgrade_no_anomaly'] = 'Ninguna anomalía detectada después de la puesta al día de la aplicación';
$lang['c13y_upgrade_deactivate'] = 'Usted puede desactivar el plugin Check upgrades';
-$lang['c13y_exif_dbl_email_user'] = 'Utilizadores con la misma dirección e-mail';
-$lang['c13y_exif_correction_dbl_email_user'] = 'Suprima a los utilizadores en duplicado';
+$lang['c13y_dbl_email_user'] = 'Utilizadores con la misma dirección e-mail';
+$lang['c13y_correction_dbl_email_user'] = 'Suprima a los utilizadores en duplicado';
+/* TODO */ $lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
+/* TODO */ $lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
?>
diff --git a/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php b/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
index 512b8f5e6..bacf03e71 100644
--- a/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
+++ b/plugins/c13y_upgrade/language/fr_FR/plugin.lang.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$
@@ -27,7 +27,9 @@
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
$lang['c13y_upgrade_no_anomaly'] = 'Pas d\'anomalie détectée après la mise à jour de l\'application';
$lang['c13y_upgrade_deactivate'] = 'Vous pouvez désactiver le plugin "Check upgrades"';
-$lang['c13y_exif_dbl_email_user'] = 'Utilisateurs avec la même adresse email';
-$lang['c13y_exif_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double';
+$lang['c13y_dbl_email_user'] = 'Utilisateurs avec la même adresse email';
+$lang['c13y_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double';
+$lang['c13y_obsolete_plugin'] = 'Plugin obsolète';
+$lang['c13y_correction_obsolete_plugin'] = 'Le plugin "%s" a été inclus dans cette version de l\'application et vous devez le désinstaller.';
?>
diff --git a/template/yoga/icon/dec_period.png b/template/yoga/icon/dec_period.png
new file mode 100644
index 000000000..1e2425e78
--- /dev/null
+++ b/template/yoga/icon/dec_period.png
Binary files differ
diff --git a/template/yoga/icon/dec_period_unactive.png b/template/yoga/icon/dec_period_unactive.png
new file mode 100644
index 000000000..1df2f1bc3
--- /dev/null
+++ b/template/yoga/icon/dec_period_unactive.png
Binary files differ
diff --git a/template/yoga/icon/inc_period.png b/template/yoga/icon/inc_period.png
new file mode 100644
index 000000000..c750a9dfc
--- /dev/null
+++ b/template/yoga/icon/inc_period.png
Binary files differ
diff --git a/template/yoga/icon/inc_period_unactive.png b/template/yoga/icon/inc_period_unactive.png
new file mode 100644
index 000000000..ac1c7ca03
--- /dev/null
+++ b/template/yoga/icon/inc_period_unactive.png
Binary files differ
diff --git a/template/yoga/icon/pause.png b/template/yoga/icon/pause.png
new file mode 100644
index 000000000..6a3928c51
--- /dev/null
+++ b/template/yoga/icon/pause.png
Binary files differ
diff --git a/template/yoga/icon/play.png b/template/yoga/icon/play.png
new file mode 100644
index 000000000..dfde7e96a
--- /dev/null
+++ b/template/yoga/icon/play.png
Binary files differ
diff --git a/template/yoga/icon/slideshow.png b/template/yoga/icon/slideshow.png
index 455d73fdf..0d5c80713 100644
--- a/template/yoga/icon/slideshow.png
+++ b/template/yoga/icon/slideshow.png
Binary files differ
diff --git a/template/yoga/icon/start_repeat.png b/template/yoga/icon/start_repeat.png
new file mode 100644
index 000000000..74272979e
--- /dev/null
+++ b/template/yoga/icon/start_repeat.png
Binary files differ
diff --git a/template/yoga/icon/stop_repeat.png b/template/yoga/icon/stop_repeat.png
new file mode 100644
index 000000000..f1cc1b564
--- /dev/null
+++ b/template/yoga/icon/stop_repeat.png
Binary files differ
diff --git a/template/yoga/icon/stop_slideshow.png b/template/yoga/icon/stop_slideshow.png
new file mode 100644
index 000000000..120466a0b
--- /dev/null
+++ b/template/yoga/icon/stop_slideshow.png
Binary files differ
diff --git a/template/yoga/index.tpl b/template/yoga/index.tpl
index 534031493..a388d904b 100644
--- a/template/yoga/index.tpl
+++ b/template/yoga/index.tpl
@@ -27,6 +27,10 @@
<li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
<!-- END search_rules -->
+ <!-- BEGIN slideshow -->
+ <li><a href="{slideshow.URL}" title="{lang:slideshow}"><img src="{pwg_root}{themeconf:icon_dir}/slideshow.png" class="button" alt="{lang:slideshow}"/></a></li>
+ <!-- END slideshow -->
+
<!-- BEGIN mode_normal -->
<li><a href="{mode_normal.URL}" title="{lang:mode_normal_hint}"><img src="{pwg_root}{themeconf:icon_dir}/normal_mode.png" class="button" alt="{lang:mode_normal_hint}"></a></li>
<!-- END mode_normal -->
diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl
index 7c5f34231..e5e62333e 100644
--- a/template/yoga/picture.tpl
+++ b/template/yoga/picture.tpl
@@ -30,55 +30,33 @@
</div>
<div id="imageToolBar">
-
-<div class="randomButtons">
- <a href="{U_SLIDESHOW}" title="{lang:slideshow}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/slideshow.png" class="button" alt="{lang:slideshow}"></a>
- <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 -->
-</div>
-
-<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 -->
- <a class="navButton up" href="{U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{lang:thumbnails}"></a>
-<!-- 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 -->
-</div>
+ <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 -->
+ </div>
+ {NAV_BUTTONS}
+ </div>
</div> <!-- imageToolBar -->
@@ -228,31 +206,3 @@
</div>
<!-- END comments -->
-<script type="text/javascript">
-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 -->
- /*Up*/case 38: if (e.ctrlKey){window.location="{U_UP}".replace("&amp;","&"); return false; } break;
- }
- return true;
-}
-document.onkeydown=keyboardNavigation;
-</script> \ No newline at end of file
diff --git a/template/yoga/picture_nav_buttons.tpl b/template/yoga/picture_nav_buttons.tpl
new file mode 100644
index 000000000..a25e2639f
--- /dev/null
+++ b/template/yoga/picture_nav_buttons.tpl
@@ -0,0 +1,91 @@
+<!-- $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 thumbnails -->
+ <a class="navButton up" href="{thumbnails.U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{lang:thumbnails}"></a>
+ <!-- END thumbnails -->
+ <!-- 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 -->
+ </div>
+
+<script type="text/javascript">
+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 thumbnails -->
+ /*Up*/case 38: if (e.ctrlKey){window.location="{thumbnails.U_UP}".replace("&amp;","&"); return false; } break;
+<!-- END thumbnails -->
+<!-- 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 -->
+ }
+ return true;
+}
+document.onkeydown=keyboardNavigation;
+</script>
diff --git a/template/yoga/slideshow.tpl b/template/yoga/slideshow.tpl
index aef05a228..1be2c5a81 100644
--- a/template/yoga/slideshow.tpl
+++ b/template/yoga/slideshow.tpl
@@ -10,9 +10,14 @@
<h2 class="showtitle">{TITLE}</h2>
<!-- END title -->
</div>
+
+<div id="imageToolBar">
+ {NAV_BUTTONS}
+</div>
+
<div id="theImage">
{ELEMENT_CONTENT}
-<!-- BEGIN legend -->
-<p class="showlegend">{legend.COMMENT_IMG}</p>
-<!-- END legend -->
+ <!-- BEGIN legend -->
+ <p class="showlegend">{legend.COMMENT_IMG}</p>
+ <!-- END legend -->
</div>