MyBB Community Forums

Full Version: Small suggestion for attachments template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I upload an image, very rarely do I want to just leave it as an attached thumbnail or use the "insert into post" button to attach a scaled-down version of the attachment. Most of the time, I want to use the IMG tags and place the attachment's URL in them. In order to get the attachement's URL, I first have to "insert into post" and then preview. To take away that added step, it would be simpler to have the attachment's name link to the attachment after you've uploaded it.

This is a very easy and quick change to make in the post_attachments_attachment template.

Current template:
<tr>
<td width="5%" align="center">{$attachment['icon']}</td>
<td style="white-space: nowrap">{$attachment['filename']} ({$attachment['size']})</td>
<td style="white-space: nowrap; text-align: right;">{$attach_mod_options} <input type="submit" class="button" name="rem" value="{$lang->remove_attachment}" onclick="return Post.removeAttachment({$attachment['aid']});" /> {$postinsert}</td>
</tr>

Updated:
<tr>
<td width="5%" align="center">{$attachment['icon']}</td>
<td style="white-space: nowrap"><a href="attachment.php?aid={$attachment['aid']}">{$attachment['filename']}</a> ({$attachment['size']})</td>
<td style="white-space: nowrap; text-align: right;">{$attach_mod_options} <input type="submit" class="button" name="rem" value="{$lang->remove_attachment}" onclick="return Post.removeAttachment({$attachment['aid']});" /> {$postinsert}</td>
</tr>

I'd really like to see this as the default. It's very useful for the filename to link to the file itself after upload. Like I said, just a small change and not a big deal or anything. Just something I found useful and thought I'd suggest it.