Thanks for the help guys. It is very much appreciated. I almost have this working, almost. Just need a little more help I think. Okay, the code I have used in the template is this:
Code:
<vb:if condition="$attachment['attachmentextension'] == 'pgn'">
<APPLET archive="Viewer-Deluxe.jar" code="ChessBoard.class"
codebase="/httpdocs/pgn" width="631" height="560" mayscript="true">
<PARAM name=PgnGameFile value="/httpdocs/pgn_games/1342828312.pgn">
<PARAM name=LightSquares value=F3DCC2>
<PARAM name=DarkSquares value=DDA37B>
<PARAM name=Background value=CCCCCC>
<PARAM name=ImagesFolder value=images>
<PARAM name=PuzzleMode value="off">
Your browser is completely ignoring the <APPLET> tag!
</APPLET>
<vb:else />
//<li>
<img class="inlineimg" src="{vb:stylevar imgdir_attach}/{vb:raw attachment.attachmentextension}.gif" alt="{vb:rawphrase file_type_x, {vb:raw attachment.attachmentextension}}" />
<a href="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>>{vb:raw attachment.filename}</a>
({vb:raw attachment.filesize}<vb:if condition="$show['views']">, {vb:rawphrase x_views, {vb:raw attachment.counter}}</vb:if>)
</li>
</vb:if>
The line that is causing the problem is this:
<PARAM name=PgnGameFile value="/httpdocs/pgn_games/1342828312.pgn">
Now presumably when someone attaches a pgn file, it gets saved in the FTP in this directory:
/httpdocs/pgn_games/
And 1342828312 is one of many pgn files saved there. With the above template it displays this particular pgn file, but not the one I tried uploading through Manage Attachments. I tried amending this line of the template to just
/httpdocs/pgn_games/
But that didn't work. Any ideas?