Forums

[Plugin: Easy Comment Uploads] Feature Suggestion (17 posts)

  1. slowhome
    Member
    Posted 2 years ago #

    Feature suggestion for a future version:

    Have the ability to define the width of thumbnails and full size images using phpthumb in case people upload crazy large images.

    http://wordpress.org/extend/plugins/easy-comment-uploads/

  2. Thomas Wright
    Member
    Posted 2 years ago #

    Hi,
    I will definitely look into this when I get round to adding an options page to the plugin :-) . Thank you for the suggestion and if you have any more please let me know.

  3. Jason Lasky
    Member
    Posted 2 years ago #

    Hi Tom

    1. option to select which post/page has comment upload.
    2. option to restrict upload to registered users/role.

    Thank you for plug-in.

  4. patung
    Member
    Posted 2 years ago #

    2. option to restrict upload to registered users/role.

    This one, definintely.

  5. Thomas Wright
    Member
    Posted 2 years ago #

    In the newest version of the plugin (0.30), I have added support for restricting to uploads to certain users and images only.

    Uploads for certain pages only should be coming soon (I hope...).

  6. ylfchild
    Member
    Posted 2 years ago #

    Hi Tom, thanks for putting this together! I really appreciate it.

    I'd like what slowhome suggests: being able to set a max width of uploaded images.

    Also, I think having the 'upload' button above the 'submit' button would be a lot more clear to users. From my limited knowledge of wordpress, it looks like you can only hook into the form post after the submit button. Is there some way to use your code in comments.php or somewhere put the upload button above?

    thanks!

  7. Thomas Wright
    Member
    Posted 2 years ago #

    Yes, I will look into to adding an auto-resize script but it seems to me that the best way to do this is as a cron job on the server as it would be faster, allow processing during non-peak times, not add a wait on image upload and just be generally more manageable.

    In your second point you have stumbled across possibly the single biggest annoyance I faced whilst writing the plugin :-) Seeing as the only hook I could use is A: very theme dependant (around 20% seem to get it wrong) and B: already inside a form (and html does not support nested forms) the code to handle it has to be a bit hacky and is not ideally placed - hopefully soon I should be able to replace this with some nice javascript and all should be well...

  8. Waffles007
    Member
    Posted 2 years ago #

    Hi Tom,

    I was wondering if it was possible to add an "Upload To" button?
    Basically a button that would display a list of predefined folders (selected from the options menu beforehand) so that users can upload the photos or files to certain folders to organize them better. Basically so I don't have to sort them into their proper folders so my photo album can pick them up and display them. Just wondering if it was possible. If you know of any code out there that already does this I can attempt to integrate it myself, if that was alright with you.

    Great plug-in by the way its used on all my sites.

    Thanks.

  9. geekRN
    Member
    Posted 2 years ago #

    Thanks, worked first use and is exactly what I needed. 5 stars from me.

  10. Thomas Wright
    Member
    Posted 2 years ago #

    @Waffles007
    sorry for the slow reply,
    I have just made quite a few improvements to the plugin and now this change should be relatively easy although I might go for some kind of tags system instead. Anyway I will see if I have time to add this feature.

  11. ylfchild
    Member
    Posted 2 years ago #

    Hi Tom,

    I am looking into an image resizing option, and it looks like WP already has the code that we want, in a nice neat function.
    In /includes/media.php on line 354 is
    function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 )

    I'm about to test it out. It resizes and creates a new file, which is what I want. There is a similar function which replaces an image with a scaled-down version, which saves space for users who don't mind losing the original.

  12. athosmartin
    Member
    Posted 2 years ago #

    this plugin seems to be quite good but does not work with the theme of Atahualpa and already I can not download the picture but the Council published in the comments someone please help ... thank

  13. ylfchild
    Member
    Posted 2 years ago #

    I implemented an image resizer which I haven't been able to break yet. It will downsize images, but it won't upsize if the image is smaller than the requested size.

    //this is the upload path without the domain.com part
    $filelink = '/public_html/wp-content/uploads/' . $target_name;
    
    //resize image to set either width or height to 766px. neither dimension will exceed 766px after this.
    $r_filelink = image_resize($filelink, 766, 766, false, "resized", null, 90);
    if (is_wp_error($r_filelink))
    	$filecode = $r_filelink->get_error_message();
    else
    	$r_target_name = basename ($r_filelink);
    
    //if image_resize() didn't work (because the image was already small or some other error) we default to the original uploaded image.
    if ($r_target_name == '') $r_target_name = $target_name;
    $filecode = "[$type]$target_url" . "$r_target_name" . "[/$type]";
    
    write_js ("write_comment (\"$filecode\");");

    Obviously you could put user-defined minimum heights and widths in the code. The site I use it on is http://www.monkeys2go.com

    This code replaces the line (in upload.php):
    $filelink = $target_url . $target_name;

  14. Thomas Wright
    Member
    Posted 2 years ago #

    Hello and thank you for your suggestions,

    firstly I should be able to add this upload resize functionality in the next version.

    Secondly the problems with Atahualpa have been posted on their forum with no response - the upload form depends on functionality which varies from theme to theme (specifically how they implement the comment form hook) although I might be able to find a better work around in the future.

  15. Susanne4711
    Member
    Posted 2 years ago #

    I would like to restrict images uploads to only one image per comment. Is it possible?

  16. Bonusball
    Member
    Posted 2 years ago #

    I tried to get ylfchild's code to work but couldn't. I'd love to have this feature.

  17. Thomas Wright
    Member
    Posted 1 year ago #

    @susanne and @bonusball
    I should be able to add both of these features soon.

Topic Closed

This topic has been closed to new replies.

About this Topic