WP Nic Edit html comments issues with normal user comment

Jotted by brajesh on January 6, 2009

Happy new year to all of you.I wish you and your family a very prosperous and happy new year.

As I had mentioned,I was planning to release another updated version of WP NicEdit,but it has been delayed because of some issues.My apologies for that.

When you use Wp NicEdit,It makes the comment area a rich text editor.

Now the issue is ,when a user is not logged in or has no capability(as in wp terms) to write html,It will not save the comment as rich comment.Reason,wordpress removes all the formatting using the kses filter.

My current experiment has not been successful in removing the kses filter for wordpress and because of time lack ,I could not do more experiments.If you know a way,In which we can remove the kses filter for comment,or allow html comments(so wordpress does not strips the tags),Please let me know.All the help is appreciated.Also,I will give you a credit link in my next release post of wp NicEdit.So pleasemIf you have any idea about allowing HTMl in comments,please let me know.

Thanks

Brajesh

[blinklist] [Bloglines] [del.icio.us] [Digg] [dzone] [Facebook] [Ma.gnolia] [Mister Wong] [Reddit] [Sphere] [Sphinn] [StumbleUpon] [Technorati] [Email]
If you enjoyed this post, make sure you subscribe to my RSS feed!
Grab my other free plugins here at wordpress Plugins repository.
We will keep coming with more informative tips,tricks,tutorials to keep you updated with wordpress/buddypress/wordpress mu regularly.If you want to help us,You can ,by spreading the words.We provide free and premium plugins/support for wordpress Mu,buddypress at a very low cost (starting with $30 for 3 months membership).If you or anyone you know,needs some real good plugins/themes for their wordpress Mu/buddypress powered site, Please refer them to http://BuddyDev.com.We will highly appreciate your support and keep coming with more useful and free stuffs.


6 Responses to “WP Nic Edit html comments issues with normal user comment”

  1. jessai says:

    yes yoy have to modify this file /wp-includes/kses.php to allow html

  2. brajesh says:

    hi jessai
    You are right.I can do that on my system by editing it manually,and i had tried it earlier.I am looking to make it possible for all the people who are using my comment plugin.
    btw thanks for the suggestion.
    regards
    Brajesh

  3. Ted R. says:

    I’ve been wanting to modify the allowedtags array via plugin instead of hand changing the kses file myself.

    Here are the contents of a plugin the removes filters. It’s for WPMU where users posts get filtered. This plugin removes those filters if the user has a level of 5 or higher. Maybe you could use the same remove_filter function

    function custom_allowed_html_comments() {
    global $current_user;
    get_currentuserinfo();

    // Makes sure that your user is at least halfway up the totem pole
    if ($current_user->user_level >= $min_user_level) {
    remove_filter(‘content_save_pre’, ‘wp_filter_post_kses’);
    remove_filter(‘excerpt_save_pre’, ‘wp_filter_post_kses’);
    remove_filter(‘content_filtered_save_pre’, ‘wp_filter_post_kses’);
    }
    }

    add_action(‘init’, ‘custom_allowed_html_comments’, 20);

  4. brajesh says:

    @ccvp I am a little busy with my Clients projects and because of bad health unable to devote time on this project.So I don’t expect a release until the end of this month.

    Thanks for your comments.
    Brajesh


Leave a Reply


Get Adobe Flash playerPlugin by wpburn.com wordpress themes