Index: /extensions/Panoramas/AS_Panorama.php
===================================================================
--- /extensions/Panoramas/AS_Panorama.php	(revision 6527)
+++ /extensions/Panoramas/AS_Panorama.php	(revision 6527)
@@ -0,0 +1,69 @@
+<?php
+/* A simple panorama */
+if (!defined('PHPWG_ROOT_PATH') or !defined('ASP_DIR')) die('Hacking attempt!');
+global $conf;
+include_once( ASP_PATH . 'AS_Panorama_default.php');
+
+if ( !function_exists( 'AS_panorama_content' ) ) {
+	if ( !defined('IN_ADMIN') or !IN_ADMIN ) {
+    add_event_handler('render_element_content', 'AS_panorama_content', 99, 2 );
+    function AS_panorama_content($content, $image)
+		{
+		  global $conf, $template, $page;
+		  $asp = & $conf['AS_panorama'];
+		  if ( !stristr($image['name'], $asp['in_mode_360']) 
+		   and !stristr($image['name'], $asp['in_mode_180']) ) return $content;
+		  if (!isset($image['image_url'])) return $content;
+		  if ( isset($page['slideshow']) and $page['slideshow'] ) return $content;
+		  if (isset($image['width']) and $image['width'] < $asp['min_viewport_width']) return $content;
+		  $asp['image_name'] = $image['name'];
+		  $asp['width'] = $image['width'];
+		  $asp['height'] = $image['height'];
+		  if (stristr($image['name'], $asp['in_mode_180'])) {
+			$asp['mode_360'] = 'false';
+			$asp['name'] = str_replace($asp['in_mode_180'],'', $image['name']);
+		  }
+		  else  {
+			$asp['name'] = str_replace($asp['in_mode_360'],'', $image['name']);
+		  }
+		  $template->set_filenames(
+			array('AS_panorama_content' => dirname(__FILE__) . '/template/AS_panorama_content.tpl') );
+		  $asp['Path'] = embellish_url($template->get_template_vars('ROOT_URL').ASP_PATH);
+		  $asp['content'] = $content;
+		  $template->assign( array( 'ASP' => $asp, ) );
+		  return $template->parse('AS_panorama_content', true);
+		}
+  }
+}
+
+if ( !function_exists( 'AS_panorama_title' ) ) {
+  if ( $conf['AS_panorama']['In_name_display_removal'] ) {
+    add_event_handler('loc_end_picture', 'AS_panorama_title');
+    function AS_panorama_title()
+    {
+      global $conf, $template;
+      $asp = & $conf['AS_panorama'];
+      $picture = $template->get_template_vars('current');
+      $picture['TITLE'] = $asp['name'];
+      $template->assign('current', $picture);
+      $template->assign( array( 'ASP' => $asp, ) );
+    }
+  }
+}
+
+if ( !function_exists( 'AS_panorama_menu' ) ) {
+	if ( defined('IN_ADMIN') and IN_ADMIN ) {
+		add_event_handler('get_admin_plugin_menu_links', 'AS_panorama_menu');
+    function AS_panorama_menu($menu)
+    {
+        array_push($menu,
+            array(
+                'NAME' => 'Simple Panorama',
+                'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/AS_Panorama_admin.php')
+            )
+        );
+        return $menu;
+    }
+  }
+}
+?>
Index: /extensions/Panoramas/AS_Panorama_admin.php
===================================================================
--- /extensions/Panoramas/AS_Panorama_admin.php	(revision 6527)
+++ /extensions/Panoramas/AS_Panorama_admin.php	(revision 6527)
@@ -0,0 +1,66 @@
+<?php
+/* Configuration of Panorama */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!');
+load_language('plugin.lang', ASP_PATH);
+
+global $conf, $template;
+$errors = array();
+$infos = array();
+$asp = & $conf['AS_panorama'];
+
+$sub = ( isset($_POST['submit']) ) ? true : false;
+
+if ( $sub ) {
+	// 'in_mode_360' => '_360',
+  // Picture name substring to display in Mode 360 	
+	// 'in_mode_180' => '_180', #
+  // Picture name substring to display in Mode 180
+  $nsp = array_merge($asp, $_POST);
+	if ( $nsp['viewport_width']=='' or !is_numeric($nsp['viewport_width']) or $nsp['viewport_width'] < 50 or $nsp['viewport_width'] > 100 )
+    array_push($errors, l10n('Viewport width ratio is out of range (Correct range: 50-100).')); 
+	if ( $nsp['min_viewport_width']=='' or !is_numeric($nsp['min_viewport_width']) or $nsp['min_viewport_width'] < 320 )
+    array_push($errors, l10n('Minimal Viewport width is out of range (Correct range: 320/+).')); 
+	if ( $nsp['max_viewport_width']=='' or !is_numeric($nsp['max_viewport_width']) or $nsp['max_viewport_width'] < $nsp['min_viewport_width'] )
+    array_push($errors, l10n('Maximal Viewport width is out of range (Correct range: Minimal/+).')); 
+	if ( $nsp['speed']=='' or !is_numeric($nsp['speed']) or $nsp['speed'] < 10 or $nsp['speed'] > 90 )
+    array_push($errors, l10n('Relative speed factor is out of range (Correct range: 10-90).')); 
+	if ( $nsp['start_position']=='' or !is_numeric($nsp['start_position']) or $nsp['start_position'] < 0 or $nsp['start_position'] > 99 )
+    array_push($errors, l10n('Start position ratio is out of range (Correct range: 0-99).')); 
+  $nsp['in_mode_360'] = trim((string) $nsp['in_mode_360']);
+  $nsp['in_mode_180'] = trim((string) $nsp['in_mode_180']);
+ 	if ( $nsp['in_mode_360']=='' or $nsp['in_mode_180']=='' )
+    array_push($errors, l10n('Picture name substring could not be empty.')); 
+ 	if ( $nsp['in_mode_360'] == $nsp['in_mode_180'] )
+    array_push($errors, l10n('Picture name substrings must be different.')); 
+	if ( count($errors) > 0 )
+	array_push($errors, l10n('Your configuration is NOT saved due to above reasons.'));
+  if ( !is_webmaster() and count($errors) == 0 )
+    array_push($infos, l10n('You are not authorized to change this configuration (Webmaster only).'));
+  if ( is_webmaster() and count($errors) == 0 )
+  {
+    $nsp = array_merge( $asp, $nsp );
+    unset($nsp['submit'], $nsp['Ver'], $nsp['Path'], $nsp['Dir']);
+    // var_dump($nsp);
+    $confasp = serialize($nsp);
+    conf_update_param('AS_panorama', $confasp);
+   	array_push($infos, l10n('Your configuration is saved.'));
+  }
+  $asp = $nsp;
+}
+$template->set_filenames( array('AS_panorama_admin' => dirname(__FILE__).'/template/AS_Panorama_admin.tpl') );
+foreach ($asp as $k => & $v) {
+  if (is_string($v)) $asp[$k] = htmlspecialchars($v, ENT_QUOTES, 'utf-8');
+  else $asp[$k] = $v;
+}
+if (count($errors) != 0) $template->assign('errors', $errors);
+if (count($infos) != 0) $template->assign('infos', $infos);
+$asp['Path'] = embellish_url($template->get_template_vars('ROOT_URL').ASP_PATH);
+$asp = array_merge( $asp, array(
+	'Dir' => ASP_DIR,
+	'Path' => ASP_PATH,
+	'Ver' => ASP_VER,
+  ));
+$template->assign( 'ASP', $asp );
+$template->assign_var_from_handle('ADMIN_CONTENT', 'AS_panorama_admin');
+?>
Index: /extensions/Panoramas/AS_Panorama_default.php
===================================================================
--- /extensions/Panoramas/AS_Panorama_default.php	(revision 6527)
+++ /extensions/Panoramas/AS_Panorama_default.php	(revision 6527)
@@ -0,0 +1,22 @@
+<?php
+  $default = array(
+	'viewport_width' => 100,
+	'min_viewport_width' => 720,
+	'max_viewport_width' => 1500,
+	'speed' => 20000,
+	'direction' => 'left',
+	'control_display' => 'auto',
+	'start_position' => 50,
+	'auto_start' => 1,
+	'mode_360' => 0,
+	'loop_180' => 1,
+	'Dir' => ASP_DIR,
+	'Path' => ASP_PATH,
+	'Ver' => ASP_VER,
+	'in_mode_360' => '_360',
+	'in_mode_180' => '_180',
+	'In_name_display_removal' => 1,
+  );
+  if (!isset($conf['AS_panorama'])) $conf['AS_panorama'] = $default;
+  else $conf['AS_panorama'] = array_merge( $default, unserialize($conf['AS_panorama']));
+?>
Index: /extensions/Panoramas/css/AS_Panorama.css
===================================================================
--- /extensions/Panoramas/css/AS_Panorama.css	(revision 6527)
+++ /extensions/Panoramas/css/AS_Panorama.css	(revision 6527)
@@ -0,0 +1,75 @@
+.panorama-viewport {
+	position: relative;
+	width: 600px;
+	overflow: hidden;
+	margin: 0 auto;
+	padding: 0;
+	text-align: left;
+}
+.panorama-container {
+	position: relative;
+	width: 100000px;
+	margin: 0;
+	padding: 0;
+
+}
+.panorama-control {
+	position: absolute;
+	display: none;
+	padding: 0;
+	margin: 0;
+	bottom: -1px;
+	left: 0;
+	width: 100%;
+	height: 30px;
+	background: #542;
+	filter: alpha(opacity=50);
+	opacity: .5;
+	text-align: left;
+}
+.panorama-control-left, .panorama-control-right, .panorama-control-pause { 
+	float: left;
+	padding: 0;
+	margin: 0;
+	color: white;
+	text-decoration: none;
+	font-size: 24px;
+  font-weight: bold;
+	line-height: 30px;
+	width: 33%;
+	text-align: center;
+	font-family: 'Arial',sans-serif
+}
+.panorama-control-left:hover, .panorama-control-right:hover, .panorama-control-pause:hover { 
+	text-decoration: none;
+}
+.panorama-control-pause {
+	text-transform: uppercase;
+}
+.panorama-panel {
+	position: absolute;
+	display: none;
+	top: 0;
+	right: 0;
+	background: #009cff;
+	filter: alpha(opacity=50);
+	opacity: .5;
+	color: white;
+	padding: 4px;
+}
+.panorama-panel h2 {
+	font-size: 11px;
+	text-transform: uppercase;
+	font-family: Arial, sans-serif;
+	text-align: right;
+}
+.panorama-panel ul {
+	display: none;
+}
+.panorama {
+	position: relative;
+	margin: 0;
+	padding: 0;
+	border: none;
+}
+
Index: /extensions/Panoramas/css/AS_Panorama_admin.css
===================================================================
--- /extensions/Panoramas/css/AS_Panorama_admin.css	(revision 6527)
+++ /extensions/Panoramas/css/AS_Panorama_admin.css	(revision 6527)
@@ -0,0 +1,18 @@
+#ASP_Config td.label  {
+	padding:2px 10px;
+	text-align:right;
+}
+input[type="radio"] {
+	width:20px;
+}
+.infos, .errors {
+  background-color:transparent;
+}
+.clear fieldset#ASP_Config {
+  background: url(../images/Pano_clear_bg.png) scroll no-repeat bottom left transparent;
+  padding: 0;
+}
+.roma fieldset#ASP_Config {
+  background: url(../images/Pano_roma_bg.png) scroll no-repeat bottom left transparent;
+  padding: 0;
+}
Index: /extensions/Panoramas/js/jquery.panorama.js
===================================================================
--- /extensions/Panoramas/js/jquery.panorama.js	(revision 6527)
+++ /extensions/Panoramas/js/jquery.panorama.js	(revision 6527)
@@ -0,0 +1,132 @@
+/* =========================================================
+// jquery.panorama.js
+// Author: Arnault PACHOT & Frédéric Martini
+// Copyright (c) 2009 
+// licence : GPL
+========================================================= */
+(function($) {
+	$.fn.panorama = function(options) {
+		this.each(function(){ 
+			var settings = {
+				viewport_width: 600,
+				speed: 20000,
+				direction: 'left',
+				control_display: 'auto',
+				start_position: 0,
+				auto_start: true,
+				mode_360: true,
+				loop_180: true
+			};
+			if(options) $.extend(settings, options);
+
+
+			var elemWidth =  parseInt($(this).attr('width'));
+			var elemHeight = parseInt($(this).attr('height'));
+			// --------------------------------------------------
+			// Récupération automatique de la taille de l'image :
+			// Si un des attributs width ou height est absent, 
+			// on récupère la vrai taille de l'image :
+			if (isNaN(elemWidth) || isNaN(elemHeight)) {
+				var img = new Image();
+				img.src = $(this).attr('src');
+				if (isNaN(elemWidth)) elemWidth = img.width;
+				if (isNaN(elemHeight)) elemHeight = img.height;
+			}
+			// --------------------------------------------------
+			var currentElement = this;
+			var panoramaViewport, panoramaContainer;
+					
+
+			$(this).css('position', 'relative')
+				.css('margin', '0')
+				.css('padding', '0')
+				.css('border', 'none')
+				.wrap("<div class='panorama-container'></div>");
+			if (settings.mode_360) 
+				$(this).clone().insertAfter(this);
+			
+			panoramaContainer = $(this).parent();
+			panoramaContainer.wrap("<div class='panorama-viewport'></div>").parent().css('width',settings.viewport_width+'px')
+				.append("<div class='panorama-control'><a href='#' class='panorama-control-left'><<</a> <a href='#' class='panorama-control-pause'>x</a> <a href='#' class='panorama-control-right'>>></a> </div>");
+			
+			panoramaViewport = panoramaContainer.parent();
+
+			panoramaViewport.css('height', elemHeight+'px').find('a.panorama-control-left').bind('click', function() {
+				$(panoramaContainer).stop();
+				settings.direction = 'right';
+				panorama_animate(panoramaContainer, elemWidth, settings);
+				return false;
+			});
+			panoramaViewport.bind('click', function() {
+				$(panoramaContainer).stop();
+			});
+			panoramaViewport.find('a.panorama-control-right').bind('click', function() {
+				$(panoramaContainer).stop();
+				settings.direction = 'left';
+				panorama_animate(panoramaContainer, elemWidth, settings);
+				return false;
+			});
+			panoramaViewport.find('a.panorama-control-pause').bind('click', function() {
+				$(panoramaContainer).stop();
+				return false;
+			});
+			
+			if (settings.control_display == 'yes') {
+				panoramaViewport.find('.panorama-control').show();
+			} else {
+				panoramaViewport.bind('mouseover', function(){
+					$(this).find('.panorama-control').show();
+					return false;
+				}).bind('mouseout', function(){
+					$(this).find('.panorama-control').hide();
+					return false;
+				});
+				
+			}
+		
+			$(this).parent().css('margin-left', '-'+settings.start_position+'px');
+
+			if (settings.auto_start) 
+				panorama_animate(panoramaContainer, elemWidth, settings);
+			
+		});
+		function panorama_animate(element, elemWidth, settings) {
+			currentPosition = 0-parseInt($(element).css('margin-left'));
+			if (settings.direction == 'right') {
+				
+				$(element).animate({marginLeft: 0}, ((settings.speed / elemWidth) * (currentPosition)) , 'linear', function (){ 
+					if (settings.mode_360) {
+						$(element).css('marginLeft', '-'+(parseInt(parseInt(elemWidth))+'px'));
+						panorama_animate(element, elemWidth, settings);
+					} else if (settings.loop_180) {
+						settings.direction = 'left'; // changement de sens 
+						panorama_animate(element, elemWidth, settings);
+					}
+				});
+			} else {
+				var rightlimit;
+				if (settings.mode_360) 
+					rightlimit = elemWidth;
+				else
+					rightlimit = elemWidth-settings.viewport_width;
+					
+				$(element).animate({marginLeft: -rightlimit}, ((settings.speed / rightlimit) * (rightlimit - currentPosition)), 'linear', function (){ 
+					if (settings.mode_360) {
+						$(element).css('margin-left', 0); 
+						panorama_animate(element, elemWidth, settings);
+					} else if (settings.loop_180) {
+						settings.direction = 'right'; // changement de sens
+						panorama_animate(element, elemWidth, settings);
+					}
+				});
+			}
+
+			
+		}
+		
+	};
+
+$(document).ready(function(){
+	$("img.panorama").panorama();
+});
+})(jQuery);
Index: /extensions/Panoramas/language/en_UK/description.txt
===================================================================
--- /extensions/Panoramas/language/en_UK/description.txt	(revision 6527)
+++ /extensions/Panoramas/language/en_UK/description.txt	(revision 6527)
@@ -0,0 +1,1 @@
+A simple panorama viewer based on jQuery with 2 modes (360 or 180) where mode 180 will reverse the rotation direction.
Index: /extensions/Panoramas/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Panoramas/language/en_UK/plugin.lang.php	(revision 6527)
+++ /extensions/Panoramas/language/en_UK/plugin.lang.php	(revision 6527)
@@ -0,0 +1,34 @@
+<?php
+$lang['Auto'] = 'Auto';
+$lang['Automatic start'] = 'Automatic start';
+$lang['Control display'] = 'Control display';
+$lang['Left'] = 'Left';
+$lang['Maximal Viewport width is out of range (Correct range: Minimal/+).'] = 'Maximal Viewport width is out of range (Correct range: Minimal/+).'; 
+$lang['Minimal Viewport width is out of range (Correct range: 320/+).'] = 'Minimal Viewport width is out of range (Correct range: 320/+).'; 
+$lang['Mode 180 (Alternative left-right restart)'] = 'Mode 180 (Alternative left-right restart)';
+$lang['Mode 360'] = 'Mode 360';
+$lang['Off'] = 'Off';
+$lang['On'] = 'On';
+$lang['Panorama configuration'] = 'Panorama configuration';
+$lang['Permanent'] = 'Permanent';
+$lang['Picture name substring could not be empty.'] = 'Picture name substring could not be empty.'; 
+$lang['Picture name substring to display in Mode 180 [ != previous substring ]'] = 'Picture name substring to display in Mode 180 [ != previous substring ]';
+$lang['Picture name substring to display in Mode 360'] = 'Picture name substring to display in Mode 360';
+$lang['Picture name substrings must be different.'] = 'Picture name substrings must be different.'; 
+$lang['Relative speed factor [10-90]'] = 'Relative speed factor [10-90]';
+$lang['Relative speed factor is out of range (Correct range: 10-90).'] = 'Relative speed factor is out of range (Correct range: 10-90).'; 
+$lang['Remove substring from picture title'] = 'Remove substring from picture title';
+$lang['Right'] = 'Right';
+$lang['Rotation direction'] = 'Rotation direction';
+$lang['Special thanks to:'] = 'Special thanks to:'; 
+$lang['authors of'] = 'authors of';
+$lang['Start position [% between 0-99]'] = 'Start position [% between 0-99]';
+$lang['Start position ratio is out of range (Correct range: 0-99).'] = 'Start position ratio is out of range (Correct range: 0-99).'; 
+$lang['Viewport maximal width [pixels >= minimal width]'] = 'Viewport maximal width [pixels >= minimal width]';
+$lang['Viewport minimal width [pixels > 320]'] = 'Viewport minimal width [pixels > 320]';
+$lang['Viewport width [% between 50-100]'] = 'Viewport width [% between 50-100]';
+$lang['Viewport width ratio is out of range (Correct range: 50-100).'] = 'Viewport width ratio is out of range (Correct range: 50-100).'; 
+$lang['You are not authorized to change this configuration (Webmaster only).'] = 'You are not authorized to change this configuration (Webmaster only).';
+$lang['Your configuration is NOT saved due to above reasons.'] = 'Your configuration is NOT saved due to above reasons.';
+$lang['Your configuration is saved.'] = 'Your configuration is saved.';
+?>
Index: /extensions/Panoramas/language/fr_FR/description.txt
===================================================================
--- /extensions/Panoramas/language/fr_FR/description.txt	(revision 6527)
+++ /extensions/Panoramas/language/fr_FR/description.txt	(revision 6527)
@@ -0,0 +1,1 @@
+Un lecteur d'images panoramiques très simple basé sur jQuery avec 2 modes (360 or 180) où le mode 180 peut inverser le sens de rotation.
Index: /extensions/Panoramas/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Panoramas/language/fr_FR/plugin.lang.php	(revision 6527)
+++ /extensions/Panoramas/language/fr_FR/plugin.lang.php	(revision 6527)
@@ -0,0 +1,34 @@
+<?php
+$lang['Auto'] = 'Auto';
+$lang['Automatic start'] = 'Lancement automatique';
+$lang['Control display'] = 'Affichage des boutons de lecture';
+$lang['Left'] = 'Gauche';
+$lang['Maximal Viewport width is out of range (Correct range: Minimal/+).'] = 'La largeur maximale de la partie visible est incorrecte (Valeurs acceptables: Minimale/+).'; 
+$lang['Minimal Viewport width is out of range (Correct range: 320/+).'] = 'La largeur minimale de la partie visible est incorrecte (Valeurs acceptables: 320/+).'; 
+$lang['Mode 180 (Alternative left-right restart)'] = 'Mode 180 (Relance de la lecture alternée gauche-droite)';
+$lang['Mode 360'] = 'Mode 360';
+$lang['Off'] = 'Inactif';
+$lang['On'] = 'Actif';
+$lang['Panorama configuration'] = 'Configuration';
+$lang['Permanent'] = 'Permanent';
+$lang['Picture name substring could not be empty.'] = 'Les critères de sélection des noms d\'images ne peuvent pas être vide.'; 
+$lang['Picture name substring to display in Mode 180 [ != previous substring ]'] = 'Critère de sélection des noms d\'images en Mode 180 [ != critère précédent ]';
+$lang['Picture name substring to display in Mode 360'] = 'Critère de sélection des noms d\'images en Mode 360';
+$lang['Picture name substrings must be different.'] = 'Les critères de sélection des noms d\'images ne peuvent pas être identiques.'; 
+$lang['Relative speed factor [10-90]'] = 'Rapport de vitesse [10-90]';
+$lang['Relative speed factor is out of range (Correct range: 10-90).'] = 'Le rapport de vitesse est incorrect (Valeurs acceptables: 10-90).'; 
+$lang['Remove substring from picture title'] = 'Effacer les critères de sélection des noms d\'images dans les titres';
+$lang['Right'] = 'Droite';
+$lang['Rotation direction'] = 'Sens de rotation';
+$lang['Special thanks to:'] = 'Remerciements particuliers à';
+$lang['authors of'] = 'Les auteurs de';
+$lang['Start position [% between 0-99]'] = 'Position de départ [% entre 0-99]';
+$lang['Start position ratio is out of range (Correct range: 0-99).'] = 'La position de départ relative est incorrecte (Valeurs acceptables: 0-99).'; 
+$lang['Viewport maximal width [pixels >= minimal width]'] = 'Largeur maximale de la partie visible [pixels >= largeur minimale]';
+$lang['Viewport minimal width [pixels > 320]'] = 'Largeur minimale de la partie visible [pixels > 320]';
+$lang['Viewport width [% between 50-100]'] = 'Largeur relative de la partie visible [% between 50-100]';
+$lang['Viewport width ratio is out of range (Correct range: 50-100).'] = 'La largeur relative de la partie visible est incorrecte (Valeurs acceptables: 50-100).'; 
+$lang['You are not authorized to change this configuration (Webmaster only).'] = 'Vous n\'êtes pas autorisé à modifier cette configuration (réservé au Webmestre).';
+$lang['Your configuration is NOT saved due to above reasons.'] = 'Votre configuration n\'a PAS été enregistré suite aux erreurs ci-dessus.';
+$lang['Your configuration is saved.'] = 'Votre configuration a été enregistrée.';
+?>
Index: /extensions/Panoramas/main.inc.php
===================================================================
--- /extensions/Panoramas/main.inc.php	(revision 6527)
+++ /extensions/Panoramas/main.inc.php	(revision 6527)
@@ -0,0 +1,40 @@
+<?php /*
+Plugin Name: Panoramas
+Version: 2.1.a
+Description: A simple panorama viewer based on jQuery
+Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=207
+Author: Piwigo team & OpenStudio
+Author URI: http://www.vdigital.org
+*/
+
+/* Specials thanks to: jquery.panorama authors: Arnault PACHOT & Frédéric Martini
+   Copyright (c) 2009 
+   Licence : GPL
+   http://www.openstudio.fr/Un-viewer-de-panoramas-simple-en.html
+   =========================================================  
+
+ Synopsis: on picture-url if Picture-name contains _360 (by default) change picture display
+
+History
+  2010-05-27 2.1.a
+			 New: jQuery function replacement
+			 jquery.animated.innerfade has been removed
+			 and jquery.panorama added
+  2008-10-04 2.0.b (stable)
+             IE7 bug, with jQuery script (Thanks to repié38 who find cause and solution)
+  2008-09-29 2.0.a (stable)
+             Smarty version for Piwigo (Don't use it with PhpWebGallery 1.7.x)
+  2008-02-10 1.7.d (stable)
+             IE6 bug: corrective for blank pictures
+  2008-02-06 1.7.c
+             High Resolution support
+  2008-02-06 1.7.b (bugged)
+             No title where no decription available
+  2008-01-15 First release
+*/
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+define('ASP_DIR' , basename(dirname(__FILE__)));
+define('ASP_PATH' , PHPWG_PLUGINS_PATH . ASP_DIR . '/');
+define('ASP_VER' , '2.1.a');
+include_once( ASP_PATH . 'AS_Panorama.php');
+?>
Index: /extensions/Panoramas/template/AS_Panorama_admin.tpl
===================================================================
--- /extensions/Panoramas/template/AS_Panorama_admin.tpl	(revision 6527)
+++ /extensions/Panoramas/template/AS_Panorama_admin.tpl	(revision 6527)
@@ -0,0 +1,100 @@
+{html_head}
+<link rel="stylesheet" type="text/css" href="{$ASP.Path}css/AS_Panorama_admin.css">
+{/html_head}
+<div class="titrePage">
+  <h2>Panorama [{$ASP.Ver}]</h2>
+</div>
+<p>
+
+{'Special thanks to:'|@translate} Arnault Pachot & Frédéric Martini - {'authors of'|@translate}
+<a href="http://www.openstudio.fr/Un-viewer-de-panoramas-simple-en.html" title="" class="externalLink">jquery.panorama</a><br/>
+
+</p>
+<form method="post" action="" class="general">
+ <fieldset id="ASP_Config">
+  <legend>{'Panorama configuration'|@translate}</legend>
+  <table id="table">
+   <tr>
+    <td class="label">{'Viewport width [% between 50-100]'|@translate}</td>
+    <td><input type="text" class="field" name="viewport_width" value="{$ASP.viewport_width}" size="20" maxlength="3"/></td>
+   </tr>
+   <tr>
+   <td class="label">{'Viewport minimal width [pixels > 320]'|@translate}</td>
+    <td><input type="text" class="field" name="min_viewport_width" value="{$ASP.min_viewport_width}"  size="20" maxlength="3"/></td>
+   </tr>
+   <tr>
+   <td class="label">{'Viewport maximal width [pixels >= minimal width]'|@translate}</td>
+    <td><input type="text" class="field" name="max_viewport_width" value="{$ASP.max_viewport_width}"  size="20" maxlength="4"/></td>
+   </tr>
+   <tr>
+    <td class="label">{'Relative speed factor [10-90]'|@translate}</td>
+    <td><input type="text" class="field" name="speed" value="{$ASP.speed}"  size="20" maxlength="2"/></td>
+   </tr>
+   <tr>
+    <td class="label">{'Rotation direction'|@translate}</td>
+	<td>
+		<input type="radio" value="left"  name="direction" {if ($ASP.direction=='left')}  checked="checked" {/if}/>{'Left'|@translate}
+		<input type="radio" value="right" name="direction" {if ($ASP.direction=='right')} checked="checked" {/if}/>{'Right'|@translate}
+	</td>
+   </tr>
+   <tr>
+    <td class="label">{'Control display'|@translate}</td>
+	<td>
+		<input type="radio" value="auto" name="control_display" {if ($ASP.control_display=='auto')} checked="checked" {/if}/>{'Auto'|@translate}
+		<input type="radio" value="yes"  name="control_display" {if ($ASP.control_display=='yes')}  checked="checked" {/if}/>{'Permanent'|@translate}
+	</td>
+   </tr>
+   <tr>
+    <td class="label">{'Start position [% between 0-99]'|@translate}</td>
+    <td><input type="text" class="field" name="start_position" value="{$ASP.start_position}"  size="20" maxlength="2"/></td>
+   </tr>
+   <tr>
+    <td class="label">{'Automatic start'|@translate}</td>
+	<td>
+		<input type="radio" value="1"  name="auto_start" {if ($ASP.auto_start)}  checked="checked" {/if}/>{'On'|@translate}
+		<input type="radio" value="0" name="auto_start" {if (!$ASP.auto_start)} checked="checked" {/if}/>{'Off'|@translate}
+	</td>
+   </tr>
+   <tr>
+    <td class="label">{'Mode 360'|@translate}</td>
+	<td>
+		<input type="radio" value="1"  name="mode_360" {if ($ASP.mode_360)}  checked="checked" {/if}/>{'On'|@translate}
+		<input type="radio" value="0" name="mode_360" {if (!$ASP.mode_360)} checked="checked" {/if}/>{'Off'|@translate}
+	</td>
+   </tr>
+   <tr>
+    <td class="label">{'Mode 180 (Alternative left-right restart)'|@translate}</td>
+	<td>
+		<input type="radio" value="1"  name="loop_180" {if ($ASP.loop_180)}  checked="checked" {/if}/>{'On'|@translate}
+		<input type="radio" value="0" name="loop_180" {if (!$ASP.loop_180)} checked="checked" {/if}/>{'Off'|@translate}
+	</td>
+   </tr>
+   <tr>
+    <td class="label">{'Picture name substring to display in Mode 360'|@translate}</td>
+    <td><input type="text" class="field" name="in_mode_360" value="{$ASP.in_mode_360}"  size="20"  maxlength="8"/></td>
+   </tr>
+   <tr>
+    <td class="label">{'Picture name substring to display in Mode 180 [ != previous substring ]'|@translate}</td>
+    <td><input type="text" class="field" name="in_mode_180" value="{$ASP.in_mode_180}"  size="20"  maxlength="8"/></td>
+   </tr>
+   <tr>
+    <td class="label">{'Remove substring from picture title'|@translate}</td>
+	<td>
+		<input type="radio" value="1"  name="In_name_display_removal" {if ($ASP.In_name_display_removal)}  checked="checked" {/if}/>{'On'|@translate}
+		<input type="radio" value="0" name="In_name_display_removal" {if (!$ASP.In_name_display_removal)} checked="checked" {/if}/>{'Off'|@translate}
+	</td>
+   </tr>
+  </table>
+ </fieldset>
+
+ <p><input type="submit" value="{'Submit'|@translate}" name="submit" /></p>
+</form>
+{html_head}
+<script type="text/javascript">
+jQuery(document).ready(function() {ldelim}
+	jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
+	jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 
+	jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
+	});
+</script>
+{/html_head}
Index: /extensions/Panoramas/template/AS_panorama_content.tpl
===================================================================
--- /extensions/Panoramas/template/AS_panorama_content.tpl	(revision 6527)
+++ /extensions/Panoramas/template/AS_panorama_content.tpl	(revision 6527)
@@ -0,0 +1,34 @@
+{known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"}
+{known_script id="jquery.panorama" src=$ASP.Path|cat:"js/jquery.panorama.js"}
+{html_head}
+<link rel="stylesheet" type="text/css" href="{$ASP.Path}css/AS_Panorama.css">
+<script type="text/javascript">
+jQuery(document).ready(function(){ldelim}
+    var w = $("#imageToolBar").width();
+	if (w === null) {ldelim} w = $("#theImage").width(); }
+	if (w < {$ASP.min_viewport_width}) {ldelim} w = .75 * $("#theImage").width(); }
+	var m = w;
+	w = w * ( Math.min( Math.max({$ASP.viewport_width} / 100, .5) , 1 ));
+	w = Math.round(Math.min( {$ASP.max_viewport_width} , Math.max( {$ASP.min_viewport_width}, w) ));
+	var s = (100 - {$ASP.speed}) * 2000;
+	var p = Math.round(Math.min(Math.max({$ASP.width} * ( {$ASP.start_position} / 100 ), 0), {$ASP.width}));
+    $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama");
+	var options = {ldelim}
+                 viewport_width: w,
+                 speed: s,
+                 direction: '{$ASP.direction}',
+                 control_display: '{$ASP.control_display}',
+				 start_position : p,
+				 auto_start : {$ASP.auto_start},
+				 mode_360 : {$ASP.mode_360},
+				 loop_180 : {$ASP.loop_180}
+         };
+	$("#theImage img.simple_panorama").panorama(options);
+});
+</script>
+{/html_head}
+	<!-- Adapted simply by the "Panorama" plugin (version {$ASP.Ver}): {$ASP.Dir}/template/AS_panorama_content.tpl -->
+	<!-- for: {$ASP.image_name} ({$ASP.width}x{$ASP.height}) -->
+	<div id="Panorama">
+		{$ASP.content}
+	</div>
