When you have an attachments for an issue, if it is an image it can display a thumbnail - otherwise it is just blank. This instead displays an icon for the filetype:
Open pt_attachmentbit and find:
Replace with:
If you don't want to display the image, you can always display the icon... replace with this instead:
Finally, create a plugin for "project_issue_attachmentbit" and use this code:
Open pt_attachmentbit and find:
HTML Code:
<if condition="$attachment['thumbnail_filesize']"> <a href="projectattachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]" target="_blank"><img src="projectattachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&thumb=1" alt="" border="0" /></a> <else /> </if>
HTML Code:
<if condition="$attachment['thumbnail_filesize']"> <a href="projectattachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]" target="_blank"><img src="projectattachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&thumb=1" alt="" border="0" /></a> <else /> <img src="images/attach/$attachment[extension].gif" width="16" height="16" alt="" /> </if>
HTML Code:
<img src="images/attach/$attachment[extension]_32.gif" width="32" height="32" alt="" />
PHP Code:
$attachment['extension'] = substr($attachment['filename'], strrpos($attachment['filename'], '.')+1);
Comment