_ck_ (@_ck_)

Forum Replies Created

Viewing 25 replies - 2,101 through 2,125 (of 2,186 total)

  • _ck_
    Participant

    @_ck_

    Well there’s isn’t any forum development issue that is urgent in a firetruck sort of way (but that’s a cute expression).

    Maybe I’m just being impatient, maybe it’s far too soon for bbpress to attract a decent base of plugin developers/users. I’d just like to see it sooner than later. 0.8.2.1 added some critical features, with just a few more it’s almost ready to hatch.

    Let’s look at the finish line, one possible goal for bbpress. Take a look at a typical Simple Machines forum aka SMF (PHP+mysql, open source)

    http://forums.lesterchan.net/ (that’s GamerZ)

    look at the useful features on the page.

    Now look at the lovely low query counts down below.

    I’m a big vbulletin fan but that works better than vbulletin IMHO.

    I wouldn’t call that forum “heavyweight” and I wouldn’t call SMF “bloated”. So what’s going to be bbpress’s niche then if it’s not going to do what SMF does?

    (ps. poke through the menus on SMF 2.0 too http://www.simplemachines.org/community/ oh and then look at the insanely low query count at the bottom of a full page of posts)

    In reply to: Number of users error

    _ck_
    Participant

    @_ck_

    Do you happen to have phpmyadmin (it also comes with cpanel which alot of people have).

    That would allow you to examine the users directly and see if there is a database issue.

    What version of WP do you have installed by the way?


    _ck_
    Participant

    @_ck_

    The rush is that the project is “out there” and people are looking at it and coming to conclusions. Bad conclusions.

    I’ve tried to attract/recruit some of the major wordpress plugin writers to bbpress and the response has not been good unfortunately.

    What I find interesting is the belief around here that wordpress integration is not a major desire by most people evaluating it. How would we ever know the sheer number of people that have looked and been turned off? At least one person on wikipedia sees it this way:

    The project was created by Matt Mullenweg to support users of WordPress. Existing bulletin-board software was overly sophisticated for those requirements, so bbPress was created with the same focus as WordPress: a functional and extensible core, with all other capabilities delivered through plugins.

    The “overly sophisticated” really bothers me.

    Because that would mean bbpress’s goal is to be under sophisticated. Obviously that’s not the official statement but my point is that’s how it’s being perceived.

    Keeping advanced features out of the core is fine. I get that. But some of those features should somehow exist in plugin form by now – at least that’s what I was hoping for. So now I am trying to make that happen, which I can barely do on my own as I am not a professional programmer by any means.

    In some good news, GamerZ is happy to have me try porting his WP Polls. The bad news is he is unlikely to stop using his SMF forum software anytime soon and try bbpress. Not that I blame him right now.


    _ck_
    Participant

    @_ck_

    Oh how embarrassing, it’s “mdawaffe” without the “L” I keep inserting. My sincere apologises, it was completely unintentional.


    _ck_
    Participant

    @_ck_

    Actually he can’t really “fix” the plugin, it’s an overall integration failure which necessarily adds more mysql queries (just like the plugin needed to allow spaces adds more overhead).

    Basically the output template will HAVE to use a difference function call than the “use display name” which fixes it everywhere else before it’s written back to the database.

    It’s the cost of integration and yet another example of why bbpress isn’t magically better than any other forum for integration with wordpress.

    (or just use my workaround to cut out the extra queries ;-)

    ps. “mdawaffle” wasn’t a “dig” – isn’t that his nickname?


    _ck_
    Participant

    @_ck_

    Yup this is another area where bbpress has to be fixed before it hits the mainstream (or before the mainstream will adopt it).

    If you are using it with wordpress, for now you can route all the login/register links to wordpress which does a better job.

    I discovered this by accident from the plugin that email favorites which I then had to hack directly to fix.

    I’ll open a ticket in trac if there isn’t one already.


    _ck_
    Participant

    @_ck_

    Ah I have another idea that would allow it to use the regular post editor and all it’s features/hooks.

    bbpress won’t display any post normally that doesn’t have a status of 0. “1” is deleted. But something like 9 could be the wikipost for the topic. That way even older topics could get a wikipost. All we have to do is check for a post status of 9 with the topic id and if so, display it after the topic summary on top. Hook it to show an edit button that works for any subscriber (or maybe a level setting so only mods, etc can edit it) and of course a button within the topic summary to start a wikipost if there is no post with a status of “9”.

    Too exhausted to start on this project this week but will look at it next. If anyone wants to have a go at it, please do.


    _ck_
    Participant

    @_ck_

    Aha! The culprit is “Use Display Name” written by no less than the mdawaffle himself…

    His quick coding on that didn’t deal take into account the reprecussions of grabbing the entire meta for every username.

    So I guess this is a caution to anyone using that plugin.


    _ck_
    Participant

    @_ck_

    Hmm. Well I don’t think it’s an old theme but it might be another plugin hooking topic_last_poster(). I will have to dig.

    Also, how many forums + topics are you showing on your front page?

    I’ve got 8 forums and 35 topics with roughly 20 unique last poster usernames on the front page.

    Not that it really matters, if you are only hitting 11 queries than it’s still quite efficient. What’s funny is it could be single digit queries except that bbpress tests that it exists by hitting the database with a useless query every time it starts.


    _ck_
    Participant

    @_ck_

    No, all those are properly cached and do not reduce mysql queries.

    topic_last_poster() for some reason forces a new metadata reload and two new mysql queries, uncached. It’s meant to be able to be used outside loops so it basically has to. It can’t just peek at the entire topics table just returned from the database.

    Any plugin that affects the username has already affected it on the write to the topics table. It’s already set for presentation. No need to hook it unless you are doing something really crazy. Even the “admin use display names” plugin will still work correctly.

    It’s the only really easy optimization.

    “topic_last_poster()” sticks out badly if you install the plugin I posted above and look at the results.

    update: if you are really worried about filters you can either have a lightweight pseudo function or do it this way

    echo apply_filters( 'topic_last_poster', $topic->topic_last_poster_name, $topic->topic_last_poster);

    instead of just

    echo $topic->topic_last_poster_name;

    and that will apply any filters looking for it


    _ck_
    Participant

    @_ck_

    OMG. This is insane.

    Go edit your front-page.php, forum.php and view.php templates.

    Change

    topic_last_poster();

    to

    echo $topic->topic_last_poster_name;

    Cuts mysql queries in half. I went from 50 to under 20.

    The data is already in the retrieved topics in memory, there’s no need to reload all the userdata.


    _ck_
    Participant

    @_ck_

    Eek – I’m kinda freaked out by how bbpress handles front page topics and appends the last poster’s name.

    Two separate mysql queries are made for each name to get the data. Instead of retrieving the sequence of names all at once so it’s within the same table for speed. So if you have 50 front page topics with 50 different authors, beyond all the other queries will be 100 more queries.

    That’s got to be addressed if bbpress wants to call itself lightweight and efficient. All those names could be gotten with two built up calls, regardless how many on the front page.


    _ck_
    Participant

    @_ck_

    You mean the one by GamerZ S010?

    I’ve watched him improve that over the past year or two, actually sent some bug fixes and improvements. Still doesn’t do quite everything I’ve seen in other advanced polls but he’s got the multi-vote option so that’s good.

    It uses the metadata so it would be fairly easy to convert, the only problem is his creation and management menus are all meant for the admin interface so a new creation routing would have to be written for the regular user interface. Then there is the problem of the trigger and attachment. I guess it gets attached to the topic-info box.

    Now if we could only get him to switch from simple machines forum to bbpress we’d have a shedload of new bbpress plugins within a month ;-)


    _ck_
    Participant

    @_ck_

    Er, okay. I don’t follow. Are you making one then?

    Or are you just rubbishing my idea of porting one of hundreds of existing php polling programs (a dozen for wordpress alone) to save weeks of development and bug squashing?

    bbPress needs some serious options fast if it’s going to hit critical mass and attract additional quality programmers. I just want to see a decent polling feature added as soon as reasonable possible.


    _ck_
    Participant

    @_ck_

    Yes but how would i use the editing edit post template without having to recreate a post editor, etc.

    Oh wait, you mean to create it as the 2nd message when a new topic is created. Old topics would not be able to have a wiki post.

    Hmm.

    If only bbpress actually obeyed post_position, there would be so many nice tricks that would be so easy to do. Argh.


    _ck_
    Participant

    @_ck_

    Ah I totally forgot I’ve got visitor tracking which adds some calls but doesn’t explain why it’s more than a dozen calls by design.

    If anyone’s interested, I’ve ported the “query diagnostics” plugin from wordpress so you can see each mysql call used, hidden as a report at the end of each page (for administrators).

    <?php

    /*
    Plugin Name: bb-benchmark
    Plugin URI: http://CKon.WordPress.com
    Version: 0.10
    Description: Prints simple benchmarks and mysql diagnostics, hidden in page footers.
    based on Jerome Lavigne's Query Diagnostics for WordPress http://vapourtrails.ca/wp-plugins
    Author: _ck_
    Author URI: http://CKon.WordPress.com
    */

    /* INSTRUCTIONS:

    1. add this line to your bbpress config.php file: @define('SAVEQUERIES', true);
    2. install & activate plugin
    3. do a "view source" on any bbpress page to see hidden results at bottom

    */

    function bb_benchmark_output() {
    if (bb_current_user_can( 'administrate' ) ) :
    if (SAVEQUERIES) :
    global $bbdb;
    echo "<!-- n === benchmark & query results === n ";

    while($qposition < $bbdb->num_queries){
    $qsubtime=$bbdb->queries[$qposition][1];
    if ($qsubtime>$qmaxtime) {$qmaxtime=$qsubtime;$qmaxquery=$bbdb->queries[$qposition][0];}
    $qtotal += $qsubtime;
    $qposition++;
    }

    $timer_stop=bb_timer_stop(0);

    echo @shell_exec("uptime")."n";
    echo "query count: ".$bbdb->num_queries." nn";
    echo "total query time: ".round($qtotal,4)." seconds nn";
    echo "total page time: ".round($timer_stop,4)." seconds.nn";
    echo "page render difference: ".(round($timer_stop-$qtotal,4))." seconds nn";
    echo "slowest call was: ".$qmaxquery."n at ".round($qmaxtime,4)." seconds nn";

    if (phpversion() >5.0 && function_exists(memory_get_peak_usage()) && function_exists(memory_get_usage())) {
    echo "nn === memory usage === n";
    echo "peak memory ".memory_get_peak_usage()." nn";
    echo "total memory ".memory_get_usage()." nn";
    }

    // echo "nn === resource usage === n";
    // print_r (getrusage());

    echo "nn === mysql queries used === n";
    print_r($bbdb->queries);

    echo "-->";
    endif;
    endif;
    }

    add_action('bb_foot', 'bb_benchmark_output');

    ?>


    _ck_
    Participant

    @_ck_

    If it makes you feel any better, wordpress doesn’t deal with it well either.

    I have to trick it into enforcing trailing slashes like this:

    RewriteCond %{REQUEST_FILENAME} !-f
    # RewriteCond %{REQUEST_URI} !..+$
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule (.*) $1/ [R=301,L,QSA]

    and that doesn’t even work half the time depending on what other htaccess trickery I’ve got going on

    But I notice if I have slugs turned on in bbpress, it will remove the trailing slash always. If I have slugs turned off, it won’t tolerate a trailing slash at all and will 404

    I did manage to get the topmost rss feed to tolerate slash or not using this obvious mod

    RewriteRule ^rss(/|)$ /forums/rss.php [L,QSA]

    One thing that is important to do in bbpress vs how it’s typically done in wordpress, is not re-use/re-load the bbpress core engine if there is a redirect (which doubles the mysql calls) but to try to do it through htaccess


    _ck_
    Participant

    @_ck_

    Well I don’t like to re-invent the wheel if it’s been done.

    Many times there are lots of little things you don’t think about when you try to build something from scratch vs convert a program that’s had years of development and on it’s 3rd generation.

    It’s far enough work at times to make things work with bbpress. I’ve already spent half a dozen hours this month tracking down subtle bugs in other people’s plugins.

    But if you want to try to make one from scratch I’ll do what I can though I am not a professional programmer by any means.

    In reply to: Plugin: Avatar Upload

    _ck_
    Participant

    @_ck_

    I have found and fixed a bug that was preventing the display of the newly uploaded avatar:

    https://bbpress.org/plugins/topic/46/page/3?replies=48#post-400

    (no more sleep(3) needed)

    In reply to: plugin: Markdown

    _ck_
    Participant

    @_ck_

    “her” plugin is for admin… yes… and very dangerous to override to allow visitors to have that kind of override…

    Do you want me to port “TextControl” to bbpress?

    It has markdown among many other options.

    http://dev.wp-plugins.org/wiki/TextControl

    http://ckon.wordpress.com/2006/08/14/updated-version-of-text-control-that-works-with-wp-21/


    _ck_
    Participant

    @_ck_

    Okay the plugin list is blank for me. It did seem to pull down the plugin list. But I don’t see any new plugins offered?

    Oh duh, I just re-read that it won’t show any plugins it hasn’t installed itself.

    Can’t that just be copied from the bbpress table?

    But wait, shouldn’t it show new available plugins not installed yet?


    _ck_
    Participant

    @_ck_

    Interesting – checking it out in a moment.

    It will be helpful to more tightly knit the bbpress community.

    I was thinking of making a voluntary plugin that would ping a bbpress stats site either nightly or weekly with your number of members, total topics, total posts. It would make a showcase for bbpress possibilities.

    Right now it’s hard to get a count of the number of installed bbpress users. I’ve tinkered with various search engine commands and come up with an active number of 200-300 but this could be wrong do to path or file renaming (or template editing).


    _ck_
    Participant

    @_ck_

    We probably need to email mdawaffle and have them add me to the move-it plugin ;-)

    I think I have the email address around here somewhere or maybe Trent can do it?


    _ck_
    Participant

    @_ck_

    I don’t think wordpress allows “@” does it?

    You shouldn’t allow email addresses as usernames on a forum.

    Very bad idea.

    However that said, this same routine could be used to override that.


    _ck_
    Participant

    @_ck_

    Hmm, well if you want a flash based forum, why not just install a flash based forum?

Viewing 25 replies - 2,101 through 2,125 (of 2,186 total)