leggo-my-eggo (@leggo-my-eggo)

Forum Replies Created

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

  • leggo-my-eggo
    Member

    @leggo-my-eggo

    @sambauers Any progress on the bbpress live plugin?


    leggo-my-eggo
    Member

    @leggo-my-eggo

    @Atsutane – I had slightly misunderstood how to use the filters in the Latest Discussion plugin, and I realize I can get closer than I thought with that plugin. However, I don’t think I can get all the way there. The bbld_forum filter seems to be applied to the variables before they have been given values, right? So, you could, as in the example, replace a specific gravatar based on the $user_data variable. But is it possible to get the $forum variable in the same way? What I need is to determine the forum ID within my filter function.


    leggo-my-eggo
    Member

    @leggo-my-eggo

    Great, thank you. I hope that will solve my problem.


    leggo-my-eggo
    Member

    @leggo-my-eggo

    bbPress Live claims on its download page to only be compatible up to 2.6.2. I tried it anyway, and it did not work. The widgets did not function at all, and the template functions did not pull any forum data.


    leggo-my-eggo
    Member

    @leggo-my-eggo

    @sambauers – Yep, I get that, thanks. I think where I’m coming from is that I am a long-time WordPress developer, and I have just had the need to create a forum, so I (almost automatically) chose bbPress, thinking that all the talk about integration would allow me to do some cross-platform things that I had in mind. I didn’t read far enough into the forums to discover that the “deep integration” only went one direction (bbPress->Wordpress), and now I’m way too far down the the path of developing this site to turn around, and I’m not sure I could get the interaction I wanted with anything else anyway. Any chance you’re updating the bbPress Live plugin for 2.8?

    @johnhiler – Agreed about avoiding deep integration. Given what I now understand about how it works, I would prefer to avoid it entirely, merely pulling content between platforms. I actually can mod the Latest Discussion plugin, and that’s probably what I’ll end up doing. I kind of hate doing that because I forget later what I changed when I want to upgrade. Basically all I really need is a way to limit one of my forum’s topics and counts to those topics begun today (I have a “Today Only” forum to talk about topics for a single day). I have this working fine within bbPress, and what I wanted to do was simply filter the output of the Latest Discussion plugin like that from within my own plugin.


    leggo-my-eggo
    Member

    @leggo-my-eggo

    Yeah, that makes some sense. However, there’s a conceptual problem here, right? Because the recommended structure is to install WordPress and then install bbPress as a subdirectory (say, /forums). Which works great, but then I’ve got a home page created by WordPress, and since the deep integration only works the other way around, no way to use any bbPress content on that home page.

    I also tried using the Latest Discussion plugin, but I have a modification that I need to filter some of the output supplied by whatever functions output the discussion and forum lists, and that plugin does not include a filter which allows me to do what I need to do, so I was trying to find a way to use bbPress functions on my WordPress home page.

    For “deep integration” to be really relevant, I have to have a way to include bbPress content within my WordPress pages, right? Or am I really thinking of this the wrong way?


    leggo-my-eggo
    Member

    @leggo-my-eggo

    Gotta say, that was not the answer I was expecting, since there are so many posts on these forums advising exactly that solution. I also am a little confused about why you would intentionally limit the interaction between these two–obviously intended to work together–apps, but I’m sure there are complexities here that I don’t understand, and I certainly understand needing to draw the line somewhere, especially at this early stage of development.

    As for using bbPress Live, that’s what I initially tried to do, but it hasn’t been updated since October of last year, and doesn’t work with WordPress 2.8, so that’s not really an option. If it did work with 2.8 I would be more than happy to use it instead of including bbPress in WordPress, as it apparently provides all the functionality I would need. Any chance an update is on its way soon?

    All I really need is the ability to pull the latest discussions list and the forums list into my WordPress home page. Any other suggestions are welcome.


    leggo-my-eggo
    Member

    @leggo-my-eggo

    Well, OK, this is pretty strange. I’ve added require_once(ABSPATH . 'forums/bb-load.php'); to the bottom of my wp-config.php file, and it all seems to work fine. Except, my admin interface for WordPress has lost all its colors and images. I have run a diff on the two resulting wp-admin interface’s code, and it looks like the act of loading bbPress is taking over the loading of styles at the top of the WordPress admin interface, which doesn’t really make much sense to me. Anybody understand what’s going on here? I’m using bbPress 1.0-rc-3 and WordPress 2.8.


    leggo-my-eggo
    Member

    @leggo-my-eggo

    I found a much more elegant solution by slightly modifying some other code I found here on the forums. I created a plugin like this:

    /* Plugin Name: Filter Today Only Topics */

    function filter_today_only_topics($where){
    $today_only_forums = array ("4"); // The id# of the Today Only forum(s)
    foreach($today_only_forums as $forum) {
    $where .= " AND (forum_id != " . $forum . " OR topic_start_time > CURDATE()) ";
    }
    return $where;
    }

    add_filter( 'get_latest_topics_where', 'filter_today_only_topics');
    add_filter( 'get_latest_posts_where', 'filter_today_only_topics');

    This has the advantage of working in any list of recent posts without modifying the templates. The counts are still wrong in the forum lists, and I can’t find a filter that let’s me change the query for just those, but I’ll just write a template function for that.


    leggo-my-eggo
    Member

    @leggo-my-eggo

    OK, I think I have this one solved. I modified my forum.php file to include this block right before the $topics foreach loop.

    <?php if( $forum_id == '4' ) { // If this is the "Today Only" forum (#4), replace the $topics query
    $today = date('omd');
    $today_topics_query = new BB_Query( 'topic',
    array(
    'forum_id' => 4,
    'started' => $today,
    'order_by' => 'topic_start_time',
    'topic_status' => 'all',
    'open' => 'all',
    'count' => true,
    'per_page' => 20
    )
    );
    $topics = $today_topics_query->results; // Here's the array of topics the query returned.
    } ?>

    I’ll let you know for sure if it works tomorrow. :)

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