Index: /extensions/piclens/admin/rssfeed.php
===================================================================
--- /extensions/piclens/admin/rssfeed.php	(revision 18641)
+++ /extensions/piclens/admin/rssfeed.php	(revision 18642)
@@ -113,9 +113,9 @@
 
 // Selection des groupes
-$exts = get_all_exts();
-if (!empty($exts))
-{
-  $template->assign('file_types',  get_html_exts_selection($exts, 'file_types', $me->my_config['included_file_types']));
-}
+// $exts = get_all_exts();
+// if (!empty($exts))
+// {
+//   $template->assign('file_types',  get_html_exts_selection($exts, 'file_types', $me->my_config['included_file_types']));
+// }
 
 /*
Index: /extensions/piclens/admin/rssfeed.tpl
===================================================================
--- /extensions/piclens/admin/rssfeed.tpl	(revision 18641)
+++ /extensions/piclens/admin/rssfeed.tpl	(revision 18642)
@@ -15,30 +15,4 @@
 
      <br/>
-<div>
-<fieldset>
-	<legend>{'piclens_rsscfg_exttitle'|@translate}</legend>
-	<TABLE border="0" CELLPADDING="3"  ALIGN="LEFT">
-		<TR>
-			<TD > 
-			    {'piclens_rsscfg_ext'|@translate}
-			</TD > 
-			<td colspan="2">{$file_types}
-			</td>
-		</TR>
-		<TR>
-			<TD > &nbsp;
-			</TD > 
-			<TD colspan="2"> 
-			    <i>{'piclens_rsscfg_ext1'|@translate}</i>
-			</TD > 
-		</TR>
-		<TR>
-			<td colspan="3"><i>&nbsp;&nbsp; {'piclens_rsscfg_ext2'|@translate}</i>
-			</td>
-		</TR>
-	</TABLE>
-</fieldset>
-
-</div>
 
 <div>
Index: /extensions/piclens/generate_rss.php
===================================================================
--- /extensions/piclens/generate_rss.php	(revision 18641)
+++ /extensions/piclens/generate_rss.php	(revision 18642)
@@ -62,4 +62,19 @@
 		$cat = array();
 		$pictures = array();
+
+    $basic_fields = array(
+      'DISTINCT(img.id)',
+      'img.file',
+      'img.date_available',
+      'img.date_creation',
+      'img.name',
+      'img.comment',
+      'img.author',
+      'img.hit',
+      'img.filesize',
+      'img.rating_score',
+      'img.path',
+      'img.level',
+      );
 
 		$forbidden = get_sql_condition_FandF(
@@ -87,18 +102,12 @@
 			array_push($cat, "1");
 
-			$query = 'SELECT DISTINCT(img.id), img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-					  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-					  img.level '
-					.' FROM ' . IMAGES_TABLE.' AS img'
-					.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
-					.' WHERE
-						img.date_available >= SUBDATE(
-						CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY) '
-                    .get_sql_condition_FandF
-						(
-							array('visible_images' => 'id'),
-							'AND'
-						)
-					.' '.$conf['order_by'].';';
+			$query = '
+SELECT '.implode(',', $basic_fields).'
+  FROM ' . IMAGES_TABLE.' AS img
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id
+  WHERE img.date_available >= SUBDATE(CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)
+    '.get_sql_condition_FandF(array('visible_images' => 'id'), 'AND').'
+  '.$conf['order_by'].'
+;';
 		}
 		// Plus vues
@@ -108,17 +117,23 @@
 			array_push($cat, "1");
 
-			$query = 'SELECT DISTINCT(img.id), img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-					  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-					  img.level, ic.category_id, cat.name AS catname, cat.comment AS catcomment, cat.rank, cat.status, 
-					  cat.visible, cat.uppercats, cat.permalink, cat.dir '
-					.' FROM ' . IMAGES_TABLE.' AS img'
-					.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
-					.' INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id'			
-					.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON cat.id = cat_id and user_id = '.$user['id']
-					.' WHERE date_last >= SUBDATE(
-						CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY
-						)
-                    '.$forbidden
-                    .';';
+			$query = '
+SELECT
+    '.implode(',', $basic_fields).',
+    ic.category_id,
+    cat.name AS catname,
+    cat.comment AS catcomment,
+    cat.rank,
+    cat.status,
+    cat.visible,
+    cat.uppercats,
+    cat.permalink,
+    cat.dir
+  FROM '.IMAGES_TABLE.' AS img
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id
+    INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id
+    INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON cat.id = cat_id and user_id = '.$user['id'].'
+  WHERE date_last >= SUBDATE(CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)
+    '.$forbidden.'
+;';
 		}
 		
@@ -128,16 +143,24 @@
 			// $cat need to bo not null...
 			array_push($cat, "1");
-			$query = 'SELECT DISTINCT(img.id), img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-					  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-					  img.level, ic.category_id, cat.name AS catname, cat.comment AS catcomment, cat.rank, cat.status, 
-					  cat.visible, cat.uppercats, cat.permalink, cat.dir '
-					.' FROM ' . IMAGES_TABLE.' AS img'
-					.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
-					.' INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id'			
-					.' WHERE img.hit > 0 '
-				    .$forbidden
-					.' ORDER BY hit DESC, file ASC'
-					.' LIMIT 0, '.$conf['top_number'].';';
-		
+			$query = '
+SELECT
+    '.implode(',', $basic_fields).',
+    ic.category_id,
+    cat.name AS catname,
+    cat.comment AS catcomment,
+    cat.rank,
+    cat.status,
+    cat.visible,
+    cat.uppercats,
+    cat.permalink,
+    cat.dir
+  FROM '.IMAGES_TABLE.' AS img
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id
+    INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id
+  WHERE img.hit > 0
+    '.$forbidden.'
+  ORDER BY hit DESC, file ASC
+  LIMIT 0, '.$conf['top_number'].'
+;';
 		}
 		// mieux notees	
@@ -147,17 +170,13 @@
 			array_push($cat, "1");
 
-			$query = 'SELECT DISTINCT(img.id), img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-					  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-					  img.level '
-					.' FROM ' . IMAGES_TABLE.' AS img'
-					.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
-					.' WHERE img.rating_score IS NOT NULL '
-					.get_sql_condition_FandF
-						(
-							array('visible_images' => 'id'),
-							'AND'
-						)
-					.' ORDER BY rating_score DESC, id ASC'
-					.' LIMIT 0, '.$conf['top_number'].';';
+			$query = '
+SELECT '.implode(',', $basic_fields).'
+  FROM ' . IMAGES_TABLE.' AS img
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id
+  WHERE img.rating_score IS NOT NULL
+    '.get_sql_condition_FandF(array('visible_images' => 'id'), 'AND').'
+  ORDER BY rating_score DESC, id ASC
+  LIMIT 0, '.$conf['top_number'].'
+;';
 		}
 		elseif ($page['section'] == 'favorites')
@@ -167,17 +186,13 @@
 			array_push($cat, "1");
 
-			$query = 'SELECT img.id, img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-					  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-					  img.level  '
-					.' FROM '.FAVORITES_TABLE.' AS fav '
-					.' INNER JOIN '.IMAGES_TABLE.' AS img ON fav.image_id = img.id'
-					.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
-					.' WHERE user_id = '.$user['id']
-					.' '.get_sql_condition_FandF
-						(
-							array('visible_images' => 'id'),
-							'AND'
-						)
-					.' '.$conf['order_by'].';';
+			$query = '
+SELECT '.implode(',', $basic_fields).'
+  FROM '.FAVORITES_TABLE.' AS fav
+    INNER JOIN '.IMAGES_TABLE.' AS img ON fav.image_id = img.id
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id
+  WHERE user_id = '.$user['id'].'
+  '.get_sql_condition_FandF(array('visible_images' => 'id'), 'AND').'
+  '.$conf['order_by'].'
+;';
 		}
 
@@ -210,16 +225,11 @@
 			// $cat need to bo not null...
 			array_push($cat, "1");
-			$query = 'SELECT distinct(img.id), img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-					  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-					  img.level  '
-					.' FROM '.IMAGES_TABLE.' AS img '
-					.' WHERE img.id IN ('.implode(',', $items).') '
-
-					.' '.get_sql_condition_FandF
-						(
-							array('visible_images' => 'id'),
-							'AND'
-						)
-					.' '.$conf['order_by'].';';
+			$query = '
+SELECT '.implode(',', $basic_fields).'
+  FROM '.IMAGES_TABLE.' AS img
+  WHERE img.id IN ('.implode(',', $items).')
+  '.get_sql_condition_FandF(array('visible_images' => 'id'), 'AND').'
+  '.$conf['order_by'].'
+;';
 		}
 		
@@ -274,21 +284,24 @@
 					}
 
-					$query = 'SELECT DISTINCT(img.id), img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-							  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-							  img.level, ic.category_id, cat.name AS catname, cat.comment AS catcomment, cat.rank, cat.status, 
-							  cat.visible, cat.uppercats, cat.permalink, cat.dir '
-					.' FROM ' . IMAGES_TABLE.' AS img'
-					.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
-					.' INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id'
-					.' WHERE ic.category_id IN ('.implode(',', $cat).')'
-					.(sizeof($obj->my_config['included_file_types']) ? ' AND (img.tn_ext IN ('.implode(',', $type_ext).')' : '')
-					.($tn_ext_is_null ? ' OR img.tn_ext IS NULL)' : (sizeof($obj->my_config['included_file_types']) ? ')' : ''))
-					// Verif droits (niveaux) de l'utilisateur sur les images 
-					.' AND img.level <='.$user['level'].' '
-					// Choix du critere de tri d'affichage
-					.$order_list[ $obj->my_config['piclens_order'] ]
-					.$order_sort[ $obj->my_config['piclens_sort'] ];
-					
-					
+					$query = '
+SELECT
+    '.implode(',', $basic_fields).',
+    ic.category_id,
+    cat.name AS catname,
+    cat.comment AS catcomment,
+    cat.rank,
+    cat.status, 
+    cat.visible,
+    cat.uppercats,
+    cat.permalink,
+    cat.dir
+  FROM '.IMAGES_TABLE.' AS img
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id
+    INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id
+  WHERE ic.category_id IN ('.implode(',', $cat).')
+    AND img.level <='.$user['level'].'
+  '.$order_list[ $obj->my_config['piclens_order'] ].'
+  '.$order_sort[ $obj->my_config['piclens_sort'] ].'
+;';
 				}
 			}
@@ -342,19 +355,24 @@
 				}
 					
-				$query = 'SELECT DISTINCT(img.id), img.file, img.date_available, img.date_creation, img.tn_ext, img.name, 
-						  img.comment, img.author, img.hit ,img.filesize, img.rating_score, img.has_high, img.path, 
-						  img.level, ic.category_id, cat.name AS catname, cat.comment AS catcomment, cat.rank, cat.status, 
-						  cat.visible, cat.uppercats, cat.permalink, cat.dir '
-				.' FROM ' . IMAGES_TABLE.' AS img'
-				.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id'
-				.' INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id'
-				.' WHERE ic.category_id IN ('.implode(',', $cat).')'
-				.(sizeof($obj->my_config['included_file_types']) ? ' AND (img.tn_ext IN ('.implode(',', $type_ext).')' : '')
-				.($tn_ext_is_null ? ' OR img.tn_ext IS NULL)' : (sizeof($obj->my_config['included_file_types']) ? ')' : ''))
-				// Verif droits (niveaux) de l'utilisateur sur les images 
-				.' AND img.level <='.$user['level'].' '
-				// Choix du critere de tri d'affichage
-				.$order_list[ $obj->my_config['piclens_order_cat'] ]
-				.$order_sort[ $obj->my_config['piclens_sort_cat'] ];
+				$query = '
+SELECT
+    '.implode(',', $basic_fields).',
+    ic.category_id,
+    cat.name AS catname,
+    cat.comment AS catcomment,
+    cat.rank,
+    cat.status, 
+    cat.visible,
+    cat.uppercats,
+    cat.permalink,
+    cat.dir
+  FROM '.IMAGES_TABLE.' AS img
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON img.id = ic.image_id
+    INNER JOIN '.CATEGORIES_TABLE.' AS cat ON ic.category_id = cat.id
+  WHERE ic.category_id IN ('.implode(',', $cat).')
+    AND img.level <='.$user['level'].'
+    '.$order_list[ $obj->my_config['piclens_order_cat'] ].'
+    '.$order_sort[ $obj->my_config['piclens_sort_cat'] ].'
+;';
 
 				}
@@ -441,6 +459,7 @@
                 .(strlen($obj->my_config['piclens_rss_icon'])
                                     ? $obj->my_config['piclens_rss_icon']
-                                    : $obj->root_site_piclens.'template-common/favicon.ico')
+                                    : $obj->root_site_piclens.'plugins/piclens/icon/rss_icon.png')
                 .'</atom:icon>';
+
 		echo "\n";
 
@@ -451,8 +470,4 @@
 			// Mode de l'image parametre
 			$piclens_normal = $obj->my_config['piclens_normal'];
-
-			// si parametrage high et high absente ou utilisateur non habilite, affichage version normale
-			if (($piclens_normal == 3) && (!($row['has_high']) || !$user['enabled_high']))
-				$piclens_normal = 2; // Normal uniquement pour l'image en cours
 
 			// Get thumbnail url
@@ -469,31 +484,33 @@
 			{
 				$link_url = $obj->root_site_piclens.$row['path'];
+
+                                $src_image = new SrcImage($row);
+                                set_make_full_url();
+                                $thumb_url = DerivativeImage::url(IMG_THUMB, $src_image);
+                                $medium_url = DerivativeImage::url(IMG_MEDIUM, $src_image);
+                                $high_url = DerivativeImage::url(IMG_XXLARGE, $src_image);
+                                unset_make_full_url();
 				
 				if ( ($obj->my_config['piclens_thumb']) == 2) 	// Normal
-					$thumbnail_url = (url_is_remote($row['path']) ? $row['path']: embellish_url($obj->root_site_piclens.$row['path']));
+                                {
+                                  $thumbnail_url = $medium_url;
+                                }
 				else
 				{
-                    $path=get_thumbnail_location($row);
-                    $thumbnail_url = ( url_is_remote($path) ? $path : embellish_url($obj->root_site_piclens.$path) );
-				}	
-
-				switch ($piclens_normal)
-				{
-					case 1 : // miniature
-                        $path=get_thumbnail_location($row);
-                        $content_url = ( url_is_remote($path) ? $path : embellish_url($obj->root_site_piclens.$path) );
-						break;
-					case 2 : // normal
-						$content_url = (url_is_remote($row['path']) ? $row['path']: embellish_url($obj->root_site_piclens.$row['path']));
-						break;
-					case 3 : 
-						 $content_url =  (url_is_remote($row['path']) ? dirname($row['path']).'/pwg_high/'.basename($row['path']) 
-																	  : embellish_url( $obj->root_site_piclens. dirname($row['path']).'/pwg_high/'.basename($row['path']))
-										 );
-						 break;
-					default : // normal
-						$content_url =  (url_is_remote($row['path']) ? $row['path'] : embellish_url($obj->root_site_piclens.$row['path']));
-						break;
+                                  $thumbnail_url = $thumb_url;
 				}
+
+                                if (1 == $piclens_normal)
+                                {
+                                  $content_url = $thumb_url;
+                                }
+                                elseif (3 == $piclens_normal)
+                                {
+                                  $content_url = $high_url;
+                                }
+                                else
+                                {
+                                  $content_url = $medium_url;
+                                }
 			}
 			
Index: /extensions/piclens/include/config_param.inc.php
===================================================================
--- /extensions/piclens/include/config_param.inc.php	(revision 18641)
+++ /extensions/piclens/include/config_param.inc.php	(revision 18642)
@@ -27,12 +27,7 @@
 										  : ''  ,
 		'%I4'	=> isset($row['author']) ? $row['author'] : ''  ,
-		'%I5'	=> isset ($row) ? (get_thumbnail_location($row)) : '' ,
-		'%I6'	=> isset($row['path']) ? $row['path']: '',
-		'%I7'	=> isset($row['path']) ? 
-                                            ($row['has_high'] and (isset($user['enabled_high']) and $user['enabled_high']) 
-                                                ? dirname($row['path']).'/pwg_high/'.basename($row['path']) 
-                                                : $row['path'])
-                                          : '',
-
+		'%I5'	=> isset ($row) ? DerivativeImage::url(IMG_THUMB, new SrcImage($row)) : '',
+		'%I6'	=> isset($row['path']) ? DerivativeImage::url(IMG_MEDIUM, new SrcImage($row)) : '',
+		'%I7'	=> isset($row['path']) ? DerivativeImage::url(IMG_XXLARGE, new SrcImage($row)) : '',
 								
 		'%I8'	=> (isset($row['category_id']) & isset($row['catname'])) ?
@@ -55,14 +50,8 @@
 					,
 
-		'%I9'	=> isset ($row) ? ( url_is_remote(get_thumbnail_location($row)) ? get_thumbnail_location($row) : embellish_url(get_root_url().get_thumbnail_location($row))) : '' ,
-		'%IA'	=> isset($row['path']) ? (url_is_remote($row['path']) ? $row['path']: embellish_url(get_root_url().$row['path'])) : '',
-		'%IB'	=> isset($row['path']) ? 
-                                            ($row['has_high'] and (isset($user['enabled_high']) and $user['enabled_high']) 
-                                                ? (url_is_remote($row['path']) 
-                                                    ? dirname($row['path']).'/pwg_high/'.basename($row['path']) 
-                                                    : embellish_url( get_root_url(). dirname($row['path']).'/pwg_high/'.basename($row['path'])))
-                                                : (url_is_remote($row['path']) ? $row['path']: embellish_url(get_root_url().$row['path']))
-                                            )
-										  : '',								
+		'%I9'	=> isset ($row) ? embellish_url(get_root_url().DerivativeImage::url(IMG_THUMB, new SrcImage($row))) : '' ,
+		'%IA'	=> isset($row['path']) ? embellish_url(get_root_url().DerivativeImage::url(IMG_MEDIUM, new SrcImage($row))) : '' ,
+		'%IB'	=> isset($row['path']) ? embellish_url(get_root_url().DerivativeImage::url(IMG_XXLARGE, new SrcImage($row))) : '' ,
+                
 		'%IC'	=> isset($row['file']) ? $row['file'] : ''  ,
 		'%ID'	=> isset($row['id']) ? get_comment($row['id'], $nb_comment) : ''  ,
Index: /extensions/piclens/include/default_values.inc.php
===================================================================
--- /extensions/piclens/include/default_values.inc.php	(revision 18641)
+++ /extensions/piclens/include/default_values.inc.php	(revision 18642)
@@ -83,6 +83,6 @@
 
 
-$piclens_default_values['piclens_rss_name'] = "Nom : %I2"; // Nom
-$piclens_default_values['piclens_rss_desc'] = "(%I3)"; // Description
+$piclens_default_values['piclens_rss_name'] = "%I2"; // Nom
+$piclens_default_values['piclens_rss_desc'] = "%I3"; // Description
 
 $piclens_default_values['piclens_exclude_double']	= false; // Suppression des doublons
