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 |
#122
|
||||
|
||||
Shouldn't the attachment show above that button without having to click the manage attachments button to see it?
|
#123
|
||||
|
||||
It should. That way it is very similar to the normal preview way of doing it. Here is the fix.
find this: Code:
'newpost_attachment' ); Code:
'newpost_attachment', 'newpost_attachmentbit' ); Code:
eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";'); Code:
$currentattaches = $DB_site->query(" SELECT filename, filesize, attachmentid FROM " . TABLE_PREFIX . "attachment WHERE posthash = '$posthash' AND userid = $bbuserinfo[userid] "); $attachcount = 0; while ($attach = $DB_site->fetch_array($currentattaches)) { $attachcount++; $attach['extension'] = strtolower(file_extension($attach['filename'])); $attach['filename'] = htmlspecialchars_uni($attach['filename']); $attach['filesize'] = vb_number_format($attach['filesize'], 1, true); $show['attachmentlist'] = true; eval('$attachments .= "' . fetch_template('newpost_attachmentbit') . '";'); } eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";'); |
#124
|
||||
|
||||
Works great! Thanks!
Is the first post updated? How would we add the attachments ability to Erwin's Quick Peply hack? |
#125
|
||||
|
||||
Quote:
It should be possible to add them, I'll take a look at it. |
#126
|
||||
|
||||
Can you pm me with your edits for the textarea and submit button?
|
#127
|
|||
|
|||
Can you allow only certain usergroups to use this function?
|
#128
|
||||
|
||||
Quote:
Anyway, what is this obsession with everything being usergroup based lately? (Second hack I get asked) With around 10 usergroups in my forum it is becoming a nightmare for me checking that every option is right.... |
#129
|
|||
|
|||
Can you just point me to the right area, and I can do the editing? I am pretty comfortable with PHP.
|
#130
|
||||
|
||||
Quote:
I've installed the hack on 3/1/04 and everything seems to be working fine, except some little bug, where I'll describe in a new post! |
#131
|
||||
|
||||
Now, my problem with the hack is that the recipient clicks the attachment link, and gets an error message of: "No Post Defined". HELP
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|