Index: /extensions/stripped/admin/admin.inc.php
===================================================================
--- /extensions/stripped/admin/admin.inc.php	(revision 14686)
+++ /extensions/stripped/admin/admin.inc.php	(revision 14687)
@@ -27,5 +27,5 @@
 if(isset($_POST['submit_stripped']))
 {
-	$config['paramVersion']='2.1';
+	$config['paramVersion']='2.2';
 
 	$config['themeStyle']=$_POST['f_themeStyle'];
@@ -47,4 +47,9 @@
 	$config['infoTabAdminOnly']=isset($_POST['f_infoTabAdminOnly']);
 	$config['defaultTab']=$_POST['f_defaultTab'];
+
+	$config['albumSize']=$_POST['f_albumSize'];
+	$config['thumbSize']=$_POST['f_thumbSize'];
+	$config['imageSize']=$_POST['f_imageSize'];
+	$config['hdSize']=$_POST['f_hdSize'];
 
 	$config['imageAutosize']=isset($_POST['f_imageAutosize']);
Index: /extensions/stripped/admin/admin.tpl
===================================================================
--- /extensions/stripped/admin/admin.tpl	(revision 14686)
+++ /extensions/stripped/admin/admin.tpl	(revision 14687)
@@ -104,4 +104,62 @@
 					<span class="property">{'Show Information tab only to admins'|@translate}</span>&nbsp;
 					<input type="checkbox" name="f_infoTabAdminOnly" {if $options.infoTabAdminOnly}checked{/if}>
+				</label></li>
+			</ul>
+		</fieldset>
+		<fieldset>
+			<legend>{'Multiple size'|@translate}</legend>
+			<ul>
+				<li><label>
+					<span class="property">{'Album thumbnail size'|@translate}</span>&nbsp;
+					<select name="f_albumSize" style="min-width:150px;">
+						<option value="square" {if ($options.albumSize=="square")}selected{/if}>{'square'|@translate}</option>
+						<option value="thumb" {if ($options.albumSize=="thumb")}selected{/if}>{'thumb'|@translate}</option>
+						<option value="2small" {if ($options.albumSize=="2small")}selected{/if}>{'2small'|@translate}</option>
+						<option value="xsmall" {if ($options.albumSize=="xsmall")}selected{/if}>{'xsmall'|@translate}</option>
+						<option value="medium" {if ($options.albumSize=="medium")}selected{/if}>{'medium'|@translate}</option>
+						<option value="large" {if ($options.albumSize=="large")}selected{/if}>{'large'|@translate}</option>
+						<option value="xlarge" {if ($options.albumSize=="xlarge")}selected{/if}>{'xlarge'|@translate}</option>
+						<option value="xxlarge" {if ($options.albumSize=="xxlarge")}selected{/if}>{'xxlarge'|@translate}</option>
+					</select>
+				</label></li>
+				<li><label>
+					<span class="property">{'Thumbnail size'|@translate}</span>&nbsp;
+					<select name="f_thumbSize" style="min-width:150px;">
+						<option value="square" {if ($options.thumbSize=="square")}selected{/if}>{'square'|@translate}</option>
+						<option value="thumb" {if ($options.thumbSize=="thumb")}selected{/if}>{'thumb'|@translate}</option>
+						<option value="2small" {if ($options.thumbSize=="2small")}selected{/if}>{'2small'|@translate}</option>
+						<option value="xsmall" {if ($options.thumbSize=="xsmall")}selected{/if}>{'xsmall'|@translate}</option>
+						<option value="medium" {if ($options.thumbSize=="medium")}selected{/if}>{'medium'|@translate}</option>
+						<option value="large" {if ($options.thumbSize=="large")}selected{/if}>{'large'|@translate}</option>
+						<option value="xlarge" {if ($options.thumbSize=="xlarge")}selected{/if}>{'xlarge'|@translate}</option>
+						<option value="xxlarge" {if ($options.thumbSize=="xxlarge")}selected{/if}>{'xxlarge'|@translate}</option>
+					</select>
+				</label></li>
+				<li><label>
+					<span class="property">{'Image size'|@translate}</span>&nbsp;
+					<select name="f_imageSize" style="min-width:150px;">
+						<option value="square" {if ($options.imageSize=="square")}selected{/if}>{'square'|@translate}</option>
+						<option value="thumb" {if ($options.imageSize=="thumb")}selected{/if}>{'thumb'|@translate}</option>
+						<option value="2small" {if ($options.imageSize=="2small")}selected{/if}>{'2small'|@translate}</option>
+						<option value="xsmall" {if ($options.imageSize=="xsmall")}selected{/if}>{'xsmall'|@translate}</option>
+						<option value="medium" {if ($options.imageSize=="medium")}selected{/if}>{'medium'|@translate}</option>
+						<option value="large" {if ($options.imageSize=="large")}selected{/if}>{'large'|@translate}</option>
+						<option value="xlarge" {if ($options.imageSize=="xlarge")}selected{/if}>{'xlarge'|@translate}</option>
+						<option value="xxlarge" {if ($options.imageSize=="xxlarge")}selected{/if}>{'xxlarge'|@translate}</option>
+					</select>
+				</label></li>
+				<li><label>
+					<span class="property">{'HD Image size'|@translate}</span>&nbsp;
+					<select name="f_hdSize" style="min-width:150px;">
+						<option value="square" {if ($options.hdSize=="square")}selected{/if}>{'square'|@translate}</option>
+						<option value="thumb" {if ($options.hdSize=="thumb")}selected{/if}>{'thumb'|@translate}</option>
+						<option value="2small" {if ($options.hdSize=="2small")}selected{/if}>{'2small'|@translate}</option>
+						<option value="xsmall" {if ($options.hdSize=="xsmall")}selected{/if}>{'xsmall'|@translate}</option>
+						<option value="medium" {if ($options.hdSize=="medium")}selected{/if}>{'medium'|@translate}</option>
+						<option value="large" {if ($options.hdSize=="large")}selected{/if}>{'large'|@translate}</option>
+						<option value="xlarge" {if ($options.hdSize=="xlarge")}selected{/if}>{'xlarge'|@translate}</option>
+						<option value="xxlarge" {if ($options.hdSize=="xxlarge")}selected{/if}>{'xxlarge'|@translate}</option>
+						<option value="original" {if ($options.hdSize=="original")}selected{/if}>{'original'|@translate}</option>
+					</select>
 				</label></li>
 			</ul>
Index: /extensions/stripped/admin/maintain.inc.php
===================================================================
--- /extensions/stripped/admin/maintain.inc.php	(revision 14686)
+++ /extensions/stripped/admin/maintain.inc.php	(revision 14687)
@@ -8,5 +8,5 @@
   {
     $config = array(
-	'paramVersion' 					=> '2.1',
+	'paramVersion' 					=> '2.2',
 	
 	'themeStyle'					=> 'black',
@@ -29,4 +29,9 @@
 	'defaultTab'					=> "none",
 
+	'albumSize'						=> "thumb",
+	'thumbSize'						=> "thumb",
+	'imageSize'						=> "xlarge",
+	'hdSize'						=> "original",
+	
 	'imageAutosize'					=> true,
 	'imageAutosizeMargin'			=> 60,
Index: /extensions/stripped/admin/upgrade.inc.php
===================================================================
--- /extensions/stripped/admin/upgrade.inc.php	(revision 14686)
+++ /extensions/stripped/admin/upgrade.inc.php	(revision 14687)
@@ -8,5 +8,5 @@
 {
     $config = array(
-	'paramVersion' 					=> '2.1',
+	'paramVersion' 					=> '2.2',
 	
 	'themeStyle'					=> 'black',
@@ -29,4 +29,9 @@
 	'defaultTab'					=> "none",
 
+	'albumSize'						=> "thumb",
+	'thumbSize'						=> "thumb",
+	'imageSize'						=> "xlarge",
+	'hdSize'						=> "original",
+	
 	'imageAutosize'					=> true,
 	'imageAutosizeMargin'			=> 60,
@@ -66,4 +71,11 @@
 		$config['imageArrows']=true;
 		$config['navArrows']=false;
+		$config['paramVersion']='2.2';
+		$config['albumType']='small';
+		$config['albumFrame']=$config['thumbFrame'];
+		$config['albumSize']='thumb';
+		$config['thumbSize']='thumb';
+		$config['imageSize']='xlarge';
+		$config['hdSize']='original';
 		  
 		conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
@@ -73,9 +85,28 @@
 
 			$config = $stripped;
-			$config['paramVersion']='2.1';
+			$config['paramVersion']='2.2';
 			$config['albumType']='small';
 			$config['albumFrame']=$config['thumbFrame'];
+			$config['albumSize']='thumb';
+			$config['thumbSize']='thumb';
+			$config['imageSize']='xlarge';
+			$config['hdSize']='original';
 			  
 			conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
+		
+		} else {
+			
+			if ($stripped['paramVersion'] == '2.1') {
+			
+			$config = $stripped;
+			$config['paramVersion']='2.2';
+			$config['albumSize']='thumb';
+			$config['thumbSize']='thumb';
+			$config['imageSize']='xlarge';
+			$config['hdSize']='original';
+			  
+			conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
+			
+			}
 		
 		}
Index: /extensions/stripped/readme.txt
===================================================================
--- /extensions/stripped/readme.txt	(revision 14686)
+++ /extensions/stripped/readme.txt	(revision 14687)
@@ -32,7 +32,7 @@
 ---------
 
-*** version 2.2.0.beta
-
-- first version for Piwigo 2.4 (beta test)
+*** version 2.2.0.beta2
+
+- betatest version for Piwigo 2.4
 
 *** version 2.1.4
Index: /extensions/stripped/template/about.tpl
===================================================================
--- /extensions/stripped/template/about.tpl	(revision 14686)
+++ /extensions/stripped/template/about.tpl	(revision 14687)
@@ -1,6 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/comments.tpl
===================================================================
--- /extensions/stripped/template/comments.tpl	(revision 14686)
+++ /extensions/stripped/template/comments.tpl	(revision 14687)
@@ -1,7 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
-
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/identification.tpl
===================================================================
--- /extensions/stripped/template/identification.tpl	(revision 14686)
+++ /extensions/stripped/template/identification.tpl	(revision 14687)
@@ -1,7 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
-
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/mainpage_categories.tpl
===================================================================
--- /extensions/stripped/template/mainpage_categories.tpl	(revision 14686)
+++ /extensions/stripped/template/mainpage_categories.tpl	(revision 14687)
@@ -9,5 +9,5 @@
 		<div class="illustration">
 			<a href="{$cat.URL}">
-				<img src="{$pwg->derivative_url($derivative_params, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}">
+				<img src="{$pwg->derivative_url($stripped.albumSize, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}">
 			</a>
 		</div>
Index: /extensions/stripped/template/nbm.tpl
===================================================================
--- /extensions/stripped/template/nbm.tpl	(revision 14686)
+++ /extensions/stripped/template/nbm.tpl	(revision 14687)
@@ -1,6 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/notification.tpl
===================================================================
--- /extensions/stripped/template/notification.tpl	(revision 14686)
+++ /extensions/stripped/template/notification.tpl	(revision 14687)
@@ -3,8 +3,4 @@
 <link rel="alternate" type="application/rss+xml" title="{'Complete RSS feed (photos, comments)'|@translate}" href="{$U_FEED}"> 
 {/html_head}
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/password.tpl
===================================================================
--- /extensions/stripped/template/password.tpl	(revision 14686)
+++ /extensions/stripped/template/password.tpl	(revision 14687)
@@ -1,6 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/picture.tpl
===================================================================
--- /extensions/stripped/template/picture.tpl	(revision 14686)
+++ /extensions/stripped/template/picture.tpl	(revision 14687)
@@ -1,4 +1,3 @@
-{define_derivative name='derivative_stripped_pict' type='xlarge'}
-{assign var=derivative value=$pwg->derivative($derivative_stripped_pict, $current.src_image)}
+{assign var=derivative value=$pwg->derivative($stripped.imageSize, $current.src_image)}
 {assign var='size' value=$derivative->get_size()}
 {literal}
Index: /extensions/stripped/template/picture_content.tpl
===================================================================
--- /extensions/stripped/template/picture_content.tpl	(revision 14686)
+++ /extensions/stripped/template/picture_content.tpl	(revision 14687)
@@ -4,5 +4,15 @@
 	$this->assign( 'stripped', $stripped );
 {/php}
-{if isset($U_ORIGINAL)}
+{if ($stripped.hdSize == 'original')}
+	{if isset($U_ORIGINAL)}
+		{assign var='displayHD' value=true}
+		{assign var='HD_url' value=$U_ORIGINAL}
+	{/if}
+{else}
+	{assign var='displayHD' value=true}
+	{assign var='HDderivative' value=$pwg->derivative($stripped.hdSize, $current.src_image)}
+	{assign var='HD_url' value=$HDderivative->get_url()}
+{/if}
+{if isset($displayHD)}
 	{if ($HDShadowbox_loaded)}
 		{assign var='pwghigh' value=true}
@@ -12,8 +22,8 @@
 {/if}
 <div id="theImg" {if ($stripped.imageFrame)}class="img_frame"{/if}>
-	{if isset($U_ORIGINAL)}
-		{if isset($pwghigh)}<a href="{$U_ORIGINAL}" rel="shadowbox" class="hd_link">&nbsp;</a>{/if}
-		{if isset($winhigh)}<div onclick="openDisplayHigh('{$U_ORIGINAL}');" class="hd_link">&nbsp;</div>{/if}
-		{if ($stripped.imagePreloadHD)}<div class="preload" style="display:none;">{$U_ORIGINAL}</div>{/if}
+	{if isset($displayHD)}
+		{if isset($pwghigh)}<a href="{$HD_url}" rel="shadowbox" class="hd_link">&nbsp;</a>{/if}
+		{if isset($winhigh)}<div onclick="openDisplayHigh('{$HD_url}');" class="hd_link">&nbsp;</div>{/if}
+		{if ($stripped.imagePreloadHD)}<div class="preload" style="display:none;">{$HD_url}</div>{/if}
 	{/if}
 	{if ($stripped.imageArrows) }
@@ -28,6 +38,5 @@
 		{/if}
 	{/if}
-  {define_derivative name='derivative_stripped_pict' type='xlarge'}
-  {assign var=derivative value=$pwg->derivative($derivative_stripped_pict, $current.src_image)}
+  {assign var=derivative value=$pwg->derivative($stripped.imageSize, $current.src_image)}
 	<img src="{$derivative->get_url()}" {$derivative->get_size_htm()} alt="{$ALT_IMG}" id="theMainImage" class="hideTabs">
 </div>
Index: /extensions/stripped/template/profile.tpl
===================================================================
--- /extensions/stripped/template/profile.tpl	(revision 14686)
+++ /extensions/stripped/template/profile.tpl	(revision 14687)
@@ -1,6 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/register.tpl
===================================================================
--- /extensions/stripped/template/register.tpl	(revision 14686)
+++ /extensions/stripped/template/register.tpl	(revision 14687)
@@ -1,6 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/search.tpl
===================================================================
--- /extensions/stripped/template/search.tpl	(revision 14686)
+++ /extensions/stripped/template/search.tpl	(revision 14687)
@@ -1,6 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/slideshow.tpl
===================================================================
--- /extensions/stripped/template/slideshow.tpl	(revision 14686)
+++ /extensions/stripped/template/slideshow.tpl	(revision 14687)
@@ -4,8 +4,10 @@
 {/literal}
 {/html_head}
+{assign var=derivative value=$pwg->derivative($stripped.imageSize, $current.src_image)}
+{assign var='size' value=$derivative->get_size()}
 {literal}
 <script type="text/javascript">
-var image_w = {/literal}{$WIDTH_IMG}{literal}
-var image_h = {/literal}{$HEIGHT_IMG}{literal}
+var image_w = {/literal}{$size[0]}{literal}
+var image_h = {/literal}{$size[1]}{literal}
 </script>
 {/literal}
Index: /extensions/stripped/template/tags.tpl
===================================================================
--- /extensions/stripped/template/tags.tpl	(revision 14686)
+++ /extensions/stripped/template/tags.tpl	(revision 14687)
@@ -1,6 +1,2 @@
-{php}
-	global $conf;
-	$this->assign('LEVEL_SEPARATOR', $conf[ 'level_separator' ]);
-{/php}
 <div class="titrePage">
 	<div class="browsePath">
Index: /extensions/stripped/template/thumbnails.tpl
===================================================================
--- /extensions/stripped/template/thumbnails.tpl	(revision 14686)
+++ /extensions/stripped/template/thumbnails.tpl	(revision 14687)
@@ -1,9 +1,12 @@
+{php}
+	global $stripped;
+	$this->assign( 'stripped', $stripped );
+{/php}
 {if !empty($thumbnails)}{strip}
 {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
 {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
-{*define_derivative name='derivative_params' width=160 height=90 crop=true*}
 <ul class="thumbList">
 	{foreach from=$thumbnails item=thumbnail}
-		{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
+		{assign var=derivative value=$pwg->derivative($stripped.thumbSize, $thumbnail.src_image)}
 		{php}
 			global $pwg_loaded_plugins, $conf, $stripped;
@@ -16,5 +19,8 @@
 					<a href="{$thumbnail.URL}"><div class="thumbframe"><div class="thumbpos">
 						<img class="thumbnail" {if !$derivative->is_cached()}data-{/if}src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" {if ((isset($thumbnail.NAME))&!($downloadMulti_loaded))}title="{$thumbnail.NAME}"{else}title="{$thumbnail.TN_TITLE}"{/if} />
-						{if (isset($stripped.imagePreload) & isset($stripped.imagePreloadThumbs))}<div class="preload" style="display:none;">{$thumbnail.FILE_PATH}</div>{/if}
+						{if (isset($stripped.imagePreload) & isset($stripped.imagePreloadThumbs))}
+							{assign var=preload value=$pwg->derivative($stripped.imageSize, $thumbnail.src_image)}
+							<div class="preload" style="display:none;">{$preload->get_url()}</div>
+						{/if}
 					</div></div></a>
 				</span>
Index: /extensions/stripped/themeconf.inc.php
===================================================================
--- /extensions/stripped/themeconf.inc.php	(revision 14686)
+++ /extensions/stripped/themeconf.inc.php	(revision 14687)
@@ -25,4 +25,10 @@
 // Need upgrade from v2.x?
 if (!isset($stripped['paramVersion'])) {
+	include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
+	$stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped );
+}
+
+// Need upgrade from v2.1?
+if ((isset($stripped['paramVersion'])) && ($stripped['paramVersion'] == '2.1')) {
 	include(PHPWG_THEMES_PATH.'stripped/admin/upgrade.inc.php');
 	$stripped = array_merge( unserialize( $conf['stripped'] ), (array)$stripped );
