BuddyBoss Home – Web › Support Forums › General › BuddyPress (general issues) › Global search activity results missing wall elements
- This topic has 8 replies, 2 contibutors, and was last updated 8 years, 10 months ago by Ted.
Question
October 24, 2015 at 4:23 pm #49474@surfbuddyHi all, The buddyboss global search plugin activity results is missing wall elements and comments. How can I have them display? Thanks
Answers
October 30, 2015 at 9:08 am #50157@
AnonymousHi @surfbuddy, Global search includes the Activity and only activity_update
Regards
October 30, 2015 at 10:56 am #50177@surfbuddyYep, thanks. It’s returning the activity results, but in the example above, it’s missing the wall elements (like and comment buttons). How can I add those buttons to be included in the activity results page?
November 1, 2015 at 8:55 am #50326@
AnonymousHi @surfbuddy
It need to modify the Global Search plugin, you can get it inside
~/buddypress-global-search/buddypress-global-search.php
Regards
Varun DubeyNovember 24, 2015 at 11:55 am #52617@surfbuddyI looked at the file and still not sure what to add and where. How can I add the missing activity-meta (like and comment buttons, etc.) and where?
December 1, 2015 at 11:26 am #53330@surfbuddybump
December 14, 2015 at 1:06 am #54363@
AnonymousHi @surfbuddy
I have modified /buddypress-global-search/templates/loop/activity.php<li class="bboss_search_item bboss_search_item_activity"> <div class="activity-avatar"> <a href="<?php bp_activity_user_link(); ?>"> <?php bp_activity_avatar(); ?> </a> </div> <div class="activity-content"> <div class="activity-header"> <?php bp_activity_action(); ?> </div> <?php if ( bp_activity_has_content() ) : ?> <div class="activity-inner"> <?php bp_activity_content_body(); ?> </div> <?php endif; ?> <?php /** * Fires after the display of an activity entry content. * * @since 1.2.0 */ do_action( 'bp_activity_entry_content' ); ?> <div class="activity-meta"> <?php if ( bp_get_activity_type() == 'activity_comment' ) : ?> <a href="<?php bp_activity_thread_permalink(); ?>" class="button view bp-secondary-action" title="<?php esc_attr_e( 'View Conversation', 'buddypress' ); ?>"><?php _e( 'View Conversation', 'buddypress' ); ?></a> <?php endif; ?> <?php if ( is_user_logged_in() ) : ?> <?php if ( bp_activity_can_comment() ) : ?> <a href="<?php bp_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment %s', 'buddypress' ), '<span>' . bp_activity_get_comment_count() . '</span>' ); ?></a> <?php endif; ?> <?php if ( bp_activity_can_favorite() ) : ?> <?php if ( !bp_get_activity_is_favorite() ) : ?> <a href="<?php bp_activity_favorite_link(); ?>" class="button fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'buddypress' ); ?>"><?php _e( 'Favorite', 'buddypress' ); ?></a> <?php else : ?> <a href="<?php bp_activity_unfavorite_link(); ?>" class="button unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'buddypress' ); ?>"><?php _e( 'Remove Favorite', 'buddypress' ); ?></a> <?php endif; ?> <?php endif; ?> <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?> <?php /** * Fires at the end of the activity entry meta data area. * * @since 1.2.0 */ do_action( 'bp_activity_entry_meta' ); ?> <?php endif; ?> </div> </div> <?php /** * Fires before the display of the activity entry comments. * * @since 1.2.0 */ do_action( 'bp_before_activity_entry_comments' ); ?> <?php if ( ( bp_activity_get_comment_count() || bp_activity_can_comment() ) || bp_is_single_activity() ) : ?> <div class="activity-comments"> <?php bp_activity_comments(); ?> <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?> <form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>> <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div> <div class="ac-reply-content"> <div class="ac-textarea"> <label for="ac-input-<?php bp_activity_id(); ?>" class="bp-screen-reader-text"><?php _e( 'Comment', 'buddypress' ); ?></label> <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input bp-suggestions" name="ac_input_<?php bp_activity_id(); ?>"></textarea> </div> <input type="submit" name="ac_form_submit" value="<?php esc_attr_e( 'Post', 'buddypress' ); ?>" /> <a href="#" class="ac-reply-cancel"><?php _e( 'Cancel', 'buddypress' ); ?></a> <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" /> </div> <?php /** * Fires after the activity entry comment form. * * @since 1.5.0 */ do_action( 'bp_activity_entry_comments' ); ?> <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?> </form> <?php endif; ?> </div> <?php endif; ?> <?php /** * Fires after the display of the activity entry comments. * * @since 1.2.0 */ do_action( 'bp_after_activity_entry_comments' ); ?> </li>
Regards
Varun DubeyDecember 14, 2015 at 10:55 am #54401@surfbuddyThanks Varun, I replaced the code in buddypress-global-search/templates/loop/activity.php with yours and it didn’t work. The search results list for ALL and ACTIVITY is still not showing like, comment button, etc. Any ideas?
December 30, 2015 at 1:13 pm #55246@surfbuddyI was able to get this to work and add the wall elements to the search results.
However, since the search results page seem to be a wordpress post page, not a bp page, some of the functionality, styles, and js is not being enqueued.
For example, when clicking like and comment button. Like button reloads the entire page. Clicking The comment button takes user to: sitename.com/members/username/#ac-form-1 instead of opening the comment field.
Any ideas how to fix this? Thank you
- The question ‘Global search activity results missing wall elements’ is closed to new replies.