Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • @commoneasy

    Participant

    Hi danbp,

    Thanks for your response! I have a custom nav-item “network” containing four sub-nav-items with friends, friends of friends and friends of friends of friends and as last all pending request (with a custom query). These loops are needed for the specific purpose of the website i’m working on. The reason why i don’t use the native “network” tab was because i added some custom styling which didn’t worked out well in combinations with the “sort by” button.

    The problem is that i will be redirected to the native request page when i’m clicking on the friendship requested button on my custom requests page (or any other member loop). So my question is:

    a) is there a way to show the accept and reject buttons on my custom request page and let the users be redirected to my custom request slug?
    b) or show the native request loop on my custom request slug (under my custom network tab). This will mess-up the styling but i will find a solution for that.
    c) maybe (or probably) there is a far more simple solution for what i want to achieve (3 loops F, FoF & FoFoF and requests).

    I hope my question is clear now. if not, please let me know! and thanks again for your time!

    Greetz

    @commoneasy

    Participant

    Hi shanebp,

    Thanks for your reply and help! I got it working! 🙂

    @commoneasy

    Participant

    Hi man, sorry to bump this old topic. did you find any solution for this? i try to use a member loop on BP profile page showing friends of friends, unfortunately the loop only shows direct friends of the current displayed user…(and thus showing no friends at all)..THANKS!

    @commoneasy

    Participant

    hmmm very strange, i use the custom loop inside the buddypress profile and found that users who are not connected to /have a friendship with the displayed users are ignored by the loop.

    @commoneasy

    Participant

    Hi, sorry to bump this old topic, i was wondering if you found a solution to your problem? I face the same issues here…

    @commoneasy

    Participant

    is there a way of just adding this in your functions.php file?

    @commoneasy

    Participant

    Hi there, i have an additional question… can this be used to hide profile groups from the edit profile group tab ? I tried;

    // commoneasy hide fields
    function commoneasy_hide_some_profile_fields( $retval ) {	
    	if(  bp_is_profile_edit() ) {		
    		$retval['exclude_fields'] = '15';	//multiple field ID's should be separated by comma
    		
    	}	
    	
    	return $retval;
    }
    add_filter( 'bp_after_has_profile_parse_args', 'commoneasy_hide_some_profile_fields' );
    
    // commoneasy hide groups
    function commoneasy_hide_some_profile_groups( $retval ) {	
    	if(  bp_is_profile_edit() ) {		
    		$retval['exclude_groups'] = '4';	//multiple field ID's should be separated by comma
    		
    	}	
    	
    	return $retval;
    }
    add_filter( 'bp_after_has_profile_parse_args', 'commoneasy_hide_some_profile_groups' );

    unfortunatly it didn’t work, i hope somebody can help!

    @commoneasy

    Participant

    @commoneasy

    Participant

    I got this working with:

    add_filter( 'bxcft_show_field_value', 'my_show_field', 15, 4);
    function my_show_field($value_to_return, $type, $id, $value) {
      if ($value_to_return == '')
            return $value_to_return;   
       if ($type == 'number') {
            $value = str_replace("<p>", "", $value);
            $value = str_replace("</p>", "", $value);
            $field = new BP_XProfile_Field($id);
            if ($field->id == '18' ) {
    		  
    
    	 $f_value=number_format($value,2);
    			  $new_value = "&euro; $f_value,-";
           
    
    	   } else {
                $new_value = $value;
            }
            return '<p>'.$new_value.'</p>';
        }
        return $value_to_return;
    }

    Does anybody have an idea how i can use this for multiple fields? strangely something like ‘2,18,19’ isn’t working…

    @commoneasy

    Participant

    sorry to bump this old topic. I use both BP 2.0.1 and BP custom fields type and i got the the links removed with:

    function remove_xprofile_links() {
        remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    }
    add_action('bp_setup_globals', 'remove_xprofile_links');

    I was wondering if you could use this to only hide the links from certain profile fields, like only for profile field 2, 6 & 7 ?

    @commoneasy

    Participant

    Wow thanks a lot man!! This works perfect 😀 for the intrested people, i put the code from SimpleOne in this exact file: wwwroot/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php

    @commoneasy

    Participant

    you should try to hide the fields from the edit profile page but not from the profile page. try editing the wwwroot/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile/edit.php. more information here https://buddypress.org/support/topic/ow-to-hide-more-than-one-profile-field/

    @commoneasy

    Participant

    Hi SimpleOne, I’m working on the same problem here! I tried to hide some fields from the edit profile page . i tried <

    
    div class="clear"></div>
    
    		<?php while ( bp_profile_fields() ) : bp_the_profile_field(); if ( bp_get_the_profile_field_id() != '15' ) :?>
    
    			<div<?php bp_field_css_class( 'editfield' ); ?>>

    to hide profilefield 15 from the editing page, unfortunatly it doesnt work, can you maybe send me a duplicate of your edit.php file? you would help me big time 🙂

Viewing 13 replies - 1 through 13 (of 13 total)
Skip to toolbar