Black Friday Sale! Get up to $40 off GP Premium!Learn more

[Resolved] GP BBP BUG fix: Dealing with long unbroken titles and content in BBpress

Home Forums Support GP BBP BUG fix: Dealing with long unbroken titles and content in BBpress

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #205989
    Max

    Tom

    If someone types a long unbroken title, or has a long unbroken string of text in a BBpress topic reply it breaks out of the native GP theme. A very long URL included in the content can cause the same issue. If one has bbpress widgets displaying in a sidebar or footer for recent replies of recent topics the titles displayed in those will also break out of the sidebar.

    I have put together the following code to fix this:

    /*breaks and wraps bbp title in widgets if long unbroken word inserted in topic title or reply.*/
    .widget .bbp-forum-title,.widget .bbp-reply-topic-title { max-width:225px; display: inline-block; word-wrap:break-word; word-break: break-word;}
    
    /*will need to increase this from 400px if make page wider*/
    #bbpress-forums li.bbp-topic-title, #bbpress-forums div.bbp-reply-content { 
        max-width:400px; display: inline-block; word-wrap:break-word; word-break: break-word;}
    
    #bbpress-forums div.bbp-reply-content { max-width:580px; display: inline-block; word-wrap:break-word; word-break: break-word;}

    It all works as it should EXCEPT in the replies created page located in the front end bbpress user profile.

    From what I can see in Firebug the content there has the #bbpress-forums div.bbp-reply-content identify however the content area is much narrower than a regular topic reply because of the profile page sidebar.

    Tom, I would be grateful if you could check my CSS above and also tell me what identifier I should use to break the reply content that appears in the replies created page of the bbp front end user profile.

    Kind Regards

    Max

    • This topic was modified 4 years, 4 months ago by Max.
    #205990
    Max

    here is a long unbroken text string for testing purposes:

    zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

    #206059
    Tom
    Lead Developer
    Lead Developer

    I wonder why this wouldn’t work?:

    #bbpress-forums {
        word-wrap: break-word;
    }

    That should apply to everything inside bbPress.

    Here’s a screenshot of the change on your text post: http://screencast.com/t/xfl3EQilJWN

    #206062
    Max

    I am off to bed will test it in the morning. However, from what i have read word-wrap: break-word; does not work on all browsers?

    #206063
    Tom
    Lead Developer
    Lead Developer
    #206068
    Max

    This works in FF, IE8910, and Chrome:

    #bbpress-forums {
        word-wrap: break-word;
        word-break: break-word;
    }

    Thanks for editing down my mess into a single line.

    Maybe you should add it to your style sheet?

    Kind Regards

    Max

    #206082
    Tom
    Lead Developer
    Lead Developer

    I’ll consider it, but it’s not a very common thing to have massive non-breaking words 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.