• If I (administrator) embed a graphic in a comment, it works fine. However, if a user tries to embed a graphic in a comment the graphic is visible in the editor, but does not appear in the comment after he submits it. How can I fix this?

    Thanks,
    Tom

Viewing 4 replies - 1 through 4 (of 4 total)
  • michal

    (@michal_cksource)

    @7thsteptom, do you use WordPress 3.4 and CKEditor for wordpress 3.6.2.5 ?
    You try add images by CKEditor’s “Image dialog” (after click on image button) ?
    Can you check if you can add images to comments with default WordPress editor (when CKEditor is turned off)
    Do you use any plugins to add images in comments?
    Do you see any errors in Firebug (or similar tool) or in server error log ?

    Thread Starter 7thsteptom

    (@7thsteptom)

    I am using WordPress 3.4 and CKEditor 3.6.2.5.

    Yes. I can add images by CKEditor’s image dialog with no trouble, but I am an administrator. If a reader (who is not an administrator) tries, he can see the image dialog and fill it in, but when he clicks OK, no image appears in the comment.

    That does not apply, because readers do not have access to the maid default WordPress editor.

    Only CKEditor.

    I am unfamiliar with both firebug and the server error log.

    Thanks
    Tom

    michal

    (@michal_cksource)

    Thank you for information. We will try check this and fix this in feature versions.

    Ok, i have a little workaround for adding images in comments by all users.
    This solution was tested only with WordPress in version 3.4

    U must add following lines to code e.g: in your theme (functions.php file) or module in place where u init module:

    global $allowedtags;
    $allowedtags['img'] = array(
    			'alt' => true,
    			'align' => true,
    			'border' => true,
    			'class' => true,
    			'height' => true,
    			'hspace' => true,
    			'longdesc' => true,
    			'vspace' => true,
    			'src' => true,
    			'style' => true,
    			'width' => true,
    		);

    After this every user (also not logged) can add images to comment with all this attributes listed above.
    This solutions wouldn’t be added to our module, because this could be qualified as security issue and “hacking” WordPress core.
    If WordPress add action/filter to manage tags in comments we will also add support for sth like that in our plugin.

    Greetings

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem embedding images in comments’ is closed to new replies.