I'm really not an expert in PHP, CSS and Joomla but I modified the followig files and the thumbnails look centered at a first glance. Please note that this solution is nothing official. It's quick, very dirty and every good web programmer would shoot me for this, I think :) Here's what I've done:
1.
Edit the file \mambots\content\plugin_jw_sig.php and go to this line:
<div class="sig">'
2.
Replace the code with the following code up to this line:
\"Simple Image Gallery\" Plugin (v1.2.1) ends here -->";
/* Adaption of JW "Simple Image Gallery" Plugin (v1.2.1) START */
$html .= '<table width="100%" border="0"><tr>';
for($a = 0;$a<$noimage;$a++) /* Go through all images */
{
if (($a%4 == 0) && ($a > 1)) /* Close the old row and create a new one */
{
if($images[$a]['filename'] != '')
{
$html .= '</tr><tr><td><div class="sig_thumb"><div align="center"><a href="'.$mosConfig_live_site.$rootfolder.$_images_dir_.'/'.$images[$a]['filename'].'" rel="lightbox[sig'.$sigcount.']" title="';
if ($displaynavtip) {$html .= $navtip.'
';}
if ($displaymessage) {$html .= $message.'
<b>'.$itemtitle.'</b>';}
else {$html .= '<b>'.$images[$a]['filename'].'</b>';}
$html .= '" alt="';
if ($displaymessage) {$html .= $message.' '.$itemtitle.'';}
else {$html .= $images[$a]['filename'];}
$html .= '" target="_blank"><img src="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/showthumb.php?img='.$_images_dir_.'/'.$images[$a]['filename'].'&width='.$_width_.'&height='.$_height_.'&quality='.$_quality_.'"></a></div></div></td>';
}
}
else /* Here we're in the same row going through the columns */
{
if($images[$a]['filename'] != '')
{
$html .= '<td><div class="sig_thumb"><div align="center"><a href="'.$mosConfig_live_site.$rootfolder.$_images_dir_.'/'.$images[$a]['filename'].'" rel="lightbox[sig'.$sigcount.']" title="';
if ($displaynavtip) {$html .= $navtip.'
';}
if ($displaymessage) {$html .= $message.'
<b>'.$itemtitle.'</b>';}
else {$html .= '<b>'.$images[$a]['filename'].'</b>';}
$html .= '" alt="';
if ($displaymessage) {$html .= $message.' '.$itemtitle.'';}
else {$html .= $images[$a]['filename'];}
$html .= '" target="_blank"><img src="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/showthumb.php?img='.$_images_dir_.'/'.$images[$a]['filename'].'&width='.$_width_.'&height='.$_height_.'&quality='.$_quality_.'"></a></div></div></td>';
}
}
}
$html .="</tr></table>\n<div class=\"sig_clr\"></div>\n</div>\n<!-- JW \"Simple Image Gallery\" Plugin (v1.2.1) ends here -->";
/* Adaption of JW "Simple Image Gallery" Plugin (v1.2.1) END */
You can define how many images shall be display in each row by changing this statement:
$a%4 == 0
Just replace the '4' with the number of images which shall be displayed in a row.
3.
Edit the file \mambots\content\plugin_jw_sig\sig.css and replace the complete block after /* ---Simple Image Gallery--- */ with
.sig
{
clear: both;
margin: 16px 4px;
padding:0px;
}
.sig_clr
{
clear:both;
}
.sig_thumb
{
margin: 10px 10px 10px 10px;
padding: 0px;
/* Uncomment to display thumbs with a drop shadow */
/* background: url(shadowAlpha.png) no-repeat bottom right !important; */
/* background: url(shadow.gif) no-repeat bottom right; */
}
.sig_thumb img
{
display: block;
position: relative;
background: #FFF;
border: 1px solid #ccc;
margin: 0px;
padding: 4px;
}
Please note that I commented out the shadows of the thumbnails as I couldn't manage them to behave being centered :)
As I said, this is only a quick & dirty solution. Please feel free to contribute any better way. I would be glad using it :)