Index: src/bp-templates/bp-legacy/buddypress-functions.php =================================================================== --- src/bp-templates/bp-legacy/buddypress-functions.php +++ src/bp-templates/bp-legacy/buddypress-functions.php @@ -1417,20 +1417,27 @@ if ( !empty( $result ) ) { - // Get the zebra line classes correct on ajax requests + // pretend we're in the message loop global $thread_template; bp_thread_has_messages( array( 'thread_id' => (int) $_REQUEST['thread_id'] ) ); + // set the current message to the 2nd last + $thread_template->message = end( $thread_template->thread->messages ); + $thread_template->message = prev( $thread_template->thread->messages ); + + // set current message to current key + $thread_template->current_message = key( $thread_template->thread->messages ); + + // now manually iterate message like we're in the loop bp_thread_the_message(); - if ( $thread_template->message_count % 2 == 1 ) { - $class = 'odd'; - } else { - $class = 'even alt'; - } ?> + // manually call oEmbed + // this is needed because we're not at the beginning of the loop + bp_messages_embed() + ?> -