Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group Blog


  • peterverkooijen
    Participant

    @peterverkooijen

    Just installed the bp-groupblog plugin in version 1.1.3. Sweet!

    I had to add this to the top of bp-groupblog.php though:

    /*** Make sure BuddyPress is loaded ********************************/
    if ( !function_exists( 'bp_core_install' ) ) {
    require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
    if ( is_plugin_active( 'buddypress/bp-loader.php' ) )
    require_once ( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
    else {
    return;
    }
    }
    /*******************************************************************/

    I may have had an older version of the plugin…

    I started this thread to keep track of my experiences with this plugin, post comments and ask questions. There are several other threads about this plugin out there, but they’re getting a bit confusing.

    Is it possible to use the group blog as a replacement for the group wire? Any downsides?

    Is it possible to add a quick posting field on top of the group’s main page, so the group blog becomes a more Twitter-like microblogging tool? Has anyone done that?

    Would using the group blog in combination with FeedWordpress syndication work? Mix external RSS feeds with group posts?

    Would it be possible to let group members enter those external RSS feeds?

    Going to try these things…

    Will this plugin be updated for version 1.2?

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

  • peterverkooijen
    Participant

    @peterverkooijen

    Is it possible to put a link in the blog back to the associated group?

    To use the group blog as a more Twitter-like microblogging tool, I’m going to try to integrate the P2 theme in the group blog theme.


    symm2112
    Participant

    @symm2112

    I tried doing the same thing. I used the plugin called posthaste but it didn’t have the add media features. That’s exactly what I’m trying to accomplish with groupblog. I want the ability to interact a little more with the group functionality than just forums and the streams.


    peterverkooijen
    Participant

    @peterverkooijen

    I’m trying to integrate the P2 theme. If you use P2 as the group blog theme it works fine, although you may want to customize the layout etc. to bring it into the BP environment.

    But I’d like to use the ajaxified microblogging interface on the group homepage (template /groups/single/home.php). I’ve figured out how to get P2 post form there, but Ajax is broken and all posts end up on the main blog.

    I guess the problem is the URL of the page where it’s send from doesn’t match the blog. For example, the group blog home is here:

    http ://mysite.com/groups/testgroup

    and the associated group blog is here:

    http ://mysite.com/testblog

    Is there a way to tell the script to treat data from the post form on …/groups/testgroup as if it is coming from …/testblog? And …/testblog should of course be some kind of tag, like bp_the_site_blog_link() (?) that enters the correct associated blog_url into the process.

    Or is there another approach?


    peterverkooijen
    Participant

    @peterverkooijen

    Is this the function (from p2/inc/ajax.php) that handles data from the P2 post form?:

    function save_post() {
    check_ajax_referer( 'ajaxnonce', '_inline_edit' );
    if ( !is_user_logged_in() ) {
    die('<p>'.__('Error: not logged in.', 'p2').'</p>');
    }

    $post_id = $_POST['post_ID'];
    $post_id = substr( $post_id, strpos( $post_id, '-' ) + 1 );

    if ( !current_user_can( 'edit_post', $post_id )) {
    die('<p>'.__('Error: not allowed to edit post.', 'p2').'</p>');
    }

    $new_post_content = $_POST['content'];

    // preserve custom "big" titles
    $post = get_post( $post_id );

    if ( !$post ) die('-1');

    $clean_title = str_replace( '…', '', $post->post_title );

    if( strpos($post->post_content, $clean_title ) !== 0 ) {
    $post_title = $post->post_title;
    } else {
    $post_title = prologue_title_from_content( $new_post_content );
    }

    $post = wp_update_post( array(
    'post_title' => $post_title,
    'post_content' => $new_post_content,
    'post_modified' => current_time('mysql'),
    'post_modified_gmt' => current_time('mysql', 1),
    'ID' => $post_id
    ));

    $post = get_post( $post );

    echo apply_filters( 'the_content', $post->post_content );
    }

    How does this function know which blog to store the data in?!

    I guess my problem has to do this:

    check_ajax_referer( 'ajaxnonce', '_inline_edit' );

    What does that do?

    There is also a function new_post() that has this:

    if( 'POST' != $_SERVER['REQUEST_METHOD'] || empty( $_POST['action'] ) || $_POST['action'] != 'new_post' ) {
    die('-1');
    }

    That has to do with matching referrers etc, right?

    Any pointers and ideas appreciated…


    peterverkooijen
    Participant

    @peterverkooijen

    There may be some clues here how to make P2 work outside the regular blog index.php.


    peterverkooijen
    Participant

    @peterverkooijen

    I’ve now integrated P2 by adding the theme to the /bp-groupblog/groupblog folder, editing these lines in P2’s functions.php and copying P2’s index.php main code to Group Blog’s blog-latest.php – with some cleanups…:

    define( 'P2_INC_PATH',  WP_PLUGIN_DIR . '/bp-groupblog/groupblog/inc' );
    define( 'P2_INC_URL', get_bloginfo('url').'/wp-content/plugins/bp-groupblog/groupblog/inc' );
    define( 'P2_JS_PATH', WP_PLUGIN_DIR . '/bp-groupblog/groupblog/js' );
    define( 'P2_JS_URL', get_bloginfo('url').'/wp-content/plugins/bp-groupblog/groupblog/js' );

    It works very nice without Ajax, by disabling js in that last line. The P2’s post-form then posts to the correct blog. That is already a huge user interface improvement; group members don’t have to go into wp-admin to post on the group blog.

    Unfortunately when you fire up the .js Ajax magic, posts still end up on the main blog. So the problem is somewhere in the Javascript;

    – the blog ID (?) does not make it into the javascript?

    – or the javascript has a default blog ID somewhere?

    – or the javascript identifies the blog based on the URL where it comes from, which is a group page, so it adds the post to the default URL instead?

    Which hypothesis is right? Or something else entirely? Where should I look to fix it? Probably somewhere in P2’s javascript files.

    Any help very much appreciated!

    EDIT:

    Without Ajax only content from the first tab in P2’s post-form, Status Update, is posted. If you use the Blog Post tab it forwards to the blog home page, but the post isn’t there.

    Posts also end up in Uncategorized, instead of the Status category. Comments on all posts are closed, can’t figure out why or how to turn them back on.


    peterverkooijen
    Participant

    @peterverkooijen

    Just noticed that the author links produced by P2’s entry.php look something like this:

    http://mywebsite.com/testgroup/blog/author/admin/

    The ‘/blog’ is not supposed to be there! It’s apparently generated by $wp_rewrite WP_Rewrite in /wp-includes.

    P2 apparently uses standard single WP tags that produce links that in some cases end in /blog. That would explain why posts end up on the default blog when I turn on the javascript.

    What would these tags be? Are there WP tags or functions that produce links with ‘/blog’?

    Is there good catch-all way to replace these links with WPMU/BP equivalents?


    peterverkooijen
    Participant

    @peterverkooijen

    Tried Posthaste again. Got it to work this time – I had the tag in the wrong place…

    But it basically has the same problem as P2; it doesn’t work on the group home page (with Group Blog), only on a regular blog index page.

    I suspect the problem is mismatching referrers or something like that. If anyone has any clue how to fix that or what to look for, please let me know.


    peterverkooijen
    Participant

    @peterverkooijen

    Were these changes adopted by the plugin? Are they an improvement? Should I replace my bp-groupblog.php file?

    Boone Gorges: Streamlining Group Blogs

    Modified bp-groupblog.php

    Will try this when I have time…


    Mariusooms
    Participant

    @mariusooms

    Compatible version for 1.2 should be released on Friday, fingers crossed. Improvements mentioned by Boone are already in version 1.3.1 of the plugin.

    As we move forward with this plugin we are definitely looking to post from the main page. Currently we have not yet experimented with it, but it is on our minds :)

    You should be able to pull in whatever you like in to your group. Per definition what works within your blog should also work on your groupblog. All you need is the blog id that belongs to the group. If you look at the template files you’ll see how we set the blog id and use switch blog to change blog id’s.

    Looking ahead we are even going further and reversing the concept of pulling in specific blog content into the group, but let the blog be the group and pull in buddypress information to the blog itself. The power of that approach is that you let groups have specific themes. The main group slug would just forward to the blog home page.

    The groupblog plugin is still being maintained and under development!


    Avatar
    Participant

    @avatarrocks

    Mates…

    You have been reading my mind : )

    We started by using P2 as our Styled Group Blogs

    then Group-Blog came along and blended quite nicely with BP.

    And I was just trying to figure out how we could possibly

    merge P2 front end with the BP-GroupBlog theme

    with different styles for different groups to boot.

    @ Mariusooms I am definitely looking forward to the 1.2 release

    please keep us posted.

    @ Peterverkooijen do you have a working version of your modified blog theme available somehow?

    Please let me know… I am quite interested.

    – Jeff –

    http://www.Vybee.com

    http://www.sparkCon.Vybee.com

    .


    peterverkooijen
    Participant

    @peterverkooijen

    @avatarrocks, integrating P2 into a blog theme or using P2 as the blog theme is relatively straightforward. Just make sure you get all the required links to js and css etc. right. That’s not really what I need though; I want to keep all blogs looking like traditional blogs.

    I’m trying to get a P2 post-form on the group homepage, via the blog-latest.php file in the bp-groupblog plugin. That’s where I get in trouble; P2 can’t find the right blog/post ID’s, posts end up on the default blog instead of the group blog, Ajax doesn’t function correctly, etc.

    My problem probably has something to do with URL mismatch between blog home (site.com/groupblog) and group home (site.com/groups/testgroup). The key could be the switch_to_blog function in bp-groupblog. Haven’t figured it out yet…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Group Blog’ is closed to new replies.
Skip to toolbar