The MU forums have moved to WordPress.org

No Kses for certain users or themes? (12 posts)

  1. Bike
    Member
    Posted 16 years ago #

    Hi all,

    I saw Donncha's code about allowing some tags by creating a small mu-plugin to override kses.php, but was wondering of the following would be possible, and if so, if anybody would be able to give some pointers:

    - override kses.php completely for Admins (so the main blog etc can contain javascript, PHp etc).
    and/or
    - override kses.php completely for certain themes. This way, I can just reserve some themes for the admin blogs etc.

    Thanks in advance for any suggestions, Bike

  2. Bike
    Member
    Posted 16 years ago #

    Was this a silly question, a difficult one or just a plain stupid one?
    :)

    Are there any kses.php wizards that might be able to shed some light on this?

    Thanks much,
    Cheers, Bike

  3. andrea_r
    Moderator
    Posted 16 years ago #

    My live-in code monkey did me a hack we called "unfiltered html". All I do now is edit a blog to allow it. Manual process, trusted users. Not sure exactly what he did, but yeah, it's totally possible. And I don't think we touched the kses file, not sure.

  4. Bike
    Member
    Posted 16 years ago #

    The main question is of course: does he not mind be called that? Reminds me of the C-monkey joke :)

    Anyway, a secondary question: when it is feeding time could you trade a banana on my behalf for some hints on how he hacked this?

    Asante sana, Bike

  5. andrea_r
    Moderator
    Posted 16 years ago #

    Have I got your email already?

  6. politicalbear
    Member
    Posted 16 years ago #

    I know you have mine.

    I promise not ask support questions. This would be less resource intensive than anarchy media, right? Or, have I misunderstood the recent kses conversations all together?

  7. andrea_r
    Moderator
    Posted 16 years ago #

    Yep, the other thread was about video specifically. :D this is just in general.

    I use anarchymedia on my sytem too.

  8. Bike
    Member
    Posted 16 years ago #

    Hi Andrea,
    No, I don't think so: info at biketravellers (.) com, thanks in advance,

    Cheers,
    Bike

  9. daily
    Member
    Posted 16 years ago #

    I'm pretty sure Bike isn't the only one struggling with this problem, so you wouldn't mind sharing the solution?

  10. daily
    Member
    Posted 16 years ago #

    I made this little plugin to get around of this problem.

    <?php
    /*
    Plugin Name: Disable post formatting for admins
    Description: This plugin disables post formatting for admins, so you can use any code you want inside posts.
    
    */
    
    global $user_ID;
    
    function disable_kses_for_admins() {
        remove_filter('content_save_pre', 'wp_filter_post_kses');
    }
    
    if ($user_ID && current_user_can('level_10')) {
        add_action('init','disable_kses_for_admins');
    }
    
    ?>
  11. andrea_r
    Moderator
    Posted 16 years ago #

    http://wordpress.org/extend/plugins/unfiltered-mu/

    I strongly caution people to NOT use this on a LIVE system with open registration. It will leave a wide gaping security hole and should only be used in a trusted secured system.

  12. mars-hill
    Member
    Posted 16 years ago #

    This plugin (unfiltered-mu) seems to break in 2.6

    Parse error: syntax error, unexpected $end in .../eurailstories.com/html/wp-content/plugins/unfiltered-mu.php on line 37

    Any ideas?

About this Topic