Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 451 through 475 (of 3,787 total)
  • @danbp

    Participant

    Hi @henrywright

    it returns the type names

    array (size=3)
      'team' => string 'team' (length=4)
      'ninja' => string 'ninja' (length=5)
      'jaguar' => string 'jaguar' (length=6)

    @danbp

    Participant

    Please use the button when you insert code to topic.

    @danbp

    Participant

    Usually, when the BP pages are “empty” it’s because you omitted to set the permalinks or because you assigned them a template model. BP pages shoud stay empty ! Just a title and nothing else.

    Getting Started

    @danbp

    Participant

    For each link, you just have to copy the link and give it a distinct name

    Assuming you want to list 3 external links:

    $link_0 =  "https://www.amazon.com/";
    $link_1 =  "https://www.blablabla.com/";
    $link_2 =  "https://www.tada.me/";

    then for each link, you write the html

    <li><a href="<?php echo $link_0; ?>......</li>
    <li><a href="<?php echo $link_1; ?>......</li>
    <li><a href="<?php echo $link_2; ?>......</li>

    And you use the same logic for pages.

    Note that if you add many links, you most probably will have to adjust also the nav CSS, to get at least a toggle menu.

    @danbp

    Participant

    Hi @dimensionmedia,

    have you tried with $member_types = bp_get_member_types( array(), 'objects' );

    I use this in a function like this:

    // Display tabs used to filter the members directory by types.

    
    function using_mt_display_directory_tabs() {
    	$member_types = bp_get_member_types( array(), 'objects' );
    
    	// Loop in member types to build the tabs
    	foreach ( $member_types as $member_type ) : ?>
    
    	<li id="members-<?php echo esc_attr( $member_type->name ) ;?>">
    		<a href="<?php bp_members_directory_permalink(); ?>"><?php printf( '%s <span>%d</span>', $member_type->labels['name'], using_mt_count_member_types( $member_type->name ) ); ?></a>
    	</li>
    
    	<?php endforeach;
    }
    add_action( 'bp_members_directory_member_types', 'using_mt_display_directory_tabs' );

    Here a complete working example.

    In reply to: Like Button Issue.

    @danbp

    Participant

    Can I simply change it on my WP-admin settings

    Yes !

    In reply to: Online Status

    @danbp

    Participant

    I tested the free version and i have no issue with it, at least not whith the 2 widgets activated.
    But i haven’t followed the theme recommandation saying i have to use Redux framework. I tested just the theme, not the additionnal plugin. If you use it, deactivate it and see if the issue remains.

    In reply to: Online Status

    @danbp

    Participant

    No worry. About the heme, do you use the free version or the premium version by themeforest ?

    In reply to: Online Status

    @danbp

    Participant

    I am totally desperate. Ich auch ! Mann, muss ich jede frage zwei mahl stellen, oder wie, oder was ?

    @danbp

    Participant

    This bug still exist actually, despite tickets #5354 (3 years old) #5808(2 years) #6854 (9 mounth).

    Milestone changed from Awaiting Review to BuddyPress.org

    Sounds like milestone BuddyPress.org is stone (hey Miles), devastated, completely in the wind, out of interest… Sucks.

    @danbp

    Participant

    I hope so ! FYI, we all here learned by making mistakes, errors and asking around πŸ™‚ :
    Check the history !
    JJJ, Boone & Ray, djpaul, mercime, hnla, shanebp, henrywright, me

    @danbp

    Participant

    You’re welcome ! Close your eyes now and go to sleep ! Tomorrow will be another day. πŸ˜‰

    In reply to: Like Button Issue.

    @danbp

    Participant

    Hi,

    seems you use jetpack to fire a share widget and it looks like there is a JS conflict.
    Activate a twenty theme and se what you get.

    Seems also you use WP super cache.
    Clear the cache and deactivate it and make a first test.
    Once Twenty active, and still no button, you need to track all plugins except BP and jetpack.
    Deactivate all and reactivate one by one, until you find a culprit.

    If nothing found, you can be sure that or the theme or jetpack generates the button issue.
    While writing here i revisited a page (/butterfly) and could see the like button…

    But i think the problem is in your install setup.
    First, you use www. WordPress doesn’t use it by default.
    The site is also really slow. Use GTMetrix to get a detailed analysis of what you could do for better performance.
    You use also a very old plugin, and certainly outdated: pc-custom-css. Why don’t you use a child-theme ?
    Your images are very large, too large imho ! The guitar as example. Original size is 2500x1440px and 577ko ! On the post, it is barely larger than a thumbnail and on the Home a little medium size.
    It isn’t even optimized. I did it quickly and now it makes 303ko. Appreciate the difference and the gain if you would do this for all your pictures.

    Add a little JS bug or lame script over this and you know now from where you can expect issues.

    In reply to: Online Status

    @danbp

    Participant

    @julian25, die Frage ist fΓΌr dich ! Du hast sie nicht beantwortet… πŸ˜‰ Welches Theme benutzt Du ?
    Please provide details when you’re asked for.
    Which is the widget you use in the sidebar who show “16 minutes ago” ?
    How many sidebars are used by your theme ?
    Do you have a specific sidebar for homepage only ?

    @danbp

    Participant

    @kgrondell,

    … and finally, the right way to achieve this is explained here:

    Navigation API

    @danbp

    Participant

    Hi,
    you do it wrong and it is much more simple to make customization by reading the codex.

    The only thing you have to do on the custom template ( i assume you already have the template) is to create a custom member loop. To fecth the correct data to show and how to do that is explained in details here (see Code Examples):

    Members Loop

    @danbp

    Participant

    This topic is titled “Function to hide private message depending of user role”.

    and the snippet does that ! Subscribers have no access to the button. So far i remember it is also the default role in WordPress. You change that to your need.

    The first condition in the snippet allows some users (by ID) to access the button, whatever their role.

    If you want to add other WP roles, you simply copy the 2nd conditionnal if(role=='') and add another role if(role=='mamamouchi") { //do something }.

    Or you use only the user ID if you have only a few members allowed to access. I litle understanding of php is of course a + to do that.
    You have the basics in the snippet. Now, it’s to you now to make it work for your need.

    @danbp

    Participant

    And is it working for you now ?

    @danbp

    Participant

    You posted another question on Buddypress Profile Search support, where it appears that you try to remove the member search form.

    In regard of the BuddyPress support forum, you use at least two third party plugins aside BP and perhaps proceeded to template customization !

    You have to isolate the culprit: one of your plugins or your theme customization. BuddyPress is not concerned. Sorry.

    In reply to: Online Status

    @danbp

    Participant

    Check your theme files. You need to find the “ago” part and modify it (via child theme) to what BP use for it.

    Or maybe you can get a german version for your theme or search the string in the existing theme translation.

    Eventually ask for help on the theme support, as it is not a BP issue.

    @danbp

    Participant

    @magicalworlddolls,

    Read codex page about bp-custom and my answer. You need an opening php tag at the first line of the file.

    @lesanis,

    what you’re asking for is in the snippet. Read the comments (lines starting by //).
    The restriction for logged-in users is already deactivated. So by default, the function run’s for ALL visitors.
    To get dynamic links to friends, search the forum, you have many topics to find containing the right solution. Search for bpfr_, it will bring up a lot results containing snippets. And if not enough, check in Codex.

    In reply to: jancok.html

    @danbp

    Participant

    And ? What is the problem ?

    @danbp

    Participant

    The snippet was tested before publication and it works.
    Have you removed something inside ? Have you removed/added something before/after the function ?

    Note also that bp-custom file use an opening php tag on the very first line but doesn’t use a closing php tag at the end of file. That explains why the snippet contains a closing php tag before the line containing the <li> and an opening php tag after.

    Triple check your file!

    @danbp

    Participant

    Hi,

    try this (goes to bp-custom.php)

    function bpex_remove_private_message_button( $button ) {
    $user = bp_loggedin_user_id();
    
        if ( $user == '4' || $user == '7' || $user == '25'  ) { // the allowed user ID's
    	 return $button;
    	}
    
    	if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    
    		if ( $role == 'subscriber') {
    			$button = '';
    		}
    	}
    }
    add_filter( 'bp_get_send_message_button', 'bpex_remove_private_message_button', 1 , 1 );

    No idea how to get specifically a pmpro defined user ID – you have to check their doc to adjust the above snippet. Note that it works on a standart install – without pmpro.

    @danbp

    Participant

    Hi,

    try this (add to bp-custom.php):

    function add_profiles_link_to_page(){
    
    	if ( bp_is_profile_component() || bp_is_user() ) {
    
    	// allow link to appear only to loggedin user
    	/*if ( !is_user_logged_in() )
    		return false; */
    
    	// tabed internal link : /internal link/page name/
    	//$link =  bp_get_root_domain() . '/book/';
    
    	// tabed external link
    	$link =  "https://www.amazon.com/";
    	
    	?>
    		<li><a href="<?php echo $link; ?>"><?php printf( 'My Books' ); ?></a></li>
    	<?php  
    	}
    }
    add_action( 'bp_member_options_nav', 'add_profiles_link_to_page' );
Viewing 25 replies - 451 through 475 (of 3,787 total)
Skip to toolbar