Print Topic - Archive
E-Blah Community / Mod Requests and Support / Multiple Attachments & Progress Bar
Posted by: ghawkz, December 26, 2003, 9:07am
I've tried modifiying E-Blah to allow for multiple uploads and have
a nice progress bar. I found some code that will fit in and do this
but need to figure out how to make the rest of eblah "register"
the upload.
Take a look at
http://www.castwebdesign.com/cgi-bin/Blah/Blah.pland register and start a new thread in ChitChat and see how it
looks so far.
Any clues on how to get the parameters (I think SID, and file name)
BACK to eblah so that the attachments are tied to the message?
Thanks!
Posted by: Justin, December 26, 2003, 2:01pm; Reply: 1
To get this to work, you'd probably need a 'temp' file (for each upload so it saves it to a file, like uploaded.txt).
Uploaded.txt
time_uploaded|uploaded_file
And then everytime someone goes to the post page, make sure that time is less than like 3 hours (that way unposted uploaded files won't work anymore ;)), therefore saving server space.
After you get past that ... you need to probably add the following to the upload line in Post.pl (this doesn't include using JavaScript to push the uploaded files back into the post page for usage, so that when they submit, it will save them).
After you get all that done ... you need to edit Post.pl again, where it saves to the message file the attachments, you'll need to change it ALL around. Don't even load the Attach.pl file (CoreLoad("Attach")).
After that, you need to add it to the message id that's being posted.
Attachments (I'm guessing), it's at the end of the line of the message (forgot where it is, exactly). So what you should do (or I'd recommend) is adding the $FORM{'attach'} thing there. Also, coming back to what it does when you hit post. All those attached files should have this:
file1\file2\file3
To process these files in MessageDisplay, you'll need to put all those into an array, like so:
@filesarray = split("\",$attachmentvariable_it_goes_here);
Then just do a loop (foreach) to process the files and add them to the message.
- Justin
Posted by: Justin, December 26, 2003, 2:03pm; Reply: 2
I should point out ... I like what you've done so far ... if you finish this mod, I might possibly add it to E-Blah (low possibility), but I'll most likely add it to a site I host. :)
http://www.elitestudioz.comBut if you have no idea what perl does ... it's going to be really hard. :(
- Justin
Posted by: ghawkz, December 26, 2003, 2:17pm; Reply: 3
Quoted from
admin, posted
December 26, 2003, 2:01pm at
here
After you get past that ... you need to probably add the following to the upload line in Post.pl (this doesn't include using JavaScript to push the uploaded files back into the post page for usage, so that when they submit, it will save them).
What was supposed to be added to Post.pl and where?
Quoted from
admin, posted
December 26, 2003, 2:01pm at
here
After you get all that done ... you need to edit Post.pl again, where it saves to the message file the attachments, you'll need to change it ALL around. Don't even load the Attach.pl file (CoreLoad("Attach")).
After that, you need to add it to the message id that's being posted.
What IS the message ID at this point??
I know it's not going to be easy. I understand PERL (most of the time ;-) - just trying to get a feel for where I need to make more mods to eblah code
Posted by: Justin, December 26, 2003, 3:27pm; Reply: 4
Quoted from
ghawkz, posted
December 26, 2003, 2:17pm at
here
What was supposed to be added to Post.pl and where?
I meant what I said on the lines after that was suppose to be added to Post.pl (sorry, wasn't clear).
Quoted Text
What IS the message ID at this point??
The message ID line is:
|
Code
print FILE "$tuser|$message|$ENV{'REMOTE_ADDR'}|$temail|$mtime|$smiley|||$atturl\n"; |
|
(under the PostTopic sub)
$atturl is what's needed to be changed.
Also, remember there are more than just those ... they are located in other subs in Post.pl (the other is the Reply sub).
Also, remember, after it gets working, you'll need to edit "Moderate.pl" so that once you delete a post, thread, or whatever, it is removed from the uploads dir too.
- Justin
Posted by: TheGodFather, December 26, 2003, 6:30pm; Reply: 5
i know a few people that will be awaiting this mod. When do you guys thinks it will be ready?
Posted by: ghawkz, December 26, 2003, 8:24pm; Reply: 6
Good question :-) Wish I had an answer. I'll work on it but it's
not my biggest priority right now.
Posted by: munzli (Guest) (Guest), March 15, 2005, 8:53am; Reply: 7
Print page generated: January 9, 2009, 6:01pm