Skip to:

Opened 6 years ago

Closed 5 years ago

#1915 closed defect (invalid)

Activity stream: Hide 'pending' forum topics and replies

Reported by: kraigg Owned by:
Milestone: Priority: high
Severity: major Version: 2.1.1
Component: API - Moderation Keywords: has-patch dev-feedback
Cc: jmdodd@…


Good morning all

I have found a problem where pending/unpublished group forum topics and replies still appear in the Buddypress activity stream.

I'm using the latest Buddypress 1.6 and BBPress 2.1.1, and the bbPressModeration plugin ( to moderate any newly created forums and forum topics. This plugin marks all new forums topics and replies as ‘pending’, until the administrator goes into the dashboard and marks them as ‘published’.

I’m using the code below for my custom Buddypress activity stream.


/* = Generate Custom Activity Stream
* Place this function anywhere you want to show your custom stream.
* Should accept any of these parameters:


/* = Custom Activity Stream
* Place this function in bp-custom.php (in your plugins directory)
function my_activity_stream($args ) {

  if ( bp_has_activities($args) ) : ?>

<div class="pagination">
<div class="pag-count"><?php bp_activity_pagination_count() ?></div>
<div class="pagination-links"><?php bp_activity_pagination_links() ?></div>

<ul id="activity-stream" class="activity-list item-list">

<?php while ( bp_activities() ) : bp_the_activity(); ?>

<li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">

<div class="activity-avatar">
<a href="<?php bp_activity_user_link() ?>">
<?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>

<div class="activity-content">

<div class="activity-header">
<?php bp_activity_action() ?>

<?php if ( bp_get_activity_content_body() ) : ?>
<div class="activity-inner">
<?php bp_activity_content_body() ?>
<?php endif; ?>

<?php do_action( 'bp_activity_entry_content' ) ?>


<?php endwhile; ?>


<?php else : ?>
<div id="message" class="info">
<p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p>
<?php endif;




Attachments (1)

bbpressmoderation.diff (1.3 KB) - added by jmdodd 6 years ago.

Download all attachments as: .zip

Change History (11)

#1 @johnjamesjacoby
6 years ago

  • Milestone changed from Awaiting Review to 2.2

Thanks for the report. Moving to 2.2, and someone will look into this soon.

#2 @jmdodd
6 years ago

  • Cc jmdodd@… added

#3 @jmdodd
6 years ago

  • Keywords has-patch needs-testing added

Solution proposed in #1753, which applies to both group and sitewide forums. Known issue: bbPress Moderation appends (Awaiting moderation) to title and content in the activity stream because it uses global $post. Patch for bbPress Moderation included.

#4 @johnjamesjacoby
6 years ago

Notified the author of bbPress Moderation via email to come check out this awesome patch.

#5 @johnjamesjacoby
6 years ago

  • Keywords dev-feedback added; needs-testing removed
  • Milestone 2.2 deleted

Moving out of 2.2 milestone and switching keywords around, since it's related to #1915, and the proposed fix is in the bbPress Moderation plugin.

#6 @ianhaycox
6 years ago

I've updated the bbPress Moderation plugin to include the fix above.

New version is 1.3

Thanks to the contributors for finding and supplying the fix.

#7 @kraigg
6 years ago

Thanks so much to everyone involved who found a solution. It's very much appreciated!

I tested the updated plugin on my website, and it works much better. Unmoderated forum topics and replies no longer appear in the activity stream. The only issue is that once a pending forum topic or reply is approved by an administrator, they don't appear in the activity stream either.

Is there a flag that can be set for items in the activity stream, where unapproved topics and replies have flag=0, and once approved the flag=1? Then do a query to display all the activities that are either topic or reply and have flag=1?

#8 @jmdodd
6 years ago

The patch for #1753 deals with keeping the activity stream synced with topic and reply changes (including publishing).

#9 @kraigg
6 years ago

That's excellent, certainly good news, thank you jmdodd!

#10 @netweb
5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Closing as 'invalid' as this appears fixed in the 'bbPress Moderation' plugin.

Note: See TracTickets for help on using tickets.