Index: /extensions/PWG_Stuffs/include/stuffs.inc.php
===================================================================
--- /extensions/PWG_Stuffs/include/stuffs.inc.php	(revision 4967)
+++ /extensions/PWG_Stuffs/include/stuffs.inc.php	(revision 4968)
@@ -37,5 +37,5 @@
 }
 
-$template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.$stuffs->get_template($css_file).'">', $smarty, $repeat);
+$template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.get_root_url().ltrim($stuffs->get_template($css_file), '/\\.').'">', $smarty, $repeat);
 
 ?>
Index: /extensions/PWG_Stuffs/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/PWG_Stuffs/language/de_DE/plugin.lang.php	(revision 4967)
+++ /extensions/PWG_Stuffs/language/de_DE/plugin.lang.php	(revision 4968)
@@ -154,3 +154,10 @@
 $lang['module_Citation_code'] = 'Dazugehöriger Code';
 
+//------------------------------------------------------------------------------
+//							Module Featured Photos
+//------------------------------------------------------------------------------
+
+/*TODO*/$lang['module_name_FeaturedPhotos'] = 'Featured Photos';
+/*TODO*/$lang['module_desc_FeaturedPhotos'] = 'Display favorites photos of the webmaster';
+
 ?>
Index: /extensions/PWG_Stuffs/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/PWG_Stuffs/language/en_UK/plugin.lang.php	(revision 4967)
+++ /extensions/PWG_Stuffs/language/en_UK/plugin.lang.php	(revision 4968)
@@ -154,3 +154,10 @@
 $lang['module_Citation_code'] = 'Related code';
 
+//------------------------------------------------------------------------------
+//							Module Featured Photos
+//------------------------------------------------------------------------------
+
+$lang['module_name_FeaturedPhotos'] = 'Featured Photos';
+$lang['module_desc_FeaturedPhotos'] = 'Display favorites photos of the webmaster';
+
 ?>
Index: /extensions/PWG_Stuffs/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/PWG_Stuffs/language/es_ES/plugin.lang.php	(revision 4967)
+++ /extensions/PWG_Stuffs/language/es_ES/plugin.lang.php	(revision 4968)
@@ -153,3 +153,10 @@
 $lang['module_Citation_code'] = 'Código asociado';
 
+//------------------------------------------------------------------------------
+//							Module Featured Photos
+//------------------------------------------------------------------------------
+
+/*TODO*/$lang['module_name_FeaturedPhotos'] = 'Featured Photos';
+/*TODO*/$lang['module_desc_FeaturedPhotos'] = 'Display favorites photos of the webmaster';
+
 ?>
Index: /extensions/PWG_Stuffs/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/PWG_Stuffs/language/fr_FR/plugin.lang.php	(revision 4967)
+++ /extensions/PWG_Stuffs/language/fr_FR/plugin.lang.php	(revision 4968)
@@ -154,3 +154,10 @@
 $lang['module_Citation_code'] = 'Code associé';
 
+//------------------------------------------------------------------------------
+//							Module Featured Photos
+//------------------------------------------------------------------------------
+
+$lang['module_name_FeaturedPhotos'] = 'Images du jour';
+$lang['module_desc_FeaturedPhotos'] = 'Affiche les images favorites du webmaster';
+
 ?>
Index: /extensions/PWG_Stuffs/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/PWG_Stuffs/language/it_IT/plugin.lang.php	(revision 4967)
+++ /extensions/PWG_Stuffs/language/it_IT/plugin.lang.php	(revision 4968)
@@ -154,3 +154,10 @@
 $lang['module_Citation_code'] = 'Codice associato';
 
+//------------------------------------------------------------------------------
+//							Module Featured Photos
+//------------------------------------------------------------------------------
+
+/*TODO*/$lang['module_name_FeaturedPhotos'] = 'Featured Photos';
+/*TODO*/$lang['module_desc_FeaturedPhotos'] = 'Display favorites photos of the webmaster';
+
 ?>
Index: /extensions/PWG_Stuffs/language/ru_RU/plugin.lang.php
===================================================================
--- /extensions/PWG_Stuffs/language/ru_RU/plugin.lang.php	(revision 4967)
+++ /extensions/PWG_Stuffs/language/ru_RU/plugin.lang.php	(revision 4968)
@@ -160,3 +160,10 @@
 /* TODO */$lang['module_Citation_code'] = 'Related code';
 
+//------------------------------------------------------------------------------
+//							Module Featured Photos
+//------------------------------------------------------------------------------
+
+/*TODO*/$lang['module_name_FeaturedPhotos'] = 'Featured Photos';
+/*TODO*/$lang['module_desc_FeaturedPhotos'] = 'Display favorites photos of the webmaster';
+
 ?>
Index: /extensions/PWG_Stuffs/modules/FeaturedPhotos/config.inc.php
===================================================================
--- /extensions/PWG_Stuffs/modules/FeaturedPhotos/config.inc.php	(revision 4968)
+++ /extensions/PWG_Stuffs/modules/FeaturedPhotos/config.inc.php	(revision 4968)
@@ -0,0 +1,8 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
+$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
+
+?>
Index: /extensions/PWG_Stuffs/modules/FeaturedPhotos/config.tpl
===================================================================
--- /extensions/PWG_Stuffs/modules/FeaturedPhotos/config.tpl	(revision 4968)
+++ /extensions/PWG_Stuffs/modules/FeaturedPhotos/config.tpl	(revision 4968)
@@ -0,0 +1,1 @@
+<p>{'stuffs_no_options'|@translate}</p>
Index: /extensions/PWG_Stuffs/modules/FeaturedPhotos/index.php
===================================================================
--- /extensions/PWG_Stuffs/modules/FeaturedPhotos/index.php	(revision 4968)
+++ /extensions/PWG_Stuffs/modules/FeaturedPhotos/index.php	(revision 4968)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | 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 |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/PWG_Stuffs/modules/FeaturedPhotos/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/modules/FeaturedPhotos/main.inc.php	(revision 4968)
+++ /extensions/PWG_Stuffs/modules/FeaturedPhotos/main.inc.php	(revision 4968)
@@ -0,0 +1,144 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $page, $user, $conf, $template;
+
+$forbidden = get_sql_condition_FandF
+  (
+    array
+      (
+        'forbidden_categories' => 'ic.category_id',
+        'visible_categories' => 'ic.category_id',
+        'visible_images' => 'i.id'
+      ),
+    'AND'
+  );
+  
+$query ='
+SELECT DISTINCT(i.id)
+  FROM '.IMAGES_TABLE.' AS i
+    INNER JOIN '.FAVORITES_TABLE.' AS f       ON image_id = id
+    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id = ic.image_id
+    INNER JOIN '.CATEGORIES_TABLE.' AS c      ON ic.category_id = c.id
+      WHERE f.user_id = '.$conf['webmaster_id'].'
+       '.$forbidden.';';
+
+$pictures = array();
+$selection = array_from_query($query, 'id');
+
+if (count($selection) > 0)
+{
+  $rank_of = array_flip($selection);
+
+  $query = '
+SELECT *
+  FROM '.IMAGES_TABLE.'
+  WHERE id IN ('.implode(',', $selection).')
+;';
+  $result = pwg_query($query);
+  while ($row = mysql_fetch_assoc($result))
+  {
+    $row['rank'] = $rank_of[ $row['id'] ];
+
+    array_push($pictures, $row);
+  }
+
+  usort($pictures, 'rank_compare');
+  unset($rank_of);
+}
+
+if (count($pictures) > 0)
+{
+  if ($user['show_nb_comments'])
+  {
+    $query = '
+SELECT image_id, COUNT(*) AS nb_comments
+  FROM '.COMMENTS_TABLE.'
+  WHERE validated = \'true\'
+    AND image_id IN ('.implode(',', $selection).')
+  GROUP BY image_id
+;';
+    $nb_comments_of = simple_hash_from_query($query, 'image_id', 'nb_comments');
+  }
+
+  // template thumbnail initialization
+  $template->set_filenames( array( 'pwgs_feat' => 'thumbnails.tpl',));
+
+  trigger_action('loc_begin_index_thumbnails', $pictures);
+  $tpl_thumbnails_var = array();
+
+  foreach ($pictures as $row)
+  {
+    // link on picture.php page
+    $url = duplicate_picture_url(
+          array(
+            'image_id' => $row['id'],
+            'image_file' => $row['file']
+          ),
+          array('start')
+        );
+    $url = add_url_params($url, array('pwgs_ra' => implode(',',$selection)));
+
+    $tpl_var =
+      array(
+        'ID'        => $row['id'],
+        'TN_SRC'    => get_thumbnail_url($row),
+        'TN_ALT'    => $row['file'],
+        'TN_TITLE'  => get_thumbnail_title($row),
+        'ICON_TS'   => get_icon($row['date_available']),
+        'URL'       => $url,
+
+     /* Fields for template-extension usage */
+        'FILE_PATH' => $row['path'],
+        'FILE_POSTED' => $row['date_available'],
+        'FILE_CREATED' => $row['date_creation'],
+        'FILE_DESC' => $row['comment'],
+        'FILE_AUTHOR' => $row['author'],
+        'FILE_HIT' => $row['hit'],
+        'FILE_SIZE' => $row['filesize'],
+        'FILE_WIDTH' => $row['width'],
+        'FILE_HEIGHT' => $row['height'],
+        'FILE_METADATE' => $row['date_metadata_update'],
+        'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ?
+                  true:false, /* lack of include/functions_picture.inc.php */
+      );
+
+    if ($user['show_nb_hits'])
+    {
+      $tpl_var['NB_HITS'] = $row['hit'];
+    }
+
+    if ($conf['show_thumbnail_caption'])
+    {// name of the picture
+      if (isset($row['name']) and $row['name'] != '')
+      {
+        $name = $row['name'];
+      }
+      else
+      {
+        $name = str_replace('_', ' ', get_filename_wo_extension($row['file']));
+      }
+
+      $tpl_var['NAME'] = $name;
+    }
+
+    if ( isset($nb_comments_of) )
+    {
+      $tpl_var['NB_COMMENTS'] = (int)@$nb_comments_of[$row['id']];
+    }
+
+    $tpl_thumbnails_var[] = $tpl_var;
+  }
+
+  $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
+  $template->assign('thumbnails', $tpl_thumbnails_var);
+
+  $block['CONTENT'] = $template->parse('pwgs_feat', true);
+}
+else
+{
+  return false;
+}
+
+?>
Index: /extensions/PWG_Stuffs/template/FeaturedPhotos.tpl
===================================================================
--- /extensions/PWG_Stuffs/template/FeaturedPhotos.tpl	(revision 4968)
+++ /extensions/PWG_Stuffs/template/FeaturedPhotos.tpl	(revision 4968)
@@ -0,0 +1,1 @@
+{$block.CONTENT}
