Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,026 through 1,050 (of 3,787 total)
  • @danbp

    Participant

    You’re welcome! Is snippet working for you ?

    @danbp

    Participant

    Hi,

    here a script to load an xprofile country list
    and here an autoload JS script

    And here some instructions for enqueuing a JS to login/register page.

    Happy coding !

    @danbp

    Participant

    not_friends are in fact members. Are you sure you want to built this, as such widget already exist ! Ok, has no Add Friend button…

    BuddyPress Widgets

    Another solution would be to use a shortcode who will fire a kind of Members widget and the add friend button. Huh ? 🙂

    Add this snippet to bp-custom.php

    function show_our_members( $atts ) {
    $user_id = bp_displayed_user_id();  
    
    /**
     * Options
     * type:active, newest, popular, online, alphabetical, random)
     * number:number of items
     * size:size of avatar in px
    */
    
    	$atts = shortcode_atts( array(
    		'type' => 'newest',
    		'number' => '10',		
    		'size' => '30'
    	), $atts, 'ourmembers' );
     
    if ( bp_has_members( 'type='.$atts['type'].'&max='.$atts['number'] ) ) :    
    
    	while ( bp_members() ) : bp_the_member(); ?>  
    
    		<ul><li class="vcard">
    			<div class="item-avatar">
    				<a>"><?php bp_member_avatar(); ?></a>
    			</div>
    
    			<div class="item">
    				<div class="item-title fn"><a>" title="<?php bp_member_name(); ?>"><?php bp_member_name(); ?></a></div>				
    				<div class="item-meta"><?php bp_add_friend_button( $user_id ); ?></div>			
    			</div>
    		</li></ul>
    <?php    
    endwhile;
    endif;
    }
    add_shortcode( 'ourmembers', 'show_our_members' );

    The shortcode to use (in post, pages, widgets…), eg. [ourmembers size=20 type=newest number=8]

    The only thing you have to do, is to style it accordingly to your theme layout.
    Note that the classes are those used in BP’s Members widget. You can use them or add your own.

    @danbp

    Participant

    I finally asked Boone for help.

    bbp_buddypress_loaded fires before everything is, in fact, fully loaded. bbPress’s component-specific extensions aren’t loaded until bp_init:7 (ty @boonebgorges for this explanation).

    Changing add_action to bp_init with a priority of 8 did the job !

    This may work for Site Activities, Members and Group activities

    function bpfr_remove_activity_dropdown_label() {
       // Remove forum filters in site wide activity streams
       remove_action( 'bp_activity_filter_options',        array( bbpress()->extend->buddypress->activity , 'activity_filter_options'   ), 10    );
    
       // Remove forum filters in single member activity streams
       remove_action( 'bp_member_activity_filter_options', array( bbpress()->extend->buddypress->activity , 'activity_filter_options'   ), 10   ); 
    
       // Remove forum filters in single group activity streams
       remove_action( 'bp_group_activity_filter_options',  array( bbpress()->extend->buddypress->activity , 'activity_filter_options'   ), 10   );
    }
    add_action( 'bp_init', 'bpfr_remove_activity_dropdown_label', 8 );

    Works also by using bp_actions hook.

    @danbp

    Participant

    @danbp

    Participant

    You should READ the error msg when you see one ! The plugin who generated the error is mentionned in it…
    The support forum is here: https://fr.wordpress.org/plugins/bp-xprofile-wp-user-sync/

    @danbp

    Participant

    @danbp

    Participant

    Since 2.1, the option dropdown is no more hardcoded in the template but is generated dynamically.

    I’m unable actually to tell you how to modify this new behave. (The old method is explained on the codex and in many topics here).

    On Codex, if you have a serious php level (it’s not exactly my case), it’s explained how to add a new option. I guess there is a way to do the inverse, but i read a lot and tried many things, but didn’t find any working solution.

    Meanwhile, i opened a topic on bbPress forum.

    I tried this after asking @imath but it doesn’t work (i use bbp 2.6 alpha on my test site)

    function remove_activity_filters( $bbp_buddypress = null ) {
    	 if ( bp_is_active( 'activity' ) && bp_is_activity_component() ) {
    		 // Remove forum filters in site wide activity streams
    		 remove_action( 'bp_activity_filter_options',        array( bbpress()->extend->buddypress->activity, 'activity_filter_options'   ), 10    );
    	}
    }
    add_action( 'bbp_buddypress_loaded', 'remove_activity_filters' );
    

    In case of one of you have an idea: @shanebp, @henrywright, @r-a-y, @djpaul ?
    Merci beaucoup !

    In reply to: New Navigation API

    @danbp

    Participant

    For the moment, it will continue to work (more or less)

    Have you read this on 2.6 About page?
    https://buddypress.trac.wordpress.org/changeset/10745

    …& as example, check comments in this file:
    https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/bp-core-buddybar.php?rev=10745

    @danbp

    Participant

    @slaffik, @djpaul,

    had the same surprise this morning, and had to re-import too.

    @danbp

    Participant

    Добрый день @valery-kondakoff,

    no it’s not a regression ! Just a question of delay after BP’s update. Translations are made by volonteers, which are humans, not programmed machines. You have to wait that the translation is completed.

    Or you can download the trunk version, which is already completed to 100%.
    https://translate.wordpress.org/projects/wp-plugins/buddypress/dev/ru/default

    At the page bottom you have a download button and a file type selector. Select po and mo format and rename both files to buddypress-ru_RU

    @danbp

    Participant

    Any thoughts @djpaul, @imath ?

    @danbp

    Participant

    Sorry, i can’t help you for this, but i can advice you about this codex page containing some information about lighttpd. Don’t miss to read chapter 8. 😉

    @danbp

    Participant

    BuddyPress share the DB with WordPress (the wp where it is activated).

    An association between Polylang and Lingotek could be a good compromise.

    If you really want 3 WP, it’s possible for them to use one DB.

    Read also the documentation about installing BuddyPress on multisite.

    @danbp

    Participant

    did you activated profile syncing in BP settings ? For the rest, same answer as here:

    Members are not showing up. HELP PLEASE!!

    @danbp

    Participant

    Have you properly set up permalinks ? Choose any option, except “default”, save and give a try.

    @danbp

    Participant

    Hi,

    read documentation about xprofile, which is the place to go for what you want to do.

    User Extended Profiles

    @danbp

    Participant

    Many topics about this question are already on the forum. You can also read here to get an idea.

    In reply to: Avatar URL

    @danbp

    Participant

    Since WP 4.2, you can use get_avatar_url. More on this discussion.

    Perhaps this may work too: bp_loggedin_user_avatar( 'html=false' );

    In reply to: Lock comments button

    @danbp

    Participant

    @danbp

    Participant

    > I want to set up an activity stream page which will be the only public interface to a group

    Each group has is own activity stream.

    Activity Streams

    > I want people to be able to post updates to that group from the activity stream

    Each group member has access to the group update. (what’s new form)

    That’s default behave for any group / group member !

    I don’t really understand your question. Do you mean perhaps the site activity page ?

    – How many groups do you have ?
    – Can members access to only one group or have they the ability to subscribe to more ?

    @danbp

    Participant

    How do I do this?

    You have to bake 5 894 pizza and search the forum ! Or experiment the following…

    First you remove the counter. This can be done by using the language file.
    Original string is Friends <span class="%s">%s</span> to replace by eg. Friends

    or using this function (add to bp-custom.php)

    function bpfr_remove_friends_count( $translated, $original_text, $domain ) {
    		
    	if ( 'buddypress' !== $domain )  
    	return $translated; 
    	
    	switch ( $original_text ) {
    		
    		case 'Friends <span class="%s">%s</span>':
    		return 'Friends';
    		
    		default:
    		return $translated;
    	}
    }
    add_filter( 'gettext', 'bpfr_remove_friends_count', 10, 3 );

    The Friends subnav has only two elements: friendships and request.
    Friendships is the default one and can’t be removed. So we have to hide it with css. Add this to your child-theme style.css

    #friends-my-friends-personal-li {display:none;}

    This is default css, and you have to check it as it can vary depending your theme.

    Finally add a new subnav item with counter in replaciement of the one you’ve just hiden (add to bp-custom.php).

    function bpfr_custom_profile_sub_nav() {
    global $bp;
    
    	if( bp_is_active( 'friends' ) )
    
    	$count    = friends_get_total_friend_count();
    	$class    = ( 0 === $count ) ? 'no-count' : 'count';
    	
    	//Add subnav item 	 
    	bp_core_new_subnav_item( array(
    		'name' => sprintf( __( 'Friendships <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) ),			
    		'slug'            => 'friends',
    		'parent_url'      => $bp->loggedin_user->domain,
    		'parent_slug'     => $bp->friends->slug,
    		'screen_function' => 'friends_screen_my_friends',
    		'position' => 10
    		)
    	);	
    }
    add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' ); 

    @danbp

    Participant

    Sorry, my fault! I haven’t realised you mentioned /messages/compose.php

    The snippet is intended to work on the what’s new form, not the compose message form.

    To do this, we need the correct textarea name and another editor_id. Use this function:

    function bpfr_compose_msg_tiny_editor() {
    
    $content = "";
    	
    	if ( isset( $_GET['r'] ) ) :
    	$content = esc_textarea( $_GET['r'] ); 
    	endif;
    
    	$editor_settings = array(
    		'content' => bp_messages_content_value(),
    		'textarea_name' => 'content',
    		'editor_id' => 'message_content',
    		'teeny'=>true,
    		'media_buttons'=>false
    	);
    	wp_editor( bp_messages_content_value(), "message_content", $editor_settings); 
    }
    add_action( 'compose_edit_tools', 'bpfr_compose_msg_tiny_editor' );

    In compose.php, remove line 38
    <textarea name="content" id="message_content" rows="15" cols="40"><?php bp_messages_content_value(); ?></textarea>

    and replace it by

    <?php do_action( 'compose_edit_tools' ); ?>

    Visual and Text tab may be unecessary. You can hide them by adding this to your theme style.css:
    #wp-message_content-editor-tools {display:none!important;}

    To get the edit tools on the reponse editor, same trick, replace the textarea line 123 in /messages/single.php with the above action hook.

    @danbp

    Participant

    Did you cheched the field settings ?

    User Extended Profiles

    @danbp

    Participant

    Hey, it’s monday ! Site url ? Theme name ? Give details please.

    See also the codex, as there is plenty of documentation about how BuddyPress can be setup and used.

    User Extended Profiles

Viewing 25 replies - 1,026 through 1,050 (of 3,787 total)
Skip to toolbar