Re: How do I use an external version of bbPress with BuddyPress?
Ha! Well I’d have to understand the problem clearly first
I’m still confused if his end goal is external bbpress <-> buddypress theme’d (like buddypress.org) or custom plugin to display external bbpress categorization (main themes) within buddypress on the /forums/ component page (similar to what i did with group forums extras and the forum index subplugin – example: http://etivite.com/forums/ )
BuddyPress restricts its own functions to a parent_id (BP_FORUMS_PARENT_FORUM_ID) so no internal bp functions will pull out external bbpress forums.
But – you can call some internal bbPress functions if bb_init is invoked. Not all will work (due to various linking issues or meta table stuff) but some will get you the info you need.
(example: http://etivite.com/groups/buddypress/forum/topic/quick-tip-remove-change-avatar-link-under-profile-if-avatar-upload-is-disabled/ note the “tags” section on the topic – this is actually calling a bbpress function but i had to rework the linking)
So given that… if we look at the bb-template/front-page.php we see the bb_forums() loop. and if you have an external bbPress hooked up… then just plug this code into buddypress/theme/forums/index.php
<?php if ( bb_forums() ) : ?>
<h2><?php _e('Forums'); ?></h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php while ( bb_forum() ) : ?>
<?php if (bb_get_forum_is_category()) : ?>
<tr<?php bb_forum_class('bb-category'); ?>>
<td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
</tr>
<?php continue; endif; ?>
<tr<?php bb_forum_class(); ?>>
<td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endwhile; ?>
</table>
<?php endif; // bb_forums() ?>
BUT – the links are borked if it pulls up an internal bbpress group forum (so check is required for BP_FORUMS_PARENT_FORUM_ID and use the buddypress forum link function ) otherwise the links point to the configuration which the internal bbpress is using (which should be the same as an external bbpress install)
hopefully i confused everyone a bit more