Page 1 of 1

Upload a file with comments

Posted: Fri Oct 20, 2006 3:57 pm
by Davy
I don't know if this is asked sometimes before. I can't find it, anyway.

I want to make a system, so that people can upload a file with a comment. I've seen an uploadscript outside on the Internet, but if I place that in the commentform, somebody has to click on a seperate button for uploading and for the comment.
So: Is it possible to make the submitbutton uploading a file?

Re: Upload a file with comments

Posted: Fri Oct 20, 2006 4:25 pm
by garvinhicking
Hi!

I can't remember it being asked, but the problem also is that I know of no plugin that allows to upload a file with a comment.

You need PHP code to take on an uploaded file, so one would need to create a plugin for it that takes on it. And it's not really trivial. I for one always suggest to refrain from HTTP browser uploads, especially for visitors that could spam/Swamp your webspace this way :)

Best regards,
Garvin

Re: Upload a file with comments

Posted: Fri Oct 20, 2006 4:51 pm
by Davy
Well, I have a PHP-script that is able to upload something with a submitbutton. But to use this, the Serendipity comment-submit-button has to do two actions at the same time.

Just a question: Where is the submit-action defined?

Re: Upload a file with comments

Posted: Fri Oct 20, 2006 8:03 pm
by garvinhicking
Hi!

Have a look at the "commentform.tpl" file, that one should help you. Also have a look at the "comments.tpl" file.

HTH,
Garvin