Skip to:

Re: Group Blog



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!


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.

Skip to toolbar