@davelr1
9 years, 9 months ago
The links works just fine for group admins.
Ajax seems a great solution to avoid being redirected to the “manage members” page!
I will check that.
Thank you =)
Hi!
The links appears at loop-single-reply.php I just use the code above to get the kick/ban/unban links.
<?php if ( bp_group_is_mod() || bp_group_is_admin() ): ?> <select onChange="window.location.href=this.value"> <option>- Manage </option> <option value="<?php $user_id = bbp_get_reply_author_id(); bp_group_member_remove_link( $user_id ); ?>"><?php _e( 'Kick', 'InspireBook' ); ?></option> <option value="<?php $user_id = bbp_get_reply_author_id(); bp_group_member_ban_link( $user_id ); ?>"><?php _e( 'Ban', 'InspireBook' ); ?></option> <option value="<?php $user_id = bbp_get_reply_author_id(); bp_group_member_unban_link( $user_id ); ?>"><?php _e( 'Unban', 'InspireBook' ); ?></option> </select> <?php endif; ?>
Thank you for your reply and explanation!