Opened 13 years ago
Closed 12 years ago
#1915 closed defect (bug) (invalid)
Activity stream: Hide 'pending' forum topics and replies
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | major | Version: | 2.1.1 |
Component: | API - Moderation | Keywords: | has-patch dev-feedback |
Cc: | jmdodd@… |
Description
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 (http://wordpress.org/extend/plugins/bbpressmoderation/) 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.
<?php /* = Generate Custom Activity Stream ----------------------------------------------- * Place this function anywhere you want to show your custom stream. * Should accept any of these parameters: * http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/ */ my_activity_stream('per_page=4&page=1&action=new_forum_post,new_blog_comment,new_blog_post,new_forum_topic'); /* = 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> </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' ) ?> </a> </div> <div class="activity-content"> <div class="activity-header"> <?php bp_activity_action() ?> </div> <?php if ( bp_get_activity_content_body() ) : ?> <div class="activity-inner"> <?php bp_activity_content_body() ?> </div> <?php endif; ?> <?php do_action( 'bp_activity_entry_content' ) ?> </div> </li> <?php endwhile; ?> </ul> <?php else : ?> <div id="message" class="info"> <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p> </div> <?php endif; wp_reset_query(); }
}}}
}}}
Attachments (1)
Change History (11)
#3
@
12 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
@
12 years ago
Notified the author of bbPress Moderation via email to come check out this awesome patch.
#5
@
12 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
@
12 years ago
I've updated the bbPress Moderation plugin to include the fix above.
New version is 1.3 http://wordpress.org/extend/plugins/bbpressmoderation/
Thanks to the contributors for finding and supplying the fix.
#7
@
12 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?
Thanks for the report. Moving to 2.2, and someone will look into this soon.