The MU forums have moved to WordPress.org

giving rights to selected users on kses (13 posts)

  1. enseignement
    Member
    Posted 16 years ago #

    Hello,

    I've read a lot about kses in this forum, but now I have the issue, and I did not find a clue to help me.
    I just want selected users to be able to embed stuffs / javascripts, etc. but I don't figure how I could do that without giving them the role of an administrator.

    How could you help to select users to have the unfiltered html stuff ?

    Thanks a lot !
    benjamin

  2. enseignement
    Member
    Posted 16 years ago #

    Isn't it possible ?

  3. SteveAtty
    Member
    Posted 16 years ago #

    If its one user (or one blog) then you could do it by putting some logic based on blog_id into kses

  4. andrea_r
    Moderator
    Posted 16 years ago #

    Yep, sure is possible. Can't remember how I got Ron to do it for me, but he whipped it up so when I edit a blog, there's now a flag to allow unfiltered_html for just that blog.

    I have no idea if it would work on a new install though.

  5. enseignement
    Member
    Posted 16 years ago #

    this is not a new install. Can you find something edited somewhere in the php files that you could share with us ?
    I would like to add more than one blog.

  6. lunabyte
    Member
    Posted 16 years ago #

    There is an override for kses, so a simple mu-plugin with an array of blog_id's you want unfiltered should do the trick. Checking against the current blog_id of course.

    Although, I can't remember the hook off the top of my head, grep should bring it up if you look for unfiltered_html.

  7. enseignement
    Member
    Posted 16 years ago #

    I found this hack

    But how can I check or add a loop for my different users.
    What is level 8 ?

    Thanks for helping me in this ...

    kses.php:L571 to say: function wp_filter_post_kses($data) {

    global $allowedposttags; if ( current_user_can('level_8')) { //unfiltered_html') ) {

    return $data;

    } else {

    return addslashes ( wp_kses(stripslashes( $data ), $allowedposttags) \

    );

    }

    }

  8. theblade24
    Member
    Posted 16 years ago #

    Andrea, I am really trying to find a way to make unfiltered_html work on either a blog by blog basis or give the admin user or level 10 user the ability to have it.

    I see above code, but cannot get it to work. If I could i would assume I could change level 8 to 10? I have no idea how to make above suggested code work or where to put it.

    or if there is any way that you could obtain the code "Ron" used to allow you to do it?

    Any help with this would be awesome!

  9. andrea_r
    Moderator
    Posted 16 years ago #

    "Ron" is my husband. :) We're discussing plugin release possibilites for this bit of code. He's a programmer at his day job.

  10. theblade24
    Member
    Posted 16 years ago #

    Nice!!!! Anytime soon?

  11. andrea_r
    Moderator
    Posted 16 years ago #

    No timeline, sorry.

  12. theblade24
    Member
    Posted 16 years ago #

    Do you have a method of contact?

  13. andrea_r
    Moderator
    Posted 16 years ago #

    andrea at atypicalife dot net

About this Topic

  • Started 16 years ago by enseignement
  • Latest reply from andrea_r