Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 9,251 through 9,275 (of 69,127 total)
  • Author
    Search Results
  • #259156
    Venutius
    Moderator

    That’s strange, I use invite anyone on a number of sites so I can confirm it works.

    Have you tried deactivating all plugins except Buddypress and Invite Anyone to see if that works?

    If it does, it’s a case of activating the other plugins one by one until you discover which one is causing the conflict.

    IF you are getting the 500 error you may not be able to get to the Dashboard to deactivate plugins, that being the case you should FTP to the wp-content/plugins directory and you can delete the other plugins from there in order to get your site back.

    #259149

    In reply to: [Resolved] Child Theme

    metalhead
    Participant

    I did what you said and it’s working now. Thank you very much!

    It’s confusing as to why the new sub-folders differ so much from the originals. (In the child theme, we don’t have bp-templates, for example.)

    Is the child theme only good for Buddypress editing?

    Or can I use it to edit another plugin as well?

    If I can use it to edit other plugins, could you give me an example of how I will create that path?

    #259148
    Henry Wright
    Moderator

    Check out this article:

    Open Sourcing BuddyPress.org

    #259141
    danbp
    Participant

    Hi @bastianernst

    guess you made some mistake while activating BuddyPress and using your theme. Probably you have also some other plugins in use ?

    So, aside from reading absolutely throuhg the install BP documentation, i strongly recommand that you check the site fonctionnalities by using only:

    WP+BP+Twenty Sixteen theme. No other plugin, no custom code.

    If you allowed registration, you have a login widget (the one coming with WP) you can activate in the sidebar. Do this for testing the password change (click on lost password ?) once active.

    Also on the basic install, you should have all BP menus in the usermenu (top right corner) and on a user profile.

    Once anything ok on this install, upload BP Default Data plugin and activate it. This will add fake datas in all parts of BP, so you have content everywhere that let you test completely the site.

    Go through and see how it works.

    If all seems ok, you can then activate the final theme. Simply remind that BP pages should be empty, without any content or template model.
    Don’t forget to set up pretty permalinks (whatever but by default) and with a little luck, you’ll be on the right path.

    #259134

    In reply to: [Resolved] Child Theme

    danbp
    Participant

    Hi,

    it’s wrong !

    1) You add only copies of the files you want to modify. The original templates are in
    wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/

    2) the path in a child should respect the original directories, like this
    wp-content/themes/graphene-child-theme/buddypress/members/register.php

    simon1970
    Participant

    Hi,

    Thanks for all your help. I still can’t get that method to work but I have found what I believe is a better (or at least an alternative) way to do this, using the bp-templates system. The bp-templates system was the method I had previously been trying to use but for some reason I couldn’t get it to work. It turns out I was using the wrong path for the templates in my child theme. The following article set me straight:

    https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/

    The above article explains the correct path for the templates. The mistake I made was to include bp-templates\bp-legacy followed by \buddypress in the path in my child theme. I should not have included the bp-templates\bp-legacy part of the path and just started with buddypress instead. I hope that makes sense.

    Now I can make all my changes to the template files instead, and these changes won’t be affected by any updates.

    Thanks again,

    Simon

    #259125

    In reply to: [Resolved] Child Theme

    metalhead
    Participant

    Thanks! Now, to be certain, let me ask you this:

    This is the original path to the original register.php:
    public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/register.php

    This is the new path that I created by adding new folders:

    public_html/wp-content/themes/graphene-child-theme/buddypress/bp-templates/bp-legacy/buddypress/members/register.php

    Please notice that I did NOT create a folder called “plugins,” during this process. Is this correct?

    If not, let me know where I goofed. But if I am correct, and there will be no folder called “plugins,” with regard to the child theme, then let me ask this last question:

    I will MAKE CHANGES TO the child theme’s register.php, and I will stop caring about what happens with the ORIGINAL register.php. Is this correct?

    Thanks for your patience with me. I appreciate very much!

    ckchaudhary
    Participant

    Hi,
    Buddypress doesn’t ship with reduxframework files. You are probably using a premium theme. I suggest you deactivate all plugins except buddypress, activate twentysixteen theme and then test. This will rule out any theme conflicts. If it works with default theme, you’d know the issue lies somewhere in your theme.

    simon1970
    Participant

    Hi,

    For some reason all the above methods don’t work for me. I even tried uninstalling and re-installing PoEdit but no joy. Below is the .mo file that was automatically created using the above method. Note the translations are there but it all looks a bit messed up with nonsense at the start. Is this what an .mo file should look like?

    Þ• L|¨x©’”qµŒ’h´Ÿw½þ5þ4‚3‚¶Registering for this site is easy. Just fill in the fields below, and we’ll get a new account set up for you in no time.Thanks for registering!

    To complete the activation of your account, go to the following link: {{{activate.url}}}Thanks for registering!

    To complete the activation of your account, go to the following link: {{{activate.url}}}Your account was activated successfully! You can now log in with the username and password you provided when you signed up.Your account was activated successfully! Your account details have been sent to you in a separate email.Project-Id-Version: BuddyPress 2.6.2
    Report-Msgid-Bugs-To: https://buddypress.trac.wordpress.org
    POT-Creation-Date: 2016-09-26 13:45-0700
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    PO-Revision-Date: 2016-09-26 13:49-0700
    Language-Team: ENGLISH <jjj@buddypress.org>
    X-Generator: Poedit 1.8.9
    Last-Translator:
    Plural-Forms: nplurals=2; plural=(n != 1);
    Language: en_GB
    Registering for this site is easy! Just fill in the fields below and we’ll get a new account set up for you in no time!Thank you for registering with Skewen Angling Club!

    To continue, please verify your email address via the email we have just ”
    “sent to you.</br></br></br></br></br></br></br></br></br></br></br></br></”
    “br></br></br></br></br></br></br></br></br></br>Thank you for registering with Skewen Angling Club!

    To continue, please verify your email address via the email we have just ”
    “sent to you.</br></br></br></br></br></br></br></br></br></br></br></br></”
    “br></br></br></br></br></br></br></br></br></br>Thanks for verifying your email address! Once your account has been approved we will notify you via email with your login details.Thanks for verifying your email address! Once your account has been approved we will notify you via email with your login details.

    Thanks,

    Simon

    danbp
    Participant

    hi Henry @henrywright,

    wp-content/languages/plugins/buddypress-en_GB.mo

    this path is the one used by GlotPress’s official automated translation updates for BP (and any other plugin translation if it exist). Same behave for the languages/themes/ directory.

    If you add a customized po/mo there, it will be overwritten at next update !

    Since i18n new improvements in WP 4.6, the only way to keep the integrity of a custom translation actually, so far i know, is to use this plugin: wpt-custom-mo-file, who allows you to override and use your own translation files for any WordPress themes or plugins.

    Just to let you know. 🙂

    Henry Wright
    Moderator

    You can open the .po file in Poedit and then do your editing. No need for Dreamweaver.

    Your .po and .mo files should be named based on your locale. So as an example, mine are:

    wp-content/languages/plugins/buddypress-en_GB.po
    wp-content/languages/plugins/buddypress-en_GB.mo

    EDIT: Do not use these paths; instead, see @danbps update below.

    #259107

    In reply to: [Resolved] Child Theme

    Venutius
    Moderator

    The answer is yes and yes!

    Yes a BP theme is a WP theme that has been optimised for BP.

    And yes, if you create a child theme and copy the PHP file into wp-content/mychildtheme/buddypress/etc the file will be protected from bp updated.

    simon1970
    Participant

    Hi,

    Thanks for this info. I’m not sure what I am doing wrong but when I follow the instructions step-by-step in the article, nothing changes. The default “You have successfully created your account!” message appears after registration. I edited the .po file in DreamWeaver then (I believe) I created a .mo file using PoEdit and uploaded the two files to wp-content/languages/plugins but nothing changes. I say “I believe” because this is the only part I’m not 100% on. All I did was open the .po file in PoEdit and save it again. When I checked the folder there was a .mo file present, so I assumed it had worked, but perhaps it had not worked? I opened the .mo file in DreamWeaver and checked its contents. Here are the contents:

    Þ• $,8É9Project-Id-Version: BuddyPress 2.6.2
    Report-Msgid-Bugs-To: https://buddypress.trac.wordpress.org
    POT-Creation-Date: 2016-08-04 22:00:54+00:00
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit
    PO-Revision-Date: 2016-09-25 16:51-0700
    Last-Translator: JOHN JAMES JACOBY <jjj@buddypress.org>
    Language-Team: ENGLISH <jjj@buddypress.org>
    X-Generator: Poedit 1.8.8
    Plural-Forms: nplurals=2; plural=(n != 1);
    Language: en_US

    Is this correct or have I done something wrong?

    Thanks,

    Simon

    Henry Wright
    Moderator

    You can create a language file. Check out this article:

    Customizing Labels, Messages, and URLs

    #259092
    shanebp
    Moderator

    That is part of BP – usually here: yoursite.com/activity/

    You may need to go to wp-admin > Settings > BuddyPress > Pages and assign a page to ‘Activity Streams’.
    If you don’t have a Page with the slug ‘activity’, create one and leave it blank.

    #259086

    In reply to: Lost search function

    shanebp
    Moderator

    It’s not in members-loop.php.
    It’s in this file:
    buddypress\bp-templates\bp-legacy\buddypress\members\index.php

    #259080
    danbp
    Participant

    @venutius,

    that trick stopped to work since BP 2.6
    The new syntax to use from now on is given here:

    Navigation API

    #259079
    Venutius
    Moderator

    I also found this:

    Add or remove buddypress tabs

    #259076
    Venutius
    Moderator
    #259075
    Venutius
    Moderator

    I’m not an expert but I think that would involve doing a template overload of the user profile php files and editing the files in the members/single section.

    Theme Compatibility & Template Files

    Sorry I can’t be more specific

    #259074
    BillRox
    Participant

    Thanks Venutius,

    Yes, the icons are from the Kleo theme and replace the links from Buddypress. I want to remove those sections.

    Here are the default links in BP.

    Links

    I want to remove some of those.

    #259073
    Venutius
    Moderator

    THose icons don’t come with Buddypress, they may be something from your theme?

    danbp
    Participant

    For 1), it’s no easy to do, if even it is doable ! Activities have already a filter for posts, but nothing for post categories. Main reason is given in this 6 years old topic – but technically still available i think:
    https://buddypress.org/support/topic/highlight-specific-post-categories-in-the-activity-stream/#post-72043

    More recently, slightly different, but just in case of.

    Filtering Activity Loops

    #259059
    danbp
    Participant

    Hi,

    user metas are part of wordpress and stored in wp_usermeta table
    xprofile datas are part of BuddyPress and stored in 4 different tables wp_bp_xprofile_ > data, meta, fields, groups

    BuddyPress Database Diagram


    https://codex.wordpress.org/Database_Description

    bikerwp000
    Participant
    <?php
    /**
     * Plugin Name:       BP Loop Filters
     * Plugin URI:        https://codex.buddypress.org/add-custom-filters-to-loops-and-enjoy-them-within-your-plugin
     * Description:       Plugin example to illustrate loop filters
     * Version:           1.0
     * Author:            imath
     * Author URI:        http://imathi.eu
     * License:           GPL-2.0+
     * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     */
    
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    class BP_Loop_Filters {
    
    	/**
    	 * Constructor
    	 */
    	public function __construct() {
    		$this->setup_actions();
    		$this->setup_filters();
    	}
    
    	/**
    	 * Actions
    	 *
    	 * @uses bp_is_active()
    	 * @uses is_multisite()
    	 */
    	private function setup_actions() {
    		/**
    		 * Adds the random order to the select boxes of the Members, Groups and Blogs directory pages
    		 */
    		// Members component is core, so it will be available
    		add_action( 'bp_members_directory_order_options', array( $this, 'random_order' ) );
    
    		// You need to check Groups component is available
    		if ( bp_is_active( 'groups' ) ) {
    			add_action( 'bp_groups_directory_order_options',  array( $this, 'random_order' ) );
    		}
    
    		// You need to check WordPress config and that Blogs Component is available
    		if ( is_multisite() && bp_is_active( 'blogs' ) ) {
    			add_action( 'bp_blogs_directory_order_options',   array( $this, 'random_order' ) );
    		}
    
    		/**
    		 * Registers the Activity actions so that they are available in the Activity Administration Screen
    		 */
    		// You need to check Activity component is available
    		if ( bp_is_active( 'activity' ) ) {
    
    			add_action( 'bp_register_activity_actions', array( $this, 'register_activity_actions' ) );
    
    			// Adds a new filter into the select boxes of the Activity directory page,
    			// of group and member single items activity screens
    			add_action( 'bp_activity_filter_options',        array( $this, 'display_activity_actions' ) );
    			add_action( 'bp_member_activity_filter_options', array( $this, 'display_activity_actions' ) );
    
    			// You need to check Groups component is available
    			if ( bp_is_active( 'groups' ) ) {
    				add_action( 'bp_group_activity_filter_options', array( $this, 'display_activity_actions' ) );
    			}
    
    	        // You're going to output the favorite count after action buttons
    			add_action( 'bp_activity_entry_meta', array( $this, 'display_favorite_count' ) );
    		}
    
    	}
    
    	/**
    	 * Displays a new option in the Members/Groups & Blogs directories
    	 *
    	 * @return string html output
    	 */
    	public function random_order() {
    		?>
    		<option value="random"><?php _e( 'Random', 'buddypress' ); ?></option>
    		<?php
    	}
    
    	/**
    	 * Registering the Activity actions for your component
    	 *
    	 * The registered actions will also be available in Administration
    	 * screens
    	 *
    	 * @uses bp_activity_set_action()
    	 * @uses is_admin()
    	 */
    	public function register_activity_actions() {
    		/* arguments are :
    		- 'component_id', 'component_action_type' to use in {$wpdb->prefix}bp_activity database
    		- and 'caption' to display in the select boxes */
    		bp_activity_set_action( 'bp_plugin', 'bpplugin_action', __( 'BP Plugin Action' ) );
    
    		/* Activity Administration screen does not use bp_ajax_querystring
    		Moreover This action type is reordering instead of filtering so you will only
    		use it on front end */
    		if ( ! is_admin() ) {
    			bp_activity_set_action( 'bp_plugin', 'activity_mostfavs', __( 'Most Favorited' ) );
    		}
    	}
    
    	/**
    	 * Building an array to loop in from our display function
    	 *
    	 * Using bp_activity_get_types() will list all registered activity actions
    	 * but you need to get the ones for your plugin, and this particular function
    	 * directly returns an array of key => value. As you need to filter activity
    	 * with your component id, the global buddypress()->activity->actions will be
    	 * more helpful.
    	 *
    	 * @uses buddypress()
    	 * @return array the list of your plugin actions.
    	 */
    	private function list_actions() {
    
    		$bp_activity_actions = buddypress()->activity->actions;
    
    		$bp_plugin_actions = array();
    
    		if ( !empty( $bp_activity_actions->bp_plugin ) ) {
    			$bp_plugin_actions = array_values( (array) $bp_activity_actions->bp_plugin );
    		}
    
    		return $bp_plugin_actions;
    	}
    
    	/**
    	 * Displays new actions into the Activity select boxes
    	 * to filter activities
    	 * - Activity Directory
    	 * - Single Group and Member activity screens
    	 *
    	 * @return string html output
    	 */
    	public function display_activity_actions() {
    		$bp_plugin_actions = $this->list_actions();
    
    		if ( empty( $bp_plugin_actions ) ) {
    			return;
    		}
    
    		foreach ( $bp_plugin_actions as $type ):?>
    			<option value="<?php echo esc_attr( $type['key'] );?>"><?php echo esc_attr( $type['value'] ); ?></option>
    		<?php endforeach;
    	}
    
    	/**
    	 * Displays a mention to inform about the number of time the activity
    	 * was favorited.
    	 *
    	 * @global BP_Activity_Template $activities_template
    	 * @return string html output
    	 */
    	public function display_favorite_count() {
    		global $activities_template;
    
    		// BuddyPress < 2.0 or filtering bp_use_legacy_activity_query
    		if ( ! empty( $activities_template->activity->favorite_count ) ) {
    			$fav_count = $activities_template->activity->favorite_count;
    		} else {
    			// This meta should already have been cached by BuddyPress :)
    			$fav_count = (int) bp_activity_get_meta( bp_get_activity_id(), 'favorite_count' );
    		}
    
    		if ( ! empty( $fav_count ) ): ?>
    			<a name="favorite-<?php bp_activity_id();?>" class="button bp-primary-action">Favorited <span><?php printf( _n( 'once', '%s times', $fav_count ), $fav_count );?></span></a>
    		<?php endif;
    	}
    
    	/**
    	 * Filters
    	 */
    	private function setup_filters() {
    		add_filter( 'bp_ajax_querystring',              array( $this, 'activity_querystring_filter' ), 12, 2 );
    		add_filter( 'bp_activity_get_user_join_filter', array( $this, 'order_by_most_favorited' ),     10, 6 );
    		add_filter( 'bp_activity_paged_activities_sql', array( $this, 'order_by_most_favorited'),      10, 2 );
    
    		// Maybe Fool Heartbeat Activities!
    		add_filter( 'bp_before_activity_latest_args_parse_args', array( $this, 'maybe_fool_heartbeat' ), 10, 1 );
    	}
    
    	/**
    	 * Builds an Activity Meta Query to retrieve the favorited activities
    	 *
    	 * @param  string $query_string the front end arguments for the Activity loop
    	 * @param  string $object       the Component object
    	 * @uses   wp_parse_args()
    	 * @uses   bp_displayed_user_id()
    	 * @return array()|string $query_string new arguments or same if not needed
    	 */
    	public function activity_querystring_filter( $query_string = '', $object = '' ) {
    		if ( $object != 'activity' ) {
    			return $query_string;
    		}
    
    		// You can easily manipulate the query string
    		// by transforming it into an array and merging
    		// arguments with these default ones
    		$args = wp_parse_args( $query_string, array(
    			'action'  => false,
    			'type'    => false,
    			'user_id' => false,
    			'page'    => 1
    		) );
    
    		/* most favorited */
    		if ( $args['action'] == 'activity_mostfavs' ) {
    			unset( $args['action'], $args['type'] );
    
    			// on user's profile, shows the most favorited activities for displayed user
    			if( bp_is_user() ) {
    				$args['user_id'] = bp_displayed_user_id();
    			}
    
    			// An activity meta query :)
    			$args['meta_query'] = array(
    				array(
    					/* this is the meta_key you want to filter on */
    					'key'     => 'favorite_count',
    					/* You need to get all values that are >= to 1 */
    					'value'   => 1,
    					'type'    => 'numeric',
    					'compare' => '>='
    				),
    			);
    
    			$query_string = empty( $args ) ? $query_string : $args;
            }
    
            return apply_filters( 'bp_plugin_activity_querystring_filter', $query_string, $object );
    	}
    
    	/**
    	 * Ninja Warrior trick to reorder the Activity Loop
    	 * regarding the activities favorite count
    	 *
    	 * @param  string $sql        the sql query that will be run
    	 * @param  string $select_sql the select part of the query
    	 * @param  string $from_sql   the from part of the query
    	 * @param  string $where_sql  the where part of the query
    	 * @param  string $sort       the sort order (leaving it to DESC will be helpful!)
    	 * @param  string $pag_sql    the offset part of the query
    	 * @return string $sql        the current or edited query
    	 */
    	public function order_by_most_favorited( $sql = '', $select_sql = '', $from_sql = '', $where_sql = '', $sort = '', $pag_sql = '' ) {
    		if ( apply_filters( 'bp_use_legacy_activity_query', false ) ) {
    			preg_match( '/\'favorite_count\' AND CAST\((.*) AS/', $where_sql, $match );
    
    			if ( ! empty( $match[1] ) ) {
    				$new_order_by = 'ORDER BY '. $match[1] .' + 0';
    				$new_select_sql = $select_sql . ', '. $match[1] .' AS favorite_count';
    
    				$sql = str_replace(
    					array( $select_sql, 'ORDER BY a.date_recorded' ),
    					array( $new_select_sql, $new_order_by ),
    					$sql
    				);
    			}
    
    		// $select_sql is carrying the requested argument since BuddyPress 2.0.0
    		} else {
    			$r = $select_sql;
    
    			if ( empty( $r['meta_query'] ) || ! is_array( $r['meta_query'] ) ) {
    				return $sql;
    			} else {
    				$meta_query_keys = wp_list_pluck( $r['meta_query'], 'key' );
    
    				if ( ! in_array( 'favorite_count', $meta_query_keys ) ) {
    					return $sql;
    				}
    
    				preg_match( '/\'favorite_count\' AND CAST\((.*) AS/', $sql, $match );
    
    				if ( ! empty( $match[1] ) ) {
    					$sql = str_replace( 'ORDER BY a.date_recorded', 'ORDER BY '. $match[1] .' + 0', $sql );
    				}
    			}
    		}
    
    		return $sql;
    	}
    
    	/**
    	 * Cannot pass the favorite data for now so just fool heartbeat activities
    	 */
    	public function maybe_fool_heartbeat( $r = array() ) {
    		if ( empty( $r['meta_query'] ) ) {
    			return $r;
    		}
    
    		$meta_query_keys = wp_list_pluck( $r['meta_query'], 'key' );
    
    		if ( ! in_array( 'favorite_count', $meta_query_keys ) ) {
    			return $r;
    		} else {
    			$r['since'] = '3000-12-31 00:00:00';
    		}
    
    		return $r;
    	}
    }
    
    // 1, 2, 3 go !
    function bp_loop_filters() {
    	return new BP_Loop_Filters();
    }
    
    add_action( 'bp_include', 'bp_loop_filters' );
    
    
Viewing 25 results - 9,251 through 9,275 (of 69,127 total)
Skip to toolbar