Search Results for 'buddypress'
-
Search Results
-
My buddypress site is very slow for logged-in users. what i mean by slow is that it take like 10-20s for one user to publish for example a simple picture on his activity timeline. I need help to solve this issue
Topic: WP V 4.7.2
Hello, I’m currently using a plugin to show the activity-stream on my home page. I want that if users place an update it always shows up in the stream. Problem is that if i attach an image, it will not show up. Here is the plugin’s code:
<?php /** * Plugin Name: BuddyPress Activity ShortCode * Description: Embed activity stream in page/post using shortcode * Author: BuddyDev * Plugin URI: https://buddydev.com/plugins/bp-activity-shortcode/ * Author URI: https://buddydev.com/ * Version: 1.0.8 * License: GPL */ // exit if access directly if ( ! defined( 'ABSPATH' ) ) { exit; } class BD_Activity_Stream_Shortcodes_Helper { private static $instance; private function __construct() { $this->register_shortcodes(); } /* * Register ShortCode * * @example [activity-stream display_comments=threaded|none title=somethimg per_page=something] */ private function register_shortcodes() { add_shortcode( 'activity-stream', array( $this, 'generate_activity_stream' ) ); } /** * Get Instance * * @return BD_Activity_Stream_Shortcodes_Helper */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } public function generate_activity_stream( $atts, $content = null ) { //allow to use all those args awesome! $atts = shortcode_atts( array( 'title' => 'Updates van Leden',//title of the section 'pagination' => 1,//show or not 'load_more' => 0, 'display_comments' => 'threaded', 'include' => false, // pass an activity_id or string of IDs comma-separated 'exclude' => false, // pass an activity_id or string of IDs comma-separated 'in' => false, // comma-separated list or array of activity IDs among which to search 'sort' => 'DESC', // sort DESC or ASC 'page' => 1, // which page to load 'per_page' => 6, //how many per page 'max' => false, // max number to return 'count_total' => true, // Scope - pre-built activity filters for a user (friends/groups/favorites/mentions) 'scope' => false, // Filtering 'user_id' => false, // user_id to filter on 'object' => false, // object to filter on e.g. groups, profile, status, friends 'action' => activity_update, // action to filter on e.g. activity_update, new_forum_post, profile_updated 'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc. 'secondary_id' => false, // secondary object ID to filter on e.g. a post_id // Searching 'search_terms' => false, // specify terms to search on 'use_compat' => bp_use_theme_compat_with_current_theme(), 'allow_posting' => false, //experimental, some of the themes may not support it. 'container_class' => 'activity',//default container, 'hide_on_activity' => 1,//hide on user and group activity pages ), $atts ); //hide on user activity, activity directory and group activity if ( $atts['hide_on_activity'] && ( function_exists( 'bp_is_activity_component' ) && bp_is_activity_component() || function_exists( 'bp_is_group_home' ) && bp_is_group_home() ) ) { return ''; } //start buffering ob_start(); ?> <?php if ( $atts['use_compat'] ) : ?> <div id="buddypress"> <?php endif; ?> <?php if ( $atts['title'] ) : ?> <h3 class="activity-shortcode-title"><?php echo $atts['title']; ?></h3><hr color="#000000"> <?php endif; ?> <?php do_action( 'bp_before_activity_loop' ); ?> <?php if ( $atts['allow_posting'] && is_user_logged_in() ) : ?> <?php bp_locate_template( array( 'activity/post-form.php' ), true ); ?> <?php endif; ?> <?php if ( bp_has_activities( $atts ) ) : ?> <div class="<?php echo esc_attr( $atts['container_class'] ); ?> <?php if ( ! $atts['display_comments'] ) : ?> hide-activity-comments<?php endif; ?> shortcode-activity-stream"> <?php if ( empty( $_POST['page'] ) ) : ?> <ul id="activity-stream" class="activity-list item-list"> <?php endif; ?> <?php while ( bp_activities() ) : bp_the_activity(); ?> <?php bp_get_template_part( 'activity/entry' ); ?> <?php endwhile; ?> <?php if ( $atts['load_more'] && bp_activity_has_more_items() ) : ?> <li class="load-more"> <a href="<?php bp_activity_load_more_link() ?>"><?php _e( 'Load More', 'buddypress' ); ?></a> </li> <?php endif; ?> <?php if ( empty( $_POST['page'] ) ) : ?> </ul> <?php endif; ?> <?php if ( $atts['pagination'] && ! $atts['load_more'] ) : ?> <div class="pagination"> <div class="pag-count"><?php bp_activity_pagination_count(); ?></div> <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div> </div> <?php endif; ?> </div> <?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; ?> <?php do_action( 'bp_after_activity_loop' ); ?> <form action="" name="activity-loop-form" id="activity-loop-form" method="post"> <?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?> </form> <?php if ( $atts['use_compat'] ) : ?> </div> <?php endif; ?> <?php $output = ob_get_clean(); return $output; } } BD_Activity_Stream_Shortcodes_Helper::get_instance();Right now my Members page has the slug ‘members’, and when viewing a user’s profile, the URL is:
/members/user/
However, all other components on my site (bbPress forums, custom post types, etc.) use a plural slug for the “archive” and then singular when viewing a child page. I’d like to make the members area of BuddyPress behave the same way for consistency.
So I’d like the Members page to retain the slug /members/
But when viewing a user’s profile, I’d like it to become:
/member/user/
It just makes more sense given how everything else on my site works. I hope this makes sense.
Can anyone lend me a hand?
Thank you!
I’m trying to display user profile fields on a page. I created a custom page template and pasted the code found here: https://codex.buddypress.org/developer/loops-reference/the-profile-fields-loop-bp_has_profile/
It was working and then stopped – can’t figure out what happened.
The problem seems to be with this function: bp_profile_group_has_fields()
Any ideas?
John
I’m trying to edit my user’s profile so that when they click on “Settings” they go to the “Email” (/settings/notifications/) by default. I found https://codex.buddypress.org/developer/navigation-api/ and am trying to apply that to the default_subnav_slug but must be missing something. Any ideas?
add_action( 'bp_setup_nav', 'bp_edit_subnav_default'); function bp_edit_subnav_default($data) { global $bp; $new_data = array( 'screen_function' => 'bp_settings_screen_notifications', 'default_subnav_slug' => 'notifications', ); $bp->members->nav->edit_nav($new_data, 'settings'); }Is there any ways to change just the admin username from being in the Buddypress profile URL? For security reasons it’s not set to admin but something else like “iamadminofsite” but it seems like it kind of defeats the purpose of having an unusual admin username for security reasons if it is plastered all over your site.
Any help being able to accomplish this would be great. (And yes, saw this plugin: https://buddydev.com/plugins/bp-username-changer/ which is nice and all but not what I’m looking for as it will just change the login name and I need the url to show a completely different username at least for the admin).
A site with users amounts more than 100k+
After installing and activating buddypress get the white screen of death.
We use this theme running on hostgator.But when twenty seven theme selected and try activating buddypress turns out to be
“Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes)”We have 512M as memory limit on php.ini
Any suggestions please?