WordPress.org

Ready to get started?Download WordPress

Forums

Allow users to post images in comments? (11 posts)

  1. weeble
    Member
    Posted 7 years ago #

    Is there such a plugin?

  2. petersendidit
    Member
    Posted 7 years ago #

    I would be interested in this too.

  3. ampersand
    Member
    Posted 6 years ago #

    I'd be very grateful if someone could address this, too. Or a clearly-spelled-out way to do it by altering a .php file, if there's no such plugin.

  4. petersendidit
    Member
    Posted 6 years ago #

    Please!! :-)

  5. whooami
    Member
    Posted 6 years ago #

    you do NOT need a plugin to do this. Havent I said this before in another thread????

    1. Open wp-includes/kses.php

    2. Locate the following line:

    $allowedtags = array ('a' => array ('href' => array (), 'title' => array ()), 'abbr' => array ('title' => array ()), 'acronym' => array ('title' => array ()), 'b' => array (), 'blockquote' => array ('cite' => array ()),

    3. Change that line to read like so:

    $allowedtags = array ('a' => array ('href' => array (), 'title' => array ()), 'abbr' => array ('title' => array ()), 'acronym' => array ('title' => array ()), 'b' => array (), 'blockquote' => array ('cite' => array ()), 'img' => array ('alt' => array (), 'align' => array (), 'border' => array (), 'height' => array (), 'hspace' => array (), 'longdesc' => array (), 'vspace' => array (), 'src' => array ()),

    4. Save the changed file, and upload.

    The above change enables commenters to use <img src ... and several related tags within comments. It does NOT allow any user to upload an image. Consequently, the image must already be hosted soemwhere in order to be displayed successfully.

  6. blakekr
    Member
    Posted 6 years ago #

    The above change enables commenters to use <img src ... and several related tags within comments. It does NOT allow any user to upload an image. Consequently, the image must already be hosted soemwhere in order to be displayed successfully.

    Anyone know of an approach that would allow commenters to upload images?

  7. jasdonle
    Member
    Posted 6 years ago #

    Actually, what I'd like is a plugin that auto-detects that a URL is an image and recodes the comment to add the <img src=" etc... My users sadly don't know any HTML, and I don't expect them to learn.

    Anyone heard of anything that does this?

  8. ethanklein
    Member
    Posted 6 years ago #

    whooami's suggested change to the kses.php file worked for me, allowing my commenters to post ONE image. Whenever a commenter posts more than one image, the whole comment gets stripped. If I, as an administrator, however, post 30 images in the commetns, they get through! I'd really like to give my commentors more freedom to post multiple images! Any help would be greatly appreciated.

    I'd rather just disable kses.php but haven't found out how to do this yet. Possible??

    Thanks!!

  9. eyedea
    Member
    Posted 6 years ago #

    yes, please, me too.....

    I'd also love to enable this :) I've been looking for something like for ages now - thinking I am just not finding it as it must exist... seems like it doesn't after all ;(

  10. imagiscapeca
    Member
    Posted 6 years ago #

    yes, please, me too.....

    To echo some of the above posts:
    - whooami's suggested change to the kses.php file worked for me, but only allowed my commenters to post ONE image ...
    - would it help to disable kses.php?

  11. imagiscapeca
    Member
    Posted 6 years ago #

    Better yet:

    Can I give comments a visual editor so users can click a button that prompts for the image url and description - I don't expect my users to use even simple code.

    Best of all, how can we enable users to:
    copy and paste images and videos from webpages into the comments?

  12. amandabee
    Member
    Posted 6 years ago #

    I think you're better off using my-hacks.php than tweaking the code. my-hacks.php will survive an upgrade. Code tweaks won't necessarily.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.