Skip to:
Content
Pages
Categories
Search
Top
Bottom

TinyMCE plugins does not work with bbPress


  • steilenhang
    Participant

    @steilenhang

    I got this great TinyMCE plugin, Ultimate TinyMCE, that works just great with WP. It does everything you want, but the most used functions for me is uploading images and inserting smileys.

    When you turn on the “Use the fancy WordPress editor to create and edit topics and replies” it shows up in bbPress too, but only admin can use the extra functions enabled. Take the smileys for instance. If you make a post of just smileys it tells you “ERROR: Your reply cannot be empty.”. If you write som text and include a smiley, it posts the text without the smiley. It is the same with images.

    What is happening? It does not matter what forumrole the user has. He can be key admin, makes no difference. Only WP Admin can post smileys and images on my forum, and I would like to change that. Does anyone know what is wrong here?

Viewing 13 replies - 1 through 13 (of 13 total)

  • steilenhang
    Participant

    @steilenhang

    You can remove “plugins” from the topic. The standard TinyMCE does not work either. Only admin can change color of the text, align right, etc. Looks like my bbPress has a general issue with TinyMCE.


    Michael
    Participant

    @michaelhpdx

    I’ve noticed this problem as well.

    I’m running WP 3.5.1 and bbPress 2.2.4.  My bbPress area is here: http://www.dalluva.com/member-area/forums/

    When a non-Admin user attempts to post a Topic or Reply using the Visual mode (built-in TinyMCE support), they’re led to believe that they can use do things like create ordered/numbered lists, etc.

    The visual editor does show it, but when they Submit it, bbPress strips this out.

    No surprise there: while the visual Editor bar shows these editing capabilities, the little box below the editor that says “You may use these HTML tags and attributes:” doesn’t list ol, ul, li etc.  Doh!

    I noticed that posting to this bbPress site, it shows in the little box that I can use ol, ul, li, and it does work.

    QUESTION:  How can I expand the available HTML tags and attributes (ideally without hacking the bbPress code) to include other tags like ul, ol, li, br, hr, etc?

    Thanks.

    Michael


    Michael
    Participant

    @michaelhpdx

    Okay, I think I figured this out on my own, though I don’t quite have the list of usable html matching what the default TinyMCE editor offers.  I’ll have to play with that separately.

    What I did was add a function in my functions.php file that changed the allowed markup for all bbPress (and blog) posts to include what I think is a reasonable list AND is still safe. I’ve added the IMG tag as well — for my Forum that’s a useful feature, and I’ll just have to monitor what people post in terms of image links.

    Here’s the code I added to my functions.php file:

    add_action('init', 'my_html_tags_code', 10);
    function my_html_tags_code() {
            define('CUSTOM_TAGS', true);
            global $allowedposttags, $allowedtags;
            $allowedposttags = array(
                    'p' => array(
                            'style' => array()),
                    'strong' => array(),
                    'em' => array(),
                    'i' => array(),
                    'del' => array(),
                    'h1' => array(),
                    'h2' => array(),
                    'h3' => array(),
                    'h4' => array(),
                    'h5' => array(),
                    'hr' => array(),
                    'blockquote' => array(),
                    'q' => array(),
                    'pre' => array(),
                    'span' => array(
                            'style' => array()),
                    'div' => array(
                            'style' => array()),
                    'ul' => array (),
                    'ol' => array (
                            'start' => array()),
                    'li' => array (),
                    'a' => array(
                            'href' => array (),
                            'title' => array (),
                            'rel' => array()),
                    'img' => array (
                            'src' => array(),
                            'width' => array(),
                            'height' => array(),
                            'alt' => array())
            );
            $allowedtags = array(
                    'p' => array(
                            'style' => array()),
                    'strong' => array(),
                    'em' => array(),
                    'i' => array(),
                    'del' => array(),
                    'h1' => array(),
                    'h2' => array(),
                    'h3' => array(),
                    'h4' => array(),
                    'h5' => array(),
                    'hr' => array(),
                    'blockquote' => array(),
                    'q' => array(),
                    'pre' => array(),
                    'span' => array(
                            'style' => array()),
                    'div' => array(
                            'style' => array()),
                    'ul' => array (),
                    'ol' => array (
                            'start' => array()),
                    'li' => array (),
                    'a' => array(
                            'href' => array (),
                            'title' => array (),
                            'rel' => array()),
                    'img' => array (
                            'src' => array(),
                            'width' => array(),
                            'height' => array(),
                            'alt' => array())
    
            );
    }

    steilenhang
    Participant

    @steilenhang

    Yep you are definetly on to something Michael!


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Some of this is going to change again in bbPress 2.3, so you may want to check out the beta.


    moebis
    Participant

    @moebis

    He’s right, the new beta1 is looking good. You can also now embed images (notice the new icon, looks like a tree):


    steilenhang
    Participant

    @steilenhang

    Aha, looks good :)

    I’m still having trouble with this one. I am using bbPress v2.2.4 with Twenty Twelve (tried it with Twenty Eleven also), and I am having tags stripped out. If I do ol/ul they return as a p tag with br tags separating the line.

    Here’s a screenshot of my toolbar for forum posting: http://d.pr/i/qjbM. This is with “Use the fancy WordPress editor to create and edit topics and replies” checked in Forums settings.

    If I uncheck that option, I get no toolbar at all: http://d.pr/i/SW05

    How can I get a basic formatting toolbar working correctly?


    nbquidditch
    Participant

    @nbquidditch

    Have the same problem (i.e. numbers and bullets are stripped out of the display) and I am using
    Atahualpa Theme and bbpress 2.2.4 and have the WordPress Fancy editor option switched on.

    I tried the solution offered by @michaelhpdx but it didn’t work. Perhaps I put Michael’s in the wrong function.php? I put it in the function.php in bbpress/admin. I notice there also on in bbpress/common and perhaps it needs to go under the theme?

    Regards

    Will


    nbquidditch
    Participant

    @nbquidditch

    Tried with the bbPress (Twenty Ten) Theme and the numbers & bullets show up.

    Let’s see if it works on this forum:

    1. Here is an ordered (numbered) list:
    • And here is an unordered (bulleted) list

    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Try the 2.3 release candidate. It should work the way you want it to.


    nbquidditch
    Participant

    @nbquidditch

    @johnjamesjacoby

    Good call – I just switched the current bbPress 1.2 plugin (I had to rename its folder it as the beta doesn’t update it. If you try a standard install it complains that a plugins/bbpress folder already exists).

    Once over that hurdle, the problem of no numbers in the ordered lists and no bullets in the unordered lists is fixed.

    I note that only bullets appear in this forum (numbers are replaced by bullets) so its seems this forum hasn’t upgraded to 2.3 yet!

    It will be interesting to see what other features 2.3 brings.

    Cheers

    Will


    JesusGon
    Participant

    @jesusgon

    bbpress 2.4
    Wordpress 3.6.1

    Add toolbar and buttons – activated
    Enable threaded replies levels – activated

    Plugin:
    bbPress Enable TinyMCE Visual Tab – activated
    I’ve tried it directly activating TinyMCE from functions.php in the theme, and removing the plugin.

    TinyMCE buttons appear
    I can write text in visual mode and forum, no problem.

    but
    If I reply to another thread does not work correctante.
    I can not write in visual mode, I do I can write in text mode

    Please, I can give my some solution?

    If I disable the TinyMCE visual mode does work

Viewing 13 replies - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.