WordPress.org

Support

Support » Plugins and Hacks » Allow users to edit font attributes in comments

Allow users to edit font attributes in comments

  • Hey everyone. I’m having trouble with this particular issue.
    I have done some searching, but have found that to do this, I need to edit the kses.php file. I have managed to get images to show, now I would just like to allow commenters to be able to have the font colours and sizes that they want.

    I also know that I need to add the code
    'font' => array('color' => array()),

    into this section of the kses.php file, but I am unsure where to place it to make it work

    This is the code that I have so far.

    $allowedtags = array ('a' => array ('href' => array (), 'title' => array ()), 'font' => array('color' => array()), 'img' => array( 'src' => array(), 'alt' => array()), 'abbr' => array ('title' => array ()), 'acronym' => array ('title' => array ()), 'b' => array (), 'blockquote' => array ('cite' => array ()),

    Please Help!!

    ~~*~~
    For extra information though it doesn’t really attirbute to my problem: I am using editormonkey, and am using the TinyMCE/simple controls. I want my readers to be able to have full use of the controls.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m not sure why they (i.e. whomever was responsible) pushed some of the $allowedtags array onto one line, but you’ll note it continues on from there:

    //      'br' => array(),
    'code' => array (),

    etc…

    It ends here:

    //      'ul' => array(),
    );

    Slip your entry for font in here at the end:

    //      'ul' => array(),
    'font' => array('color' => array()),
    );

    Hey thanks so much for your help. I tried and I tried, and I revised and I tried again, but nothing has work.
    This is what I’ve tried:

    1)
    // 'ul' => array(),
    'font' => array('color' => array()),
    );

    2)
    // 'ul' => array(),
    'font' => array ('color' => array()),
    );

    3)
    used font tags in the comments instead of the pick a colour in the WYSIWYG editor from editormonkey.

    Anymore ideas?

    Also tried this:
    // 'ul' => array(), 'font' => array ('color' => array()),
    (all on the one line)

    The one from your last reply will not work because a line in a PHP file with // at the beginning is commented out (i.e. ignored). If placing it in kses.php as I show above didn’t work, then something else has to be going on in the background, or it wasn’t added to the correct array.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Allow users to edit font attributes in comments’ is closed to new replies.
Skip to toolbar