This hack enables you to send attachments in a private message. This feature was really useful to me in vb2 and I kind of missed it on vb3 so I rehacked it myself.
When a user writes a private message they will be given the option to add an attachment, the same as when writing a post. It uses the same rules you have defined for a convencional attachment including file types, quotas, etc. It is only an extension for attachments to be used in private messages.
As always it is advised to backup your files before hacking in case you want to go back, this is some big hack including modification of multiple files, some templates and adding two extra columns in the database tables.
Instructions are provided in the txt, and some screenshots on where the attachment option appears.
Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.
Edit by MarcoH64:
Because of multiple requests to make this hack work on vB3.0.7 i created upgrade instructions. These upgrade instructions can be followed after the original instructions (the 3.0.3 version). The original coder can not be held responsible for my modification.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I think I found another bug. I had a member send me a photo of something. I still have the message and there is a paperclip showing there is an attachment to it but when you open the message, there is no attachment there. Now, this member erased all of her sent messages in the pm area. Could that have something to do with this since she is the one who sent it? Cause the attachment she sent me never showed up in my attachment list, only hers.
Yes that'll do it. I just did the install and found that out right away. Which is a good feature if you ask me. Great hack. My install was flawless on RC4. Thanks alot.
All seems to be working well..
Just a small thing of concern, in the message itself where the attached images are shown, the "Attached Images" in the message isn't framed like your screenshot demonstrates..
I've attached a screenshot of this, hopefully you can shed some light on this.?
That's a template thing, if the normal attachments appear framed then the attachments in private message should, too. Try attaching a jpg instead or a gif to see if it changes. How does it show in a normal postbit?
I think I found another bug. I had a member send me a photo of something. I still have the message and there is a paperclip showing there is an attachment to it but when you open the message, there is no attachment there. Now, this member erased all of her sent messages in the pm area. Could that have something to do with this since she is the one who sent it? Cause the attachment she sent me never showed up in my attachment list, only hers.
That's because the ownership of the attachment is mantained to the person who sent it. He can delete it anytime and you wouldn't have the attachment anymore. I can't give the ownership of the attachment to the recipient because there could be multiple recipients and I wouldn't know who should be the owner. And making a copy for everyone and storing an attachment 3-4 times doesn't seem to me as a good solution.
But the paperclip still showing up is a bug, I'll look into it. That should dissapear as soon as there are no more attachments.
Then how can we save an attachment for later without having to download it? Is there anyway to set it up so if someone does decide to delete their attachment, then and only then it would transfer ownership to whoever still has the message that was sent to them with the attachment? On bigger sites, I can see what you're saying might make sense as to not fill up the site with attachments. But on a small site, like mine, there is no worry there yet. Besides, the Admin can see and delete any attachments in the Admin CP if it looks like it is starting to get out of hand.
That's a template thing, if the normal attachments appear framed then the attachments in private message should, too. Try attaching a jpg instead or a gif to see if it changes. How does it show in a normal postbit?
Aha.! Correct..
This is a problem with the .gif extension for some reason (on normal posts too)..