I’m having trouble getting any images to display.
PHP isn’t my strong point I’m afraid.
Everything else is working fine but no images!
My call on the page is...
[[FileDownload?getFolder=`assets/files/Foundation Stage` &tplList=`FileDownload` &chkDesc=`fileinfo` &useHlt=`1` &imgLocat=`assets/icons]]
I’ve only altered the snippet here....
// Location of images to use - leave blank if you do not want images
$imgLocat = isset($imgLocat)? $imgLocat : 'assets/icons';
// Array to set image to use for different file types
$imgTypes = array(
'swf' => 'image_JPG.png',
'jpg' => 'imagen_JPG.ico',
'png' => 'file-image.png',
'gif' => 'file-image.png',
'php' => 'file-source.png',
'js' => 'file-source-alt.png',
'pdf' => 'file-pdf.png',
'txt' => 'file-document.png',
'zip' => 'file-archive.png',
'parent' => 'up.png',
'folder' => 'folder.png',
'default' => 'file-generic.png'
);
// Allows to browse through directory structure
$browseDirectories = isset($browseDirectories)? $browseDirectories : FALSE;
I haven’t bothered with all the filetypes until I knew it would work.
The chunk looks like this...
<table cellspacing='10'>
<tr class='dwnhead'>
<tr><th colspan='2'>Filename</th><th>Link</th><th></th><th>Description</th><th></th></tr>
<hr>
<tr>
<td>[+image+]</td>
<td>[+filename+]</td>
<td><a href='[+link+]'target='_blank'>Load</a></td>
<td colspan='3'>[+description+]</td></tr>
<hr>
</table>
Any thoughts anyone ?, be gentle with me!
I also wondered if, assuming I get the images working, could I do away with the text link and incorporate it into the image ?
Also could I strip out the file extension of the filename when being dispalyed ?
David