The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Making a custom multiple attachment upload script
After searching and searching, I cannot find a mod which will allow multiple file uploads for vb3.
I decided to make my own one then, there are plenty of jquery/mootools based scripts for multiple file uploads (basicly highlight 10 files in a directory and upload them each sequentially automatically). My problem arises from the basics of integrating this to vbulletin. I first researched how to get those uploads into the database using a datamanager, but while reading through newattachment.php it struck me that maybee its best to have my script take the uploaded files and simply feed them into the stock vbulletin newattachment.php and let vb attach the files to the post as it normally does. My question is this, does anyone know the exact data that needs to be POSTed to newattachment.php to get an attachment into a post? thanks!!!! |
#2
|
|||
|
|||
If you edit a post then press the Attachments button to bring up that popup, then do "View Source" on that popup window, I think it might have everything you need.
|
#3
|
|||
|
|||
Quote:
Here is what I have: PHP Code:
|
#4
|
|||
|
|||
Just glancing at it the only thing I see maybe is this line:
Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> you probably need the actual value of the security token in there. When it's in a template it gets 'eval'ed and the value of $bbuserinfo[securitytoken] is inserted, but if you're not doing that in your custom code then you'll have to do it yourself. Also, IIRC the code for that popup has a javascript function that gets called when the form is submitted which handles the actual file data (in some way I don't really understand, so maybe you've got that covered somewhere else). |
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
I just looked again and I think you're right about that. I guess I'll stop "helping" you since you seem to understand it better than I do.
|
#7
|
|||
|
|||
Not at all, I really appreciate the effort, I still think im more lost then you are, but both lost
|
#8
|
|||
|
|||
So what does happen when you try? Do you get an error or just nothing?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|