Forums

Attach Images/Files in Comments. Any Ideas? (6 posts)

  1. kslagerman
    Member
    Posted 2 years ago #

    Hello,

    I'm not sure if this can be done with WP, but I have a client who wants visitors to be able to participate in her blog by not only being able to post a comment, but also insert or upload an image with the comment.

    Is this possible? I have looked through the plugin dir but haven't found much. I think it needs to be as simple and user firlendly as possible.

    My only other option at this point is to not go with WP but a bulletin board system like SMF or phpbb or somethign that allows people to make posts and add attachements at the same time, but i really really would like this to work in worpress because I like the customizability of the templates etc etc.

    Any advice or suggestions would be greatly appreciated!

  2. webcomm
    Member
    Posted 2 years ago #

    Not possible. There is a plugin called "Comment Image Embedder" but I have not been able to get it to work yet.

  3. webcomm
    Member
    Posted 2 years ago #

    Actually, looks like the way to do it is to add this...

    'img' => array(
    'src' => array(),
    'alt' => array(),
    'title' => array(),
    'height' => array(),
    'width' => array(),
    ),

    ...to the $allowedtags array in /wp-includes/kses.php

    Seems silly that this has to be done with a hack when the feature has been requested many times in the forums. : )

    -Ryan

  4. webcomm
    Member
    Posted 2 years ago #

    Just to clarify... that hack will not allow your users to upload images... it will only allow them to use img tags in comments. They could always upload the image to their own server and then hot link to it with an img tag in your comment box.

  5. Thomas Wright
    Member
    Posted 2 years ago #

    Just in case you are still looking my plugin easy comment uploads probably provides an easier way to do this (i.e. no code, just click upload and insert link):
    http://wordpress.org/extend/plugins/easy-comment-uploads/

    Hope it is of use,
    Tom

  6. marczr
    Member
    Posted 2 years ago #

    @ webcomm,
    Thank you , thank you, did I say thank you!
    I've been searching for a simple solution to allow users to add images for days, your hack of the kses.php works a treat.
    I can go and delete the page full of instructions I had to put up to guide users around the workaround I'd found using the 'wordpess-comments-images' plugin.

    One question:
    If the img tags are excluded by default, is there a security risk in enabling them ?

Topic Closed

This topic has been closed to new replies.

About this Topic