Search

bbPress Showcase » bbPress Chat

Post Spacing - "Enter" doesn't provide <br>

RSS
  1. KitchenDip
    User has not uploaded an avatar

    member
    Joined: Oct '11
    Posts: 12

    offline

    I've tried it all, a few times over. Will take another look again in a bit, but if I can't get it working, we'll just forget it. It's probably for the best to control the vertical breaks that users can post anyways. Thanks for all the help _ck_ , you run a quality site.

    Posted 5 months ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    Try doing a view source on the new posting with modified code.

    See if it's actually inserting <p></p><p></p><p></p><p></p>

    Part of the conflict is that the wordpress api bbpress uses tries to convert <br /> to <p>

    I might have more time to look at this over the weekend.

    Posted 5 months ago #
  3. KitchenDip
    User has not uploaded an avatar

    member
    Joined: Oct '11
    Posts: 12

    offline

    Nope, it's inserting it like:

    <p>5 more breaks to test</p>
    <p>3 some breakage here</p>
    <p>1 break</p>

    It's surely something deeper within our beat-up coding, we appreciate the help. After tweaking our design a bit more, we've provided more spacing/etc, so fixing our original issue isn't needed now. I'm sure your original solution would probably work otherwise.

    Posted 5 months ago #
  4. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    hmm, I missed this one in bbpress 1.x

    function bb_encodeit( $matches ) {
    	$text = trim($matches[2]);
    	$text = htmlspecialchars($text, ENT_QUOTES);
    	$text = str_replace(array("\r\n", "\r"), "\n", $text);
    	$text = preg_replace("|\n\n\n+|", "\n\n", $text);

    See that last line? Same problem, so comment it out too.
    function.bb-formating.php around line 55

    // $text = preg_replace("|\n\n\n+|", "\n\n", $text);

    Posted 5 months ago #
  5. KitchenDip
    User has not uploaded an avatar

    member
    Joined: Oct '11
    Posts: 12

    offline

    Tried it all, several times over. Who knows what the issue is, but I've got an idea that would solve 2 of our issues. Would it be possible to modify your plugin (http://bbpress.org/plugins/topic/admin-can-post-anything/) to allow everyone with a forum account to "by default" (no checkbox), to post youtube videos, soundcloud audio, etc? Not only would this address our spacing issue (it lets people space how they like), but it would allow our audience to share music. Any thoughts?

    Posted 5 months ago #
  6. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    You cannot allow post-anything for regular users, they could destroy the site with javascript and XSS and other exploits.

    Posted 5 months ago #

RSS feed for this topic

Post a reply to “Post Spacing - "Enter" doesn't provide <br>”

You must log in to post.

keep _ck_ coding >> donate $5 <<     Theme Switcher:
37 users online from in the past 30 minutes. 12 bots 25 guests
3,804 views today 8,638 yesterday 16,043 peak. Most at once 47 today 60 yesterday 131 peak. Visited today: qamilon, pandoracam, lvgalliera
2,288 posts in 394 topics over 66 months by 430 of 2,165 members. Latest: qwe12345100, Janvelden, watchessaleus