Upload a file with comments

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Davy
Regular
Posts: 109
Joined: Fri Oct 13, 2006 2:06 pm
Location: The Netherlands

Upload a file with comments

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Upload a file with comments

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Davy
Regular
Posts: 109
Joined: Fri Oct 13, 2006 2:06 pm
Location: The Netherlands

Re: Upload a file with comments

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Upload a file with comments

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply