The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[VB3 RC3] Attachments in private messages Details »» | |||||||||||||||||||||||||||
[VB3 RC3] Attachments in private messages
Developer Last Online: Jul 2014
Unsupported. VB3.5 version is here:
https://vborg.vbsupport.ru/showthread.php?t=91220 Tested on 3.0.3 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
|
Comments |
#42
|
||||
|
||||
Very good idea, and well done. Should be standard in vB3 if you ask me.
|
#43
|
||||
|
||||
kentaurus, did you chnage anything in the hack yesterday? OI noticed your firest post was updated with Hack Update.
|
#44
|
||||
|
||||
Quote:
|
#45
|
||||
|
||||
kentaurus, found a major problem with this hack. When I reply to a message (haven't checked the forwarding out yet), it sends the attachments I have stored along with the message. On a new message, it works fine. Only on replies so far (or forwards, I haven't checked yet).
|
#46
|
||||
|
||||
Ok, I've narrowed it down a bit further. It seems the attachments get added to any message that is sent out with the Quick PM Reply hack. The regular reply works fine. Any way to fix this?
|
#47
|
||||
|
||||
Quote:
I'll install the Quick PM reply and see where to fix it. |
#48
|
||||
|
||||
Thank you, sir.
I told Erwin about it but he said he couldn't fix problems with other people's hacks. :tired: |
#49
|
||||
|
||||
Quote:
|
#50
|
||||
|
||||
If I had to make a choice, yours will stay.
|
#51
|
||||
|
||||
Quote:
I was relying on the posthash for the attachments, the quick reply has no posthash (an empty one) so the code just assumes that all attachments with an empty posthash are for that message (ie - all other attachments in the forum). I made a patch so this hack will work cooperative with the quick reply, I'll pm Erwin and see if he wants to update his hack also, either hack can be patched but I can only modify mine of course. find this: Code:
$attachcount = $DB_site->query_first(" SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "attachment WHERE posthash = '" . addslashes($_POST['posthash']) . "' AND userid = $bbuserinfo[userid] "); $totalattachments = $attachcount['count']; if ($totalattachments) { $DB_site->query("UPDATE " . TABLE_PREFIX . "pmtext SET attach='$totalattachments' WHERE pmtextid='$pmtextid'"); $DB_site->query(" UPDATE " . TABLE_PREFIX . "attachment SET private = $pmtextid, posthash = '' WHERE posthash = '" . addslashes($_POST['posthash']) . "' AND userid = $bbuserinfo[userid] "); } Code:
if ($_POST['posthash']) { $attachcount = $DB_site->query_first(" SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "attachment WHERE posthash = '" . addslashes($_POST['posthash']) . "' AND posthash<>'' AND userid = $bbuserinfo[userid] "); $totalattachments = $attachcount['count']; if ($totalattachments) { $DB_site->query("UPDATE " . TABLE_PREFIX . "pmtext SET attach='$totalattachments' WHERE pmtextid='$pmtextid'"); $DB_site->query(" UPDATE " . TABLE_PREFIX . "attachment SET private = $pmtextid, posthash = '' WHERE posthash = '" . addslashes($_POST['posthash']) . "' AND userid = $bbuserinfo[userid] "); } } TXT is updated also |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|