Site logo

Archived topic

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

6 replies · Started by Max on July 2, 2016

Viewing posts 1–7 of 7

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

here is a long unbroken text string for testing purposes:

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

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

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?

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

I'll consider it, but it's not a very common thing to have massive non-breaking words :)

This archived topic is closed to new replies.