MyBB Community Forums

Full Version: add an image to attachment.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I configured to upload to my site, and now I wish to have the attachment to appear instead of the link, as an image I have on the domain that says:
"Download Now"

I do not know how to configure that and am asking for help Smile

I would like to make this a permanent configuration.

Thank you
I'm sure that you can just change the templates around from showing a photo (or the file) to showing the "Download" button that you want.
For adding images manually/automatically without having a user attach them to a post, I'm not so sure that it can be done easily with how the system already is in place.
I am looking in the attachment.php. All I wish to change is the reference to the file, where the download link appears and once I find where that is located I can then link the button to the displayed link.. Does that make sense?

So in other words..lets say:
tweaking.com_windows_repair_aio_setup.zip

would appear as the Download Now button and when that is clicked, then it would download. I know how to write that but not where ! LOL
AdminCP > Templates > Your theme's templates > Postbit Templates > postbit_attachments_attachment > and Change the entire template with the following code;

<br />
<a href="{$mybb->settings['bburl']}/attachment.php?aid={$attachment['aid']}" class="button">Download Now</a>
<div>{$attachment['filename']}</div>
<div class="smalltext">({$lang->postbit_attachment_size} {$attachment['filesize']} / {$lang->postbit_attachment_downloads} {$attachment['downloads']})</div>
That worked I will make a smaller image later I am still working on things to make this possible..Thanks again