Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 13,276 through 13,300 (of 69,016 total)
  • Author
    Search Results
  • #238012

    In reply to: Where are loops put?

    @mcuk
    Participant

    * bp-legacy>buddypress>activity>index.php (in child theme folder)

    #238010
    danbp
    Participant

    This question is related to bbPress.
    See bbp_title filter in wp-content/plugins/bbpress/includes/common/template.php:2519
    Similar technique is used by BuddyPress.
    See function bp_modify_page_title in bp-core-filsters.php:514

    Here a usage example to uppercase BP titles.

    function bpfr_profiles_wp_title( $title ='', $sep = '', $seplocation = '' ) {
    	if( bp_get_displayed_user_fullname() ) {
    	$bp = buddypress();
    	
    	// Get the component's ID to try and get it's name
    	$component_id = $component_name = bp_current_component();
    	
    	// Use the actual component name
    	if ( !empty( $bp->{$component_id}->name ) ) {
    	$component_name = $bp->{$component_id}->name;
    	
    	// Fall back on the component ID (probably same as current_component)
    } elseif ( !empty( $bp->{$component_id}->id ) ) {
    	$component_name = $bp->{$component_id}->id;
    	}
    	
    	$title = str_replace( ucwords( $component_name ), '', $title );
    	}  
    	return $title;
    	}
    add_filter( 'bp_modify_page_title', 'bpfr_profiles_wp_title', 20, 3 );
    #238008

    In reply to: Where are loops put?

    @mcuk
    Participant

    Hi @danbp,

    Thanks for reply. Yeah i know about those. I meant where would I put custom loops with my own filters etc. The wordpress codex says to put them in index.php. I assume that for Buddypress that would be:

    bp-legacy>buddypress>activity>index.php

    Then call it within bp-custom.php?

    #238007

    In reply to: Where are loops put?

    danbp
    Participant

    Loops are in templates.

    See bp-templates/bp-legacy/buddypress/

    And read carefully template hierarchy to understand how all this is working together.

    #237994
    UrbanFix
    Participant

    The code im using to add a new tab isnt to add one to buddypress,
    If this is what you are after it is done in a different way look at;

    https://buddypress.org/support/topic/how-do-i-add-a-menu-item-on-the-profile-page/

    or subnav

    https://buddypress.org/support/topic/adding-a-subnav-with-new-page-content-to-the-profileactivity-page/

    #237991
    UrbanFix
    Participant

    Sorry I thought I had!

    This is code I have created to add a new tab to a cpt, its on

    <?php add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;
    
    function geodir_detail_page_tab_list_extend($tab_array)
    {
     	$tab_array['my_new_tab'] = array( 
    										'heading_text' =>  __('New Tab',GEODIRECTORY_TEXTDOMAIN),
    										'is_active_tab' => false,
    										'is_display' =>  apply_filters('geodir_detail_page_tab_is_display', true, 'my_new_tab'),
    										'tab_content' => ''
    									);
    	return $tab_array ;
    }
    add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content');
    function geodir_my_new_tab_content($tab_index)
    {
    	if($tab_index =='my_new_tab')
    	{
    		echo "Hello world!!";
    	}
    }
    ?>

    These pages/cpts are created by buddypress users. So, on this new tab i have created i wish to call the activity stream of the author!
    My php knowledge is almost nill so I am really struggling, I didn’t think it was to hard a thing to do!

    #237988

    In reply to: activity

    @mcuk
    Participant

    @arturamirov,

    You need to create a new php file called bp-custom.php . Then post the code @danbp posted above into it.

    See here:

    bp-custom.php

    #237987
    Henry Wright
    Moderator

    Hi @urbanfix

    Here’s the standard loop taken from here.

    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
        <?php while ( bp_activities() ) : bp_the_activity(); ?>
     
            <?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
     
        <?php endwhile; ?>
    <?php endif; ?>

    If you scroll down the page and take a look at filtering options, you’ll see user_id. So your loop will look something like this:

    $post = get_post( get_the_ID() );
    $filter = '&user_id=' . $post->post_author;
    
    if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $filter ) ) :
        while ( bp_activities() ) : bp_the_activity();
            locate_template( array( 'activity/entry.php' ), true, false );
        endwhile;
    endif;

    Note: I haven’t tested.

    Caveat: This must be used within The Loop.

    #237980
    Ben Hansen
    Participant

    sorry i don’t know any plugins or how to hack it but i think that would make a great feature suggestion for core if you can please add it to trac here:

    https://buddypress.trac.wordpress.org

    if not let me know and i’ll add it.

    🙂

    shanebp
    Moderator

    Try using this hook fromfunction groups_delete_group in buddypress\bp-groups\bp-groups-functions.php

    do_action( 'groups_before_delete_group', $group_id );

    #237974
    S. Panda
    Participant

    Thanks for the reply, unfortunately that patch didn’t help. Here’s what I have in wp-content/plugins/bbpress/includes/extend/buddypress/activity.php:

    	// Get the activity stream item, bail if it doesn't exist
    //  ===== BBPRESS BUG WHICH RETURNS DUPLICATE =====
    // ===== bbp_reply_created UPON EDITS                            =====
    //		$existing = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'show_hidden' => true, 'spam' => 'all', ) );
    //		if ( empty( $existing['total'] ) || ( 1 !== (int) $existing['total'] ) )
    // ===== END BUGGY CODE / START PATCH                    =====
    		$existing = new BP_Activity_Activity( $activity_id ); 
     		if ( empty( $existing->component ) )
    // ===== END PATCH                                                           =====
    			return null;
    		$existing = new BP_Activity_Activity( $activity_id ); 
     		if ( empty( $existing->component ) )
    		// Return the activity ID since we've verified the connection
    			return $activity_id;
    	}
    
    #237964

    In reply to: activity

    danbp
    Participant

    Hi,

    to show only notices (aka updates) on the SWA, try this snippet (place in bp-custom.php)

    function make_swa_show_notice_only( $retval ) {	
    	
    	if ( bp_is_page( 'activity' ) ) {
    	$retval['action'] = 'activity_update';					
    	}
    	
    	return $retval;
    	
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'make_swa_show_notice_only' );

    Reference: https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/

    #237963
    danbp
    Participant

    Hi @spanda,

    it’s a bbpress bug who remains since BP 2.0.
    A patch was provided 7 mounth ago but not applied in latest bbP (2.5.6).

    Note that the patch contains a bracket error: ( component ) ) { ). Remove { !

    Open wp-content/plugins/bbpress/includes/extend/buddypress/activity.php

    Remove or comment line 279 & 280 and replace by

    $existing = new BP_Activity_Activity( $activity_id ); 
     		if ( empty( $existing->component ) )

    save and you’re done.

    #237949
    Svend Rugaard
    Participant

    Was installing https://wordpress.org/plugins/buddypress-wall/ and it actually make the error go away .. :S

    Svend Rugaard
    Participant

    Hmm they say it isnt “compabitle” with buddypress only BBpress but it works but not on those 2 things.. isnt it possible for someone to help me or at least tell me how i find these blank spaces ? ..

    I have done a clean install on http://area51.ps3geeks.dk/ only

    #237944
    Henry Wright
    Moderator

    Hey @djsteveb,

    Would like to try this out one of my sites.. wondering though, how this comparing to buddy block or whatever it is called? Feature compare?

    Check out the first two paragraphs of the README.md for how muting differs from blocking or unfriending.

    Also, this would be excellent if it also could “mute” / hide / selected groups from the sidebar widgets and sitewide activity..

    In v1.0.0 of the plugin, only muting users is supported. So at the moment, it works just like Twitter.

    At some point in the future I might expand functionality to mute group updates, and perhaps even activity types.

    also wondering if possible to hide posts from ‘muted users’ from appearing in the sidebar of sidewide posts when an annoying user has a blog with MU setup and stupid posts show up on the sitewide posts widget

    Right now just activity items get muted. Muting posts is a great idea; something I’ll have to think about for a future release.

    For answers to more of the plugin’s FAQs, see here:

    https://wordpress.org/plugins/buddypress-mute/faq/

    Hope this info helps 😀

    #237940
    goakes
    Participant

    Hello

    Not sure where this question fits. If I go to login through the Buddypress login dashboard and only enter my user name then login, I’m taken to the WordPress login page. Is there a way to take me to keep me on the buddypress login page with an error message?

    Equally is there a function for ‘forgotten password’ without going through the WordPress login page?

    Gary

    #237938

    In reply to: Unable to Edit Profile

    David
    Participant

    In BuddyPress, if I click on the profile option it will show my profile that other users can click on in the BuddyPress groups. Once you click on the profile link it gives you an option to click edit to edit your profile….I just get a blank page with no options to edit anything.

    modemlooper
    Moderator

    I would google wordpress appointment plugin

    There seems to be some options, you don’t necessarily need BuddyPress

    #237932
    shanebp
    Moderator

    Please use the code button when posting code.

    If I go into the admin panel and select Activities, I can see the same comment, but “View Activity” takes me to the activity panel, were I can see the parent activity and the post successfully.

    As you can see, the url is being rewritten when you click on ‘view activity’.
    You can either figure how the url is being rewritten.
    Or create your own url using the fields from the comment object.
    Something like:
    $url = bp_core_get_userlink( comment[user_id] ) . '/activity/' . comment[comment_ID] . '/';

    bp_core_get_userlink()

    @mcuk
    Participant

    Hi all,

    I’m still looking for the correct screen function to mimic/copy the existing favorites page and the method by which to load it. All I want to do is duplicate that page somewhere else.

    The above code works to setup the new subnav tab but I can’t get any page content (ignore the link array item, that is obviously wrong).

    Is the approach below the method by which to load a standard buddypress template to a subnav tab or is that just for custom screen functions? :

    https://buddypress.org/support/topic/custom-profile-menu/

    shanebp
    Moderator

    Where are you getting bp_pre_group_query from?
    You can’t make up hooks :>
    See BP_Groups_Group::get in buddypress\bp-groups\bp-groups-classes.php for more info.

    Try this:

    
    function antares_groups_filter_options() {
        echo '<option value="user-league">User League</option>';
    }
    add_action( 'bp_groups_directory_order_options', 'antares_groups_filter_options' );
    
    function antares_ajax_querystring( $query_string, $object ) {
    
    	if ( 'groups' != $object ) 
    		return $query_string;
    
    	if ( ! bp_is_groups_directory() ) 
    		return $query_string;
    	
    	$query_args = wp_parse_args( $query_string, array() );
    
            $page = $query_args['page'];
    
    	if( isset( $query_args['action'] ) && $query_args['action'] == 'user-league' ) {
    	
    		$query_args = array();
    		$query_args['page'] = $page;
    		$query_args['orderby'] = 'name';		
    		$query_args['order'] = 'ASC';			
    		$query_args['include'] = antares_get_groups(); 
    		$query_string = http_build_query( $query_args );
    
    	}
    
    	return $query_string;
    
    }
    add_filter( 'bp_ajax_querystring', 'antares_ajax_querystring', 32, 2 );
    
    function antares_get_groups() {
    
        // put your custom sql here
        // return a csv string of the groups ids
        // for example '1,22,57'
    
    }
    Gayatriom
    Participant

    ok. one more question.
    I see how they created businesses from groups and allow members to join ‘the hub’ which is essentially a group.

    But i can’t see the members that are a part of the ‘hub’.
    Is that possible with buddypress?

    #237891
    shanebp
    Moderator

    Unless you’re specifically using the default theme, you only have to change this file:
    \buddypress\bp-templates\bp-legacy\buddypress\members\register.php

    And the recommended approach is to create a template overload in your theme:

    Theme Compatibility & Template Files

    #237890
    Dani-Girl
    Participant

    So, for a temporary solution, I edited the BuddyPress register.php page (in both Default theme and legacy template) to generate a random email address each time the register page loads, and hid the email required field.

    would like an option, however, where I don’t have to touch the actual BuddyPress code.

Viewing 25 results - 13,276 through 13,300 (of 69,016 total)
Skip to toolbar