Doug Smith (@douglsmith)

Forum Replies Created

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

  • Doug Smith
    Participant

    @douglsmith

    @robkk, That would be to allow additional tags, right?

    In this case it looks like tags are getting into the content that already are not allowed by default. The screen shot shows a span tag, which is not included in the bbPress allowed list in bbpress/includes/common/formatting.php.

    I have also seen this happen with TinyMCE activated. It seems to be iOS users and they claim that they haven’t pasted anything, but I have not observed this for myself yet.


    Doug Smith
    Participant

    @douglsmith

    Sometimes this happens when copying from within the same site. For example, you may copy and paste from a previous part of the conversation to quote it. The HTML from the site will be picked up and copied into the editor.

    I just added a function to fix this behavior at the bottom of the Enable Visual Editor bbPress Codex page.


    Doug Smith
    Participant

    @douglsmith

    I ran across this discussion while trying to solve a similar issue so I thought I’d update it with my solution.

    After enabling the visual editor I started seeing HTML present in some of the posts. The cause was people copying from a previous part of the discussion and pasting it into the editor to quote it. That was bringing in styles from the website and including it in the editor as HTML. For example:

    <span style="color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 20px; line-height: 32px; orphans: 3; widows: 3; background-color: #fbfbfb;">Some copied and pasted text from earlier in the discussion.</span>

    My solution was to add the TinyMCE _paste_ plugin to the editor, which defaults to cleaning up pasted text. Here’s the filter:

    function bbp_tinymce_paste_plain_text( $plugins = array() ) {
     	$plugins[] = 'paste';
        return $plugins;
    }
    add_filter( 'bbp_get_tiny_mce_plugins', 'bbp_tinymce_paste_plain_text' );
    In reply to: Whitelisting users?

    Doug Smith
    Participant

    @douglsmith

    Ah, I didn’t realize it was Akismet doing that rather than bbPress itself.

    There was a plugin for the old bbPress and WordPress that disabled Akismet checking for certain user roles. I’ll have to see if I can adapt the WordPress part of that to work for the new bbPress posting instead of just WordPress comments.

    Here is the old plugin for reference of anyone following along.
    https://plugins-svn.bbpress.org/skip-akismet/trunk/skip-akismet.php

    And here is a modified version that disabled checking for users who have been registered for a certain time.
    https://github.com/Gamua/bbPress/blob/master/my-plugins/skip-akismet.php


    Doug Smith
    Participant

    @douglsmith

    Another thing you might try is one of the many login widgets in the WordPress plugin repository. It doesn’t have to be specific to bbPress to work. For example, here’s a tabbed login widget that looks pretty nice.


    Doug Smith
    Participant

    @douglsmith

    You can add this code to your theme’s functions.php file to enable the editor.

    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    

    The visual editor is almost essential for the non-technical audience I have on my forum. Unfortunately, it’s not perfect. For example, if someone copies and pastes a previous post to quote it they’ll end up with a bunch of html visible in their post.


    Doug Smith
    Participant

    @douglsmith

    Thanks, Stephen. I was just about to update this conversation with the same thing now that I’ve had a chance to look through the code.

    I talked with @jjj about this at WordCamp Milwaukee and he suggested creating a Trac ticket for it, which I have done. https://bbpress.trac.wordpress.org/ticket/2668


    Doug Smith
    Participant

    @douglsmith

    Once I increased the memory limits in my php.ini AND set defined those limits in my wp-config.php it solved it. I’d also make sure all other plugins are disabled just to be sure they aren’t setting anything. I know I’ve seen at least one plugin that tried to increase memory limits.


    Doug Smith
    Participant

    @douglsmith

    I found that bumping the memory limit up in my php.ini wasn’t enough. If I’m reading the WordPress admin code right, it sets a memory limit which may actually be lower than what you’re trying to use and it overrides your settings.

    I added the following overrides to my wp-config.php file and that allowed me to complete the import. This was on a local machine with a large forum so you would probably want to try it with a lower limit to start.

    define('WP_MEMORY_LIMIT', '2048M');<br />
    define('WP_MAX_MEMORY_LIMIT', '2048M');


    Doug Smith
    Participant

    @douglsmith

    When it hangs, PHP is likely running out of memory. If you turn debug on in your wp-config.php file then you may be able to see more detail of what is happening.

    You can free up some memory by temporarily disabling all other WP plugins. I imported a fairly large forum and I ended up having to export my data to a copy of my site on my local computer where I could bump up PHP’s memory quite high.


    Doug Smith
    Participant

    @douglsmith

    I’ve been keeping notes as I’ve worked on importing a somewhat large bbPress 1.x install. I’d be glad to share what I have and help rework it a bit.


    Doug Smith
    Participant

    @douglsmith

    Does anyone have some expertise with importing from the stand-alone bbPress? I created another topic a while back with a very detailed account of my failed attempts at importing a somewhat large forum.

    https://bbpress.org/forums/topic/bbpress-plugin-20-rc-1-large-forum-import-failure

    There haven’t been any responses yet so I’d be grateful for anyone who might have some further ideas to try. I’d be happy to dig in and share my findings with everyone if I can get pointed in the right direction.


    Doug Smith
    Participant

    @douglsmith

    Does anyone have some expertise with importing from the stand-alone bbPress? I created another topic a while back with a very detailed account of my failed attempts at importing a somewhat large forum.

    https://bbpress.org/forums/topic/bbpress-plugin-20-rc-1-large-forum-import-failure

    There haven’t been any responses yet so I’d be grateful for anyone who might have some further ideas to try. I’d be happy to dig in and share my findings with everyone if I can get pointed in the right direction.


    Doug Smith
    Participant

    @douglsmith

    I could also see not giving the user a choice and making all post comments be forum threads by default. The discussion could appear both on the post and in a forum page, if desired. That would add the extra capabilities and avoid the confusion.


    Doug Smith
    Participant

    @douglsmith

    I just wanted to add that I pulled down the latest from svn and there were some changes in the importer code. Still no luck, though.


    Doug Smith
    Participant

    @douglsmith

    How do you think it should work? Should forum results appear in your existing blog search? Should they be separated? Should there be some kind of ‘smart search’ that knows where the request came from, and only shows results based on the type of content you are looking at (blog/forum/other)?

    The desired mode of search could depend on the site or the page within the site. In my case, I would want to show both main site and forum content in a search from the main site because I want to expose that content. But within the forum pages I wouldn’t mind adding a checkbox to the search to limit it to forum content only.

    How about choosing a sensible default to avoid options, but then giving the search function parameters to allow a theme developer to do the kinds of things I described?

    @anointed mentioned grouping search results. I would want to be able to code a search results page with mixed content or grouped by posts, pages, forum posts, and other custom post types. But I realize that may beyond the scope of the decision you need to make for this.

    I think our settings page is starting to get out of hand. Should we break the one page up into a few, or leave it as 1 page with all options?

    Thanks for trying to stick to the “decisions over options” mantra. Opinionated software is much more pleasurable to use.

    The settings page does have more options than any of the WordPress settings pages so it is a bit full. I could certainly see grouping all of the slug-related options to their own page. But it’s not so horrible now that it couldn’t go out the door and then be iterated later.


    Doug Smith
    Participant

    @douglsmith

    I’m not seeing any errors in my logs.


    Doug Smith
    Participant

    @douglsmith

    I have the same problem on a bbPress install I just set up. The top level feed just returns the text “No input file specified.”

    Lower level feeds work as long as the topics have content. If they have no posts, it returns a blank page, which generates an error in some readers. This won’t be a problem as more posts are filled in, but it would be nice to return an empty feed now to avoid the errors.

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