Index: /extensions/PWG_Stuffs/trunk/modules/BestRated/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/trunk/modules/BestRated/main.inc.php	(revision 16689)
+++ /extensions/PWG_Stuffs/trunk/modules/BestRated/main.inc.php	(revision 16690)
@@ -3,8 +3,7 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-global $page, $user, $conf, $template;
+global $page, $user, $conf;
 
 $page_save = $page;
-$tpl_save = $template->get_template_vars('THUMBNAILS');
 
 if (script_basename() == 'picture'
@@ -52,14 +51,16 @@
 $page['section'] = 'best_rated';
 
+$tpl_thumbnails_var = array();
+$pwg_stuffs_tpl_thumbnails_var = & $tpl_thumbnails_var;
 include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
 
-if (!empty($tpl_thumbnails_var))
+if (!empty($pwg_stuffs_tpl_thumbnails_var))
 {
-  $block['thumbnails'] = $tpl_thumbnails_var;
+  $block['thumbnails'] = $pwg_stuffs_tpl_thumbnails_var;
+  $block['derivative_params'] = ImageStdParams::get_by_type(IMG_THUMB);
   $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
 $page = $page_save;
-$template->assign('THUMBNAILS', $tpl_save);
 
 ?>
Index: /extensions/PWG_Stuffs/trunk/modules/FeaturedPhotos/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/trunk/modules/FeaturedPhotos/main.inc.php	(revision 16689)
+++ /extensions/PWG_Stuffs/trunk/modules/FeaturedPhotos/main.inc.php	(revision 16690)
@@ -3,8 +3,7 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-global $page, $user, $conf, $template;
+global $page, $user, $conf;
 
 $page_save = $page;
-$tpl_save = $template->get_template_vars('THUMBNAILS');
 
 $forbidden = get_sql_condition_FandF
@@ -33,14 +32,16 @@
 $page['section'] = 'category';
 
+$tpl_thumbnails_var = array();
+$pwg_stuffs_tpl_thumbnails_var = & $tpl_thumbnails_var;
 include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
 
-if (!empty($tpl_thumbnails_var))
+if (!empty($pwg_stuffs_tpl_thumbnails_var))
 {
-  $block['thumbnails'] = $tpl_thumbnails_var;
+  $block['thumbnails'] = $pwg_stuffs_tpl_thumbnails_var;
+  $block['derivative_params'] = ImageStdParams::get_by_type(IMG_THUMB);
   $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
 $page = $page_save;
-$template->assign('THUMBNAILS', $tpl_save);
 
 ?>
Index: /extensions/PWG_Stuffs/trunk/modules/MostVisited/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/trunk/modules/MostVisited/main.inc.php	(revision 16689)
+++ /extensions/PWG_Stuffs/trunk/modules/MostVisited/main.inc.php	(revision 16690)
@@ -3,8 +3,7 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-global $page, $user, $conf, $template;
+global $page, $user, $conf;
 
 $page_save = $page;
-$tpl_save = $template->get_template_vars('THUMBNAILS');
 
 if (script_basename() == 'picture'
@@ -52,14 +51,16 @@
 $page['section'] = 'most_visited';
 
+$tpl_thumbnails_var = array();
+$pwg_stuffs_tpl_thumbnails_var = & $tpl_thumbnails_var;
 include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
 
-if (!empty($tpl_thumbnails_var))
+if (!empty($pwg_stuffs_tpl_thumbnails_var))
 {
-  $block['thumbnails'] = $tpl_thumbnails_var;
+  $block['thumbnails'] = $pwg_stuffs_tpl_thumbnails_var;
+  $block['derivative_params'] = ImageStdParams::get_by_type(IMG_THUMB);
   $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
 $page = $page_save;
-$template->assign('THUMBNAILS', $tpl_save);
 
 ?>
Index: /extensions/PWG_Stuffs/trunk/modules/Random/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/trunk/modules/Random/main.inc.php	(revision 16689)
+++ /extensions/PWG_Stuffs/trunk/modules/Random/main.inc.php	(revision 16690)
@@ -51,9 +51,12 @@
 $page['section'] = 'category';
 
+$tpl_thumbnails_var = array();
+$pwg_stuffs_tpl_thumbnails_var = & $tpl_thumbnails_var;
 include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
 
-if (!empty($tpl_thumbnails_var))
+if (!empty($pwg_stuffs_tpl_thumbnails_var))
 {
-  $block['thumbnails'] = $tpl_thumbnails_var;
+  $block['thumbnails'] = $pwg_stuffs_tpl_thumbnails_var;
+  $block['derivative_params'] = ImageStdParams::get_by_type(IMG_THUMB);
   $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
Index: /extensions/PWG_Stuffs/trunk/modules/Recent/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/trunk/modules/Recent/main.inc.php	(revision 16689)
+++ /extensions/PWG_Stuffs/trunk/modules/Recent/main.inc.php	(revision 16690)
@@ -3,8 +3,7 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-global $page, $user, $conf, $template;
+global $page, $user, $conf;
 
 $page_save = $page;
-$tpl_save = $template->get_template_vars('THUMBNAILS');
 
 if (script_basename() == 'picture'
@@ -53,14 +52,16 @@
 $page['section'] = 'category';
 
+$tpl_thumbnails_var = array();
+$pwg_stuffs_tpl_thumbnails_var = & $tpl_thumbnails_var;
 include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
 
-if (!empty($tpl_thumbnails_var))
+if (!empty($pwg_stuffs_tpl_thumbnails_var))
 {
-  $block['thumbnails'] = $tpl_thumbnails_var;
+  $block['thumbnails'] = $pwg_stuffs_tpl_thumbnails_var;
+  $block['derivative_params'] = ImageStdParams::get_by_type(IMG_THUMB);
   $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
 $page = $page_save;
-$template->assign('THUMBNAILS', $tpl_save);
 
 ?>
Index: /extensions/PWG_Stuffs/trunk/theme/template/stuffs_thumbnails.tpl
===================================================================
--- /extensions/PWG_Stuffs/trunk/theme/template/stuffs_thumbnails.tpl	(revision 16689)
+++ /extensions/PWG_Stuffs/trunk/theme/template/stuffs_thumbnails.tpl	(revision 16690)
@@ -1,3 +1,4 @@
 {assign var='thumbnails' value=$block.thumbnails}
+{assign var='derivative_params' value=$block.derivative_params}
 <ul class="thumbnails" id="thumbnails">
 {include file='thumbnails.tpl'|@get_extent:'index_thumbnails'}
