bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

bbpress doesn't auto-close tags?

(7 posts)
  • Started 12 months ago by _ck_
  • Latest reply from benbeltran
  • This topic is not resolved

Tags:

  1. I've got sloppy members not closing their tags and the markup runs through the rest of the page. Doesn't WP already do auto close on tags? Did bbpress not pick up that part of the code?

    Posted 12 months ago #
  2. WP doesn't auto close tabs by default either (unless the new editor does it). Does anyone know if the QuickTags plugin for bbPress auto closes tabs?

    Trent

    Posted 12 months ago #
  3. http://trac.bbpress.org/ticket/683

    Trent

    Posted 12 months ago #
  4. Actually I may be wrong about this.

    I dug through the default filters and I see this:

    add_filter('pre_post', 'balanceTags');

    Does balancetags == auto-close tags?
    Looking at the function it would seem to be so.

    Perhaps I have a plugin conflict or does this behaviour exist on even on a default install?

    added: I just tested here and yup, it doesn't auto-close

    Posted 12 months ago #
  5. AHA!

    I found a bug. Finally I can contribute.

    Wordpress does indeed auto-close tags and has a fantastic routine, the balancetags I mentioned above.

    HOWEVER

    it was copied raw into BBpress and it won't work by default because it's looking for an option that will never be set because BBpress doesn't have it

    function balanceTags($text, $is_comment = 0, $force = false) {

    if ( !$force && get_option('use_balanceTags') == 0 )
    return $text;

    See what I mean? There's no manually way to set use_balanceTags in BBpress.

    So how do we force the filter on? I know it has to be balanceTags ($text,1,1) to work.

    Posted 12 months ago #
  6. Yay! I figured out how to hack it to make it happen.
    To leave the core files alone, I did it through a plugin.
    The balancetags in bbpress takes less parameters than from WP.


    function force_balance_tags($text) { return balanceTags($text, true);}
    add_filter('pre_post', 'force_balance_tags');

    Tested working.

    Another nice addition in there would be to add nofollow to any post links.

    add_filter('pre_post', 'bb_rel_nofollow');

    Posted 12 months ago #
  7. works wonderfully ... now to see if I can make it work for the bb-signatures plugin :).

    Posted 10 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.