Index: /extensions/PWG_Stuffs/modules/BestRated/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/modules/BestRated/main.inc.php	(revision 9580)
+++ /extensions/PWG_Stuffs/modules/BestRated/main.inc.php	(revision 9581)
@@ -83,8 +83,6 @@
 
   // template thumbnail initialization
-  $template->set_filenames( array( 'pwgs_best_rated' => 'thumbnails.tpl',));
-
   trigger_action('loc_begin_index_thumbnails', $pictures);
-  $tpl_thumbnails_var = array();
+  $block['thumbnails'] = array();
 
   foreach ($pictures as $row)
@@ -148,16 +146,10 @@
     }
 
-    $tpl_thumbnails_var[] = $tpl_var;
+    $block['thumbnails'][] = $tpl_var;
   }
 
-  $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
-  $template->assign('thumbnails', $tpl_thumbnails_var);
+  $block['thumbnails'] = trigger_event('loc_end_index_thumbnails', $block['thumbnails'], $pictures);
 
-  $block['CONTENT'] = $template->parse('pwgs_best_rated', true);
-  $block['TEMPLATE'] = 'stuffs_bestrated.tpl';
-}
-else
-{
-  return false;
+  $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
Index: /extensions/PWG_Stuffs/modules/FeaturedPhotos/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/modules/FeaturedPhotos/main.inc.php	(revision 9580)
+++ /extensions/PWG_Stuffs/modules/FeaturedPhotos/main.inc.php	(revision 9581)
@@ -64,8 +64,6 @@
 
   // template thumbnail initialization
-  $template->set_filenames( array( 'pwgs_feat' => 'thumbnails.tpl',));
-
   trigger_action('loc_begin_index_thumbnails', $pictures);
-  $tpl_thumbnails_var = array();
+  $block['thumbnails'] = array();
 
   foreach ($pictures as $row)
@@ -129,12 +127,10 @@
     }
 
-    $tpl_thumbnails_var[] = $tpl_var;
+    $block['thumbnails'][] = $tpl_var;
   }
 
-  $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
-  $template->assign('thumbnails', $tpl_thumbnails_var);
+  $block['thumbnails'] = trigger_event('loc_end_index_thumbnails', $block['thumbnails'], $pictures);
 
-  $block['CONTENT'] = $template->parse('pwgs_feat', true);
-  $block['TEMPLATE'] = 'stuffs_featuredphotos.tpl';
+  $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
Index: /extensions/PWG_Stuffs/modules/MostVisited/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/modules/MostVisited/main.inc.php	(revision 9580)
+++ /extensions/PWG_Stuffs/modules/MostVisited/main.inc.php	(revision 9581)
@@ -83,8 +83,6 @@
 
   // template thumbnail initialization
-  $template->set_filenames( array( 'pwgs_most_visited' => 'thumbnails.tpl',));
-
   trigger_action('loc_begin_index_thumbnails', $pictures);
-  $tpl_thumbnails_var = array();
+  $block['thumbnails'] = array();
 
   foreach ($pictures as $row)
@@ -153,12 +151,10 @@
     }
 
-    $tpl_thumbnails_var[] = $tpl_var;
+    $block['thumbnails'][] = $tpl_var;
   }
 
-  $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
-  $template->assign('thumbnails', $tpl_thumbnails_var);
+  $block['thumbnails'] = trigger_event('loc_end_index_thumbnails', $block['thumbnails'], $pictures);
 
-  $block['CONTENT'] = $template->parse('pwgs_most_visited', true);
-  $block['TEMPLATE'] = 'stuffs_mostvisited.tpl';
+  $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
Index: /extensions/PWG_Stuffs/modules/Random/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/modules/Random/main.inc.php	(revision 9580)
+++ /extensions/PWG_Stuffs/modules/Random/main.inc.php	(revision 9581)
@@ -82,8 +82,6 @@
 
   // template thumbnail initialization
-  $template->set_filenames( array( 'pwgs_random' => 'thumbnails.tpl',));
-
   trigger_action('loc_begin_index_thumbnails', $pictures);
-  $tpl_thumbnails_var = array();
+  $block['thumbnails'] = array();
 
   foreach ($pictures as $row)
@@ -147,12 +145,10 @@
     }
 
-    $tpl_thumbnails_var[] = $tpl_var;
+    $block['thumbnails'][] = $tpl_var;
   }
 
-  $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
-  $template->assign('thumbnails', $tpl_thumbnails_var);
+  $block['thumbnails'] = trigger_event('loc_end_index_thumbnails', $block['thumbnails'], $pictures);
 
-  $block['CONTENT'] = $template->parse('pwgs_random', true);
-  $block['TEMPLATE'] = 'stuffs_random.tpl';
+  $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
Index: /extensions/PWG_Stuffs/modules/Recent/main.inc.php
===================================================================
--- /extensions/PWG_Stuffs/modules/Recent/main.inc.php	(revision 9580)
+++ /extensions/PWG_Stuffs/modules/Recent/main.inc.php	(revision 9581)
@@ -78,8 +78,6 @@
 
   // template thumbnail initialization
-  $template->set_filenames( array( 'pwgs_recent' => 'thumbnails.tpl',));
-
   trigger_action('loc_begin_index_thumbnails', $pictures);
-  $tpl_thumbnails_var = array();
+  $block['thumbnails'] = array();
 
   foreach ($pictures as $row)
@@ -143,12 +141,10 @@
     }
 
-    $tpl_thumbnails_var[] = $tpl_var;
+    $block['thumbnails'][] = $tpl_var;
   }
 
-  $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
-  $template->assign('thumbnails', $tpl_thumbnails_var);
+  $block['thumbnails'] = trigger_event('loc_end_index_thumbnails', $block['thumbnails'], $pictures);
 
-  $block['CONTENT'] = $template->parse('pwgs_recent', true);
-  $block['TEMPLATE'] = 'stuffs_recent.tpl';
+  $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
 }
 
Index: tensions/PWG_Stuffs/theme/template/stuffs_bestrated.tpl
===================================================================
--- /extensions/PWG_Stuffs/theme/template/stuffs_bestrated.tpl	(revision 9580)
+++ 	(revision )
@@ -1,1 +1,0 @@
-{$block.CONTENT}
Index: tensions/PWG_Stuffs/theme/template/stuffs_featuredphotos.tpl
===================================================================
--- /extensions/PWG_Stuffs/theme/template/stuffs_featuredphotos.tpl	(revision 9580)
+++ 	(revision )
@@ -1,1 +1,0 @@
-{$block.CONTENT}
Index: tensions/PWG_Stuffs/theme/template/stuffs_mostvisited.tpl
===================================================================
--- /extensions/PWG_Stuffs/theme/template/stuffs_mostvisited.tpl	(revision 9580)
+++ 	(revision )
@@ -1,1 +1,0 @@
-{$block.CONTENT}
Index: tensions/PWG_Stuffs/theme/template/stuffs_piclenswall.tpl
===================================================================
--- /extensions/PWG_Stuffs/theme/template/stuffs_piclenswall.tpl	(revision 9580)
+++ 	(revision )
@@ -1,18 +1,0 @@
-{if !empty($block.RSSFEED)}
-<object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="{$block.PIC_HEIGHT}">
-        <param name="movie" value="{$block.SWF_LINK}?feed={$block.RSSFEED}&amp;style={$block.COLOR}&amp;numRows={$block.NBLIGNE}&amp;showEmbed={$block.SHOWEMBED}&amp;showFullScreen={$block.SHOWFULLSCREEN}&amp;showSearch={$block.SHOWSEARCH}{if isset($block.showChrome)}&amp;showChrome={$block.showChrome}{/if}{if isset($block.showDescription)}&amp;showDescription={$block.showDescription}{/if}{if isset($block.showReflections)}&amp;showReflections={$block.showReflections}{/if}{if isset($block.showTutorial)}&amp;showTutorial={$block.showTutorial}{/if}{if isset($block.showNavArrows)}&amp;showNavArrows={$block.showNavArrows}{/if}{if isset($block.backgroundAlpha)}&amp;backgroundAlpha={$block.backgroundAlpha}{/if}{if isset($block.backgroundColor)}&amp;backgroundColor={$block.backgroundColor}{/if}{if isset($block.glowColor)}&amp;glowColor={$block.glowColor}{/if}{if isset($block.descriptionHeight)}&amp;descriptionHeight={$block.descriptionHeight}{/if}{if isset($block.tilt)}&amp;tilt={$block.tilt}{/if}{if isset($block.backgroundImage)}&amp;backgroundImage={$block.backgroundImage}{/if}{if isset($block.tutorial)}&amp;tutorial={$block.tutorial}{/if}{if isset($block.customButton)}&amp;customButton={$block.customButton}{/if}{if isset($block.icons)}&amp;icons={$block.icons}{/if}{if isset($block.linkCSS)}&amp;linkCSS={$block.linkCSS}{/if}" />
-        <param name="allowFullScreen" value="{$block.SHOWFULLSCREEN}" />
-        <param name="showEmbed" value="{$block.SHOWEMBED}" />
-        <param name="showSearch" value="{$block.SHOWSEARCH}" />
-        <param name="showItemEmbed" value="{$block.showitemembed}" />
-        <param name="showLinkOut" value="{$block.showlinkout}" />
-        <param name="showClose" value="{$block.showclose}" />
-        <param name="allowScriptAccess" value="always" />
-        <param name="flashvars" value="feed={$block.RSSFEED}&amp;style={$block.COLOR}&amp;numRows={$block.NBLIGNE}{if isset($block.showChrome)}&amp;showChrome={$block.showChrome}{/if}{if isset($block.showDescription)}&amp;showDescription={$block.showDescription}{/if}{if isset($block.showReflections)}&amp;showReflections={$block.showReflections}{/if}{if isset($block.showTutorial)}&amp;showTutorial={$block.showTutorial}{/if}{if isset($block.showNavArrows)}&amp;showNavArrows={$block.showNavArrows}{/if}{if isset($block.backgroundAlpha)}&amp;backgroundAlpha={$block.backgroundAlpha}{/if}{if isset($block.backgroundColor)}&amp;backgroundColor={$block.backgroundColor}{/if}{if isset($block.glowColor)}&amp;glowColor={$block.glowColor}{/if}{if isset($block.descriptionHeight)}&amp;descriptionHeight={$block.descriptionHeight}{/if}{if isset($block.tilt)}&amp;tilt={$block.tilt}{/if}{if isset($block.backgroundImage)}&amp;backgroundImage={$block.backgroundImage}{/if}{if isset($block.tutorial)}&amp;tutorial={$block.tutorial}{/if}{if isset($block.customButton)}&amp;customButton={$block.customButton}{/if}{if isset($block.icons)}&amp;icons={$block.icons}{/if}{if isset($block.linkCSS)}&amp;linkCSS={$block.linkCSS}{/if}{if isset($block.showitemembed)}&amp;showitemembed={$block.showitemembed}{/if}{if isset($block.showlinkout)}&amp;showlinkout={$block.showlinkout}{/if}{if isset($block.showclose)}&amp;showclose={$block.showclose}{/if}" />
-        {if $block.TRANSPARENT}
-        <param name="wmode" value="transparent" />
-    {/if}
-        <embed {if $block.TRANSPARENT}WMODE="transparent" {/if}type="application/x-shockwave-flash" src="{$block.SWF_LINK}?feed={$block.RSSFEED}&amp;style={$block.COLOR}&amp;numRows={$block.NBLIGNE}&amp;showEmbed={$block.SHOWEMBED}&amp;showFullScreen={$block.SHOWFULLSCREEN}&amp;showSearch={$block.SHOWSEARCH}{if isset($block.showChrome)}&amp;showChrome={$block.showChrome}{/if}{if isset($block.showDescription)}&amp;showDescription={$block.showDescription}{/if}{if isset($block.showReflections)}&amp;showReflections={$block.showReflections}{/if}{if isset($block.showTutorial)}&amp;showTutorial={$block.showTutorial}{/if}{if isset($block.showNavArrows)}&amp;showNavArrows={$block.showNavArrows}{/if}{if isset($block.backgroundAlpha)}&amp;backgroundAlpha={$block.backgroundAlpha}{/if}{if isset($block.backgroundColor)}&amp;backgroundColor={$block.backgroundColor}{/if}{if isset($block.glowColor)}&amp;glowColor={$block.glowColor}{/if}{if isset($block.descriptionHeight)}&amp;descriptionHeight={$block.descriptionHeight}{/if}{if isset($block.tilt)}&amp;tilt={$block.tilt}{/if}{if isset($block.backgroundImage)}&amp;backgroundImage={$block.backgroundImage}{/if}{if isset($block.tutorial)}&amp;tutorial={$block.tutorial}{/if}{if isset($block.customButton)}&amp;customButton={$block.customButton}{/if}{if isset($block.icons)}&amp;icons={$block.icons}{/if}{if isset($block.linkCSS)}&amp;linkCSS={$block.linkCSS}{/if}{if isset($block.showitemembed)}&amp;showitemembed={$block.showitemembed}{/if}{if isset($block.showlinkout)}&amp;showlinkout={$block.showlinkout}{/if}{if isset($block.showclose)}&amp;showclose={$block.showclose}{/if}" width="100%" height="{$block.PIC_HEIGHT}" showEmbed="{$block.SHOWEMBED}" showSearch="{$block.SHOWSEARCH}" allowFullScreen="{$block.SHOWFULLSCREEN}" allowScriptAccess="always"  style="{$block.COLOR}" numRows="{$block.NBLIGNE} {if isset($block.showChrome)}showChrome="{$block.showChrome}"{/if} {if isset($block.showDescription)}showDescription="{$block.showDescription}"{/if} {if isset($block.showReflections)}showReflections="{$block.showReflections}"{/if} {if isset($block.showTutorial)}showTutorial="{$block.showTutorial}"{/if} {if isset($block.showNavArrows)}showNavArrows="{$block.showNavArrows}"{/if} {if isset($block.backgroundAlpha)}backgroundAlpha="{$block.backgroundAlpha}"{/if} {if isset($block.backgroundColor)}backgroundColor="{$block.backgroundColor}"{/if} {if isset($block.glowColor)}glowColor="{$block.glowColor}"{/if} {if isset($block.descriptionHeight)}descriptionHeight="{$block.descriptionHeight}"{/if} {if isset($block.tilt)}tilt="{$block.tilt}"{/if} {if isset($block.backgroundImage)}backgroundImage="{$block.backgroundImage}"{/if} {if isset($block.tutorial)}tutorial="{$block.tutorial}"{/if} {if isset($block.customButton)}customButton="{$block.customButton}"{/if} {if isset($block.icons)}icons="{$block.icons}"{/if} {if isset($block.linkCSS)}linkCSS="{$block.linkCSS}"{/if}/>
-</object>
-{/if}
-    
Index: tensions/PWG_Stuffs/theme/template/stuffs_random.tpl
===================================================================
--- /extensions/PWG_Stuffs/theme/template/stuffs_random.tpl	(revision 9580)
+++ 	(revision )
@@ -1,1 +1,0 @@
-{$block.CONTENT}
Index: tensions/PWG_Stuffs/theme/template/stuffs_recent.tpl
===================================================================
--- /extensions/PWG_Stuffs/theme/template/stuffs_recent.tpl	(revision 9580)
+++ 	(revision )
@@ -1,1 +1,0 @@
-{$block.CONTENT}
Index: /extensions/PWG_Stuffs/theme/template/stuffs_thumbnails.tpl
===================================================================
--- /extensions/PWG_Stuffs/theme/template/stuffs_thumbnails.tpl	(revision 9581)
+++ /extensions/PWG_Stuffs/theme/template/stuffs_thumbnails.tpl	(revision 9581)
@@ -0,0 +1,2 @@
+{assign var='thumbnails' value=$block.thumbnails}
+{include file='thumbnails.tpl'|@get_extent:'index_thumbnails'}
