MyBB Community Forums

Full Version: Update the number of times, attachment downloaded
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have bandwidth problem so, I can't allow attachments to download from my server. So I managed to get a host with direct linking. Now, I hosted my attachment there. its url is.

http://directlink.com/myfile.txt

I manged to download from there with this editing in postbit_attachments_attachment

<br />{$attachment['icon']}&nbsp;&nbsp;<a href="http://directlink.com/{$attachment['filename']}" target="_blank">{$attachment['filename']}</a> ({$lang->postbit_attachment_size} {$attachment['filesize']} / {$lang->postbit_attachment_downloads} {$attachment['downloads']})

The only thing now, I am stuck on is, how to update the number of times the attachment downloaded I used

href="attachment.php?url=http://directlink.com/{$attachment['filename']}"
But this gives me error, The specified thread does not exist. (surely the url of attachment didn't work)


How would I fix this? i.e.
Update the number of times, attachment downloaded


:p this is what I was also making for last two months but couldn't get the update function works fine :p ref 1
ref 2

But Glad finally found this >> http://mods.mybb.com/view/attach-link Big Grin