so I started editing it so I only had the thumb addon.. and so I could put it inside my own table inside of my own site..
thing is.. when I use the original code it creates a new table under my own tables.. I dont want that of course so I edited it a bit.. now it shows the thumbs and all works fine BUT.. it doesnt go to the next line after x pictures have been shown.. so if there are 20 pictures in a gallery they are all shown horizontally on one line! and this only happens when I use my edited code..
so please take a look and see whats wrong!
Original Code:
Code: Select all
<tr>
<td bgcolor=#F4F4F4>
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td><table width=100%><tr>";
$counter = 0;
$rowcount = 0;
foreach ($file_array as $file) {
if ($counter == 0 or $counter == $horizontalpics) $counter=1 ;
if ($counter == 1) {
if ($rowcount ==0 or $rowcount == 4) {
echo "</tr></table><table width=100%><tr>
<td><hr>
<div align=center>[<a href=$linkhome>Back to the gallery index</a>] - [<a href=#top>Back
to the top</a>]</div><hr>
</td></tr><table width=100%>";
$rowcount = 1;
$counter=1;
}
echo "</tr><tr>";
++$rowcount;
}
++$counter;
$my_link = $linkname.$file;
$my_thumb = $thumbname.$file;
echo "<td><div align=center><a href=$my_link target=gallerie><img src=$my_thumb alt=$file border=0></a></div></td>";
}
}
echo "</tr></table></td>
</tr>
</table>
</td>
</tr>Edited Code:
Code: Select all
<tr>
<td width=8 height=692 rowspan=2>
</td>
<td width=830 height=677>";
$counter = 0;
$rowcount = 0;
foreach ($file_array as $file) {
if ($counter == 0 or $counter == $horizontalpics) $counter=1 ;
if ($counter == 1) {
if ($rowcount ==0 or $rowcount == 4) {
echo "<table width=100%>";
$rowcount = 1;
$counter=1;
}
++$rowcount;
}
++$counter;
$my_link = $linkname.$file;
$my_thumb = $thumbname.$file;
echo "<td><a href=$my_link target=gallerie><img src=$my_thumb alt=$file border=0></a></td>";
}
}
echo "</tr></table>
</td>
<td width=16 height=677>
</td>
</tr>