Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 576 through 600 (of 3,787 total)
  • @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

    @danbp

    Participant

    Hi,

    for 2), this is where updates on my profile are showing up. If it is there, it’s most probably you published an update containing a link to a video.

    If you click on “view” at the right, you’ll see this update on a new screen from where you have access to a delete button.

    @danbp

    Participant

    Hi,

    To get the link to a user profile:
    $link = bp_get_loggedin_user_link();

    Many use examples can be found on the forum. Ie:

    [Resolved] BuddyPress Links URLs

    Is it possible to make Activity and Forum profile tabs private?

    @danbp

    Participant

    Hi,

    did you tried to use the Email API ?
    Dashboard > Emails. From there you can modify the email title.

    Other possibility
    https://buddypress.org/support/topic/customizing-emails-template/

    @danbp

    Participant

    For 2) the idea is to sort users alphabetically by birthdate.

    Members Loop

    The snippets i indicated use a field called contributor. You could try to replace by birthdate, or whatever you named that profile field.

    @danbp

    Participant

    Hi,

    that’s usually a CSS issue with the theme.
    I visited admin’s profile on your site and highlighted the whole Basic Info and user name. By doing this i can read the word Name you don’t see actually. Exact same behave on the other user’s profile….

    This means that’s the text has the same color or has such a low contrast with the page background that you can’t read it !

    You can adjust this via CSS in your (child) theme. Try something like:

    div.profile .label {
       color: #000!important;
    }

    @danbp

    Participant

    Hi @bikerwp000,

    read here and see if you can do something with the snippets

    https://buddypress.org/support/topic/adding-new-order-by-on-members-loop/

    @danbp

    Participant

    @danbp

    Participant

    Please don’t double post !

    Closing this topic as duplicate in favor of

    On updation blank screen appears

    @danbp

    Participant

    Hi,

    for 1) try
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . 'type=alphabetical' ) ) : ?>

    For 2) read here perhaps it helps

    @danbp

    Participant

    Using BP Theme Compat in Plugins.

    BuddyPress has no more theme since 1.9. The old BP-Default theme is only in for backward compatibility.
    If you build a plugin for BP, i don’t think you need to build an extra theme for it. BP use only templates, who have enough flexibility to fit with almost any theme.

    Globally, for a plugin, you have to match with BP’s templates, not with a theme or another.

    Ie. if you need a setting screen on profiles, you can use a simple call to a kind of pre-build template you can use for plugins
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );

    By using this, you’re on the profile with a new tab related to your plugin and automatically also integrated to the user’s theme. In other words, BP takes in account your plugin and the theme takes account of BP.

    I wouldn’t recommand to build a theme with a plugin, as they are so many different themes on hand. If you don’t fit to the majority of them for any obvious reason, you’ll get in high difficulties if you are to specific. Don’t forget that you will have a plugin support to manage…

    Made it simple and efficient and if possible, easy maintainable and upgradable. For you but also for any user type.

    @danbp

    Participant

    @danbp

    Participant

    Better to ask for this the plugin support

    @danbp

    Participant

    Hi @tronix-ex,

    Give this a try. Read more will only appear again if you use more than 500 000 characters…
    Add to bp-custom.php

    function bpfr_excerpt_length( $length ) {	
    
    $length = 500000; // adjust the length to desired number of characters 
    
    // Is the current page a user's activity stream page ?
    	if( bp_is_user_activity() ) {
    	  return $length;
    	}
    }
    add_filter( 'bp_excerpt_length', 'bpfr_excerpt_length', 11, 1 );
    In reply to: BuddyPress Branding

    @danbp

    Participant

    Hi,

    you can use BuddyPress in the plugin name, under condition the public can understand clearly that it is an add-on FOR BP and not a part OF BP.

    For the domain name, i presume it’s the same trademark condition as for wordpress: no, you can’t. You can use bp-something[dot]com but not buddypress-something[dot]com

    BuddyPress comes like WordPress under GPLv2 license and has similar terms of use.

    In reply to: Lost search function

    @danbp

    Participant

    @danbp

    Participant

    Other related topics:

    restrict by user role

    Status

    restrict by member_type

    Status

    @danbp

    Participant

    Please, don’t double post ! You have already asked the same question here:

    How to show bp resume view page on home page of buddypress

    Closing this topic as duplicate.

    In reply to: Trouble uploading File

    @danbp

    Participant

    Do you use MediaPress plugins ? Seems accordingly to the screenshot, that you have to repair/create a page for it.

    Have you the same trouble with other format than PDF ?

    Check MediaPress settings first (or whatever media plugin you use).

    @danbp

    Participant

    No idea ! Perhaps try something like <span style=”white-space: nowrap”>Long line with no breaks</span> to your CSS ?

    @danbp

    Participant

    Hi @rezbiz,

    in brief, you want to add some status dependent custom link to the BuddyBar.

    I’ll ignore Kleo (premium theme) and Visual Composer (third party plugin).

    Following examples let you add an external link to a non BP page on almost any menus (except BP usermenu).

    How it works ?
    – create a test page and call it Book.
    – the page slug must be /book/
    – the link (tab/button) will be displayed to logged-in users only.

    I made also a snippet which add such a link to the WordPress Main Menu. This menu is the one you see in WP’s menu customizer by default. Depending the theme you use, you have always a main menu and X others. This can vary and it’s to you to find how it can/should work eventually. See theme documentation and WP Codex if you get in trouble with it.
    Note that it should work with all Twenty themes at least.

    Add the snippets to bp-custom.php and see the result. After that, read through the code and modify the page name/ID and slug to your need. Leave anything else untouched.

    
    // add Custom tab on site wide activity and members directory pages
    function tab_custom_link_to_page() {
    
    	if ( bp_is_activity_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    
    		if ( !is_user_logged_in() )
    			return false;
    
    		// link to what you want
    		$link = bp_get_root_domain() . '/book';
    
    		echo'<li><a href="'. $link .'">My Book</a></li>'; 
    	}
      
    }
    add_action( 'bp_activity_type_tabs', 'tab_custom_link_to_page' ); // site wide activity page
    add_action( 'bp_members_directory_member_types', 'tab_custom_link_to_page' ); // members directory page
    
    // add Custom tab on Profile Nav
    function add_profiles_link_to_page(){
    
    	if ( bp_is_profile_component() || bp_is_user() ) {
    
    	if ( !is_user_logged_in() )
    		return false;
    
    	$link = bp_get_root_domain() . '/book/';
    
    	?>
    		<li><a href="<?php echo $link; ?>"><?php printf( 'My Book' ); ?></a></li>
    	<?php  
    	}
    }
    add_action( 'bp_member_options_nav', 'add_profiles_link_to_page' );
    
    // add Custom tab on Groups Nav
    function add_groups_link_to_page(){
    
    if( bp_is_active( 'groups' ) ) {
    
    	if ( !is_user_logged_in() )
    		return false;
    
    	$link = bp_get_root_domain() . '/';
    
    	bp_core_new_subnav_item( array(
    		'name'			=> 'My Book',
    		'slug'			=> 'book',
    		'parent_slug'		=> bp_get_current_group_slug(),
    		'parent_url'		=> $link,
    		'screen_function'	=> true, 
    		'position'		=> 40 ) );
    	}
    }
    add_action( 'bp_setup_nav', 'add_groups_link_to_page' );
    
    // add Custom tab on Groups Directory
    function add_groups_directory_link_to_page() {
    
    	if( bp_is_active( 'groups' ) ) {
    
    	if ( !is_user_logged_in() )
    		return false;
     
        if ( bp_is_current_action( 'custom' ) ) 
            return;
     
    	$link = bp_get_root_domain() . '/book';
    
        $button_args = array(
            'id'         => 'my-books',
            'component'  => 'groups',
            'link_text'  => 'My Book',
            'link_title' => 'My Book',
            'link_class' => 'my-books no-ajax',
            'link_href'  => $link,
            'wrapper'    => false,
            'block_self' => false,
        );  
       
        ?>
    		<li><?php echo bp_get_button( apply_filters( 'bp_get_group_custom_button', $button_args ) ); ?></a></li>
        <?php
    	}	
    }
    add_action( 'bp_groups_directory_group_filter', 'add_groups_directory_link_to_page' );
    
    // add Custom tab on WP Main Menu ( after Home, About, etc )
    function main_menu_custom_link_to_page( $menu ) { 
         
    	if ( !is_user_logged_in() )
    			return $menu;
    	else
     	// link to what you want
    	$link = bp_get_root_domain() . '/book';
    
    	$grouplink = '<li><a href="'. $link . '">My Book</a></li>';
    
    	$menu = $menu . $grouplink;
    	return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'main_menu_custom_link_to_page' );

    Yes, it looks complicated, but it isn’t. Simply it’s not homogeneous ! 🙂

    @danbp

    Participant

    @fearthemoose, @rezbiz,

    Here “the best guarded secret” finally revealed !
    But it’s not a secret, is part of Codex and a multi handled topic subject on this forum.

    What we want to do: remove access possibility.
    Where: on BuddyBar navigation menu (the one below the profile header).
    Specifics: make the activity and forum tabs only visible to the logged in user.

    NOTE: The activity tab is shown by default when you visit a profile.

    As we are going to hide/remove this tab to visitors, we need to define as first another default tab. If we won’t do that, the visitor will get a Page not found error. Which is not exactly the case here, the page exist but the visitor can’t access it.

    Let’s define arbitrary Profile as the new default tab. You can of course define what ever other existing tab on your BuddyBar as default.

    Add this line to bp-custom.php
    define( 'BP_DEFAULT_COMPONENT','profile' );

    Now the mega “open secret” !

    The folowing snippet contains almost any BP menu items you can have on a BuddyBar, and includes also the Forum item, in case you use bbPress.
    You can remove or comment out those you don’t want to use.
    Note also that it is only an example – you have to play with it to fit your need. But at least you have the right syntax to use.
    Note also that some profile menu items are user only, such as message or notice. In other words, these are always private.

    This function goes preferably to bp-custom.php

    function bpfr_hide_tabs() {
    global $bp;
    	 /**
    	 * class_exists() & bp_is_active are recommanded to avoid problems during updates 
    	 * or when Component is deactivated
    	 */
    
    	if( class_exists( 'bbPress' ) || bp_is_active ( 'groups' ) ) :
            
            /** here we fix the conditions. 
            * Are we on a profile page ? | is user site admin ? | is user logged in ?
            */
    	if ( bp_is_user() && !is_super_admin() && !is_user_logged_in() ) {
    
            /* and here we remove our stuff ! */
    		bp_core_remove_nav_item( 'activity' );
    		bp_core_remove_nav_item( 'friends' );
    		bp_core_remove_nav_item( 'groups' );
    		bp_core_remove_nav_item( 'forums' );
    	}
    	endif;
    }
    add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );

    Some other hints for privacy
    if you want to allow only the profile owner to view some tabs, replace
    !is_user_logged_in by !bp_is_my_profile() – this scenario doesn’t need a check for logged in users as it is made by bp_is_my_profile.

    If you want only to make a profile private, read here.

    If you want to remove a sub-nav item (ie. View on Profile), you use something like:
    bp_core_remove_subnav_item( 'profile', 'view' );

    Many other possibilities for navigation are also available, including for groups. Several examples are given on Codex, here.

    And if not enough, RTFM and search the forum ! 🙂

    Have fun !

    @danbp

    Participant

    They are filters for timestamp.
    To get some text before the ago part, try this:

    function text_pre_timestamp() {
    
    $var = 'custom text %s'; // %s = timestamp
       return $var;
    
    }
    add_filter( 'bp_core_time_since_ago_text', 'text_pre_timestamp' );

    Code references

    @danbp

    Participant

    Hi,

    that’s definetly a WordPress question ! Read more about this.

    @danbp

    Participant

    What i want is to show view page content in the landing page of buddypress which is home.php . Is there any way i can achieve that?

    bp-templates/bp-legacy/buddypress/members/single/home.php contains dynamic templates and shows by default the member activity template.

    If you use the above code, you’ll get Resume as default content. This is the simpliest way to achieve what you want.

    FYI: the Resume plugin is 4 years old and no more maintained. In 4 years, many things changed in xprofile component and what you actually can do with these fields is much more evoluted than 4 years ago. IMO, you wouldn’t even have to use it, as you can get a similar result directly with BuddyPress.

Viewing 25 replies - 576 through 600 (of 3,787 total)
Skip to toolbar