Quote:
Originally Posted by Rob Locke
Fantastic. How did you do it? I'd love to do something similar.
|
quite easily actually....
in dl_category.php I added
Code:
if ($x == 0) {
//start a new TR
$startLine = true;
} else {
$startLine = false;
}
if ($x >= 7) {
$endLine = true;
$x = 0;
} else {
$endLine = false;
$x++;
}
which will put 8 columns across the page, these are then used to display the file icon..... then in the template "downloads_main_catbit" I Put
Code:
<if condition="$startLine">
<!-- draw a new TR -->
<tr>
</if>
<td>
<<< icon and info here >>>
</td>
<if condition="$endLine">
<!-- draw end TR -->
</tr>
</if>
and changing the downloads main to
Code:
<table cellpadding="5" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center" style="background:#ffffff">
$catbits
</table>
I just used the same code in the dl_files and templates....
The extension can be easily worked out then you just use an image based on the extension, eg: "swf.gif" or "doc.gif"