bobbyh (@bobbyh)

Forum Replies Created

Viewing 18 replies - 76 through 93 (of 93 total)
  • That would work. A quick Google search found this under #3:

    * http://www.makeuseof.com/tag/top-20-wordpress-plugins-for-power-users/

    The download is here:

    * http://www.makeuseof.com/files-shared/

    I’ve never used it, but it looks like what you want.

    Good luck!

    This isn’t exactly what you’re looking for, but it lets you put a list of your bbpress topics in a sidebar on your WordPress site:

    * https://bbpress.org/plugins/topic/bbpress-latest-discussion-for-wp/

    You just see the IP address because you’re logged in as a Keymaster. Log out and refresh, and you won’t see the IP addresses…


    bobbyh
    Member

    @bobbyh

    Sweet! :-)

    Thanks, Sam!


    bobbyh
    Member

    @bobbyh

    Our bbpress forum does roughly 20-25k pageviews per weekday. We also have a WordPress blog (with caching) that does around 75k pageviews per weekday. The boards and blog are integrated, and share the same database.

    The database is the only thing that runs on a (mt) dedicated server with 1GB of RAM (the Extreme package), and its my.cnf is a slightly tweaked version of a my-huge.cnf.

    The database was really running ragged a week ago, with a load average between 2.5 and 4.0. The first change I made was described in the first post (indexing topic_slug in bb_topics, tag in bb_tags and forum_slug in bb_forums). That really helped a lot, because on a popular forum, there are apparently enough new topics that the query cache gets invalidated frequently. By making this query a lot more efficient with an index, the load average fell to between 0.4 and 0.7.

    Then, after adding the 4-column index, the load average plunged to between 0.03 and 0.20. It’s pretty amazing.

    Indices are AWESOME! :-)


    bobbyh
    Member

    @bobbyh

    Note: if your DB is slow and you’d like to try this optimization, you must add the columns in the right order while making this multi-column index:

    1. topic_status

    2. forum_id

    3. topic_sticky

    4. topic_time

    The order of the columns in the index needs to be the same as the order of the fields in your query, as explained here.

    In reply to: Sidebar

    bobbyh
    Member

    @bobbyh

    Nick, are you talking about something like this?

    * https://bbpress.org/forums/topic/plugin-add-sidebar

    This doesn’t do any magic integration with WordPress, it just lets you put a sidebar.php file in your theme directory that can be invoked from multiple pages. I actually ended not using this approach (despite writing the plugin). Instead, I just added some PHP/xhtml at the end of header.php.


    bobbyh
    Member

    @bobbyh

    Sam, yes, you’re totally right, sorry I wasn’t thinking. mysql can only use one index per query, and a multi-column index is much more restrictive for this common query, and hence much faster. This will really speed things up, so I’ll add these indices tonight (when server load goes down). Thanks!

    I also think it’s worthwhile to add this multi-column index to the core. What do you think?

    EDIT: I was too curious, so I added a 3-column index just now. When I did an EXPLAIN statement on my mysql 4.1 database, this 3-column index was listed as a possible_key, but not used as a key. The query with a 3-column index thus didn’t use an index and required a “where” and a “filesort” (for topic_time). I then added topic_time to the index, making this a 4-column index, and mysql started using the 4-column index as the key, which also eliminated the slow “filesort”. This is the probably the most common query bbpress does, so making it faster is very exciting!


    bobbyh
    Member

    @bobbyh

    Yeah, I have a large mysql query cache on a dedicated server with 1GB of RAM that only runs mysql.

    Doesn’t the query cache get thrown away whenever the underlying table updates? On a popular forum, I think the bb_topics table changes fairly often, so I guess that’s why the query appears a lot in my logs.


    bobbyh
    Member

    @bobbyh

    Thanks for your thoughtful response, sam! That sounds great to me! :-)

    FYI, I also came across this query repeatedly in my slow query log:

    SELECT SQL_CALC_FOUND_ROWS * FROM bb_topics WHERE topic_status = 0 AND forum_id = 1 AND topic_sticky = 0 ORDER BY topic_time DESC LIMIT 40, 20;

    topic_sticky isn’t indexed (in either 0.83 or 0.91, I checked both). Should it be? It’s a tinyint(1), so indexing it should cost very little while improving performance a lot, I think?

    Thanks Sam! :-)

    I ran into a similar problem. Specifically, I created a new Role called ‘Superuser’ that has capabilities between Member and Moderator. I don’t want these users ever to be spam-filtered.

    I solved this by replacing this function in /bb-includes/functions.php:

    function bb_trusted_roles() {

    return apply_filters( 'bb_trusted_roles', array('moderator', 'administrator', 'keymaster') );

    }

    with this:

    function bb_trusted_roles() {

    return apply_filters( 'bb_trusted_roles', array('moderator', 'administrator', 'keymaster', 'Superuser') );

    }

    This works, but I hate hacking the core. Is there a way to do this with a plugin? I tried and tried, but I couldn’t figure out how to array_push a new Role on that array. Can somebody help me, perhaps with their superior understanding of how add_filter works? :-)

    Thanks!

    -Bob

    Outchy, I had this problem. There’s no way to change this in the admin, you have to use phpmyadmin or another database tool.

    Go into your database, find the bb_forum table and Browse it. Do you see the field for “forum_slug”? Find the row for the forum you want want to change, and change the “forum_slu” field from “general-discussion” to “sk6ers-talk”. I did this with no ill effect on my forum.

    Hi Susan,

    Is sounds like maybe the .php file extension on your computer has become “associated” with MS Picture It? If so, try changing the file association for .php on your computer.

    In reply to: Limit long words

    It sounds like you’re looking for something like the proprietary word-wrap CSS property which works in IE browsers only, as far as I know.

    .post {word-wrap: break-word; }

    In reply to: Limit long words

    Yeah, the easy fix for this is adding:

    .post {overflow: hidden; }

    In reply to: css help

    Congrats! Also, since you don’t have IE7, I’ll confirm here that your theme also looks good on IE7. :-)

    In reply to: css help

    I see the problem in IE6, outchy. I think the problem is that the width of your “discussions” div is too wide, so it can’t “fit” next to the “Top Posters” sidebar and still be less wide than your page wrap. To see if this is the problem, lower the CSS width property for “discussions” and refresh in IE6. If that’s actually the problem, you can revert the width property and then use a conditional CSS file that declares a shorter width for discussions on IE6 only.

Viewing 18 replies - 76 through 93 (of 93 total)