Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 2,076 through 2,100 (of 3,787 total)
  • @danbp

    Participant

    It works for all users (past & new) as soon as they added a signature to their profile.

    Try to replace if(function_exists('bp_has_groups')) by if(function_exists('bbpress') )

    @danbp

    Participant

    Two snippets to do this (hopefully). The first has a fixed position (latest by default), the second let’s you choose the position.

    function my_nav_menu_notif_counter($menu) {      
            if (!is_user_logged_in())
                    return $menu;
            else
                    $notif = '<li>Notif '. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</li>';
                    $menu = $menu . $notif;
                    return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_notif_counter' );
    
    See comment how to apply a position
    function my_nav_menu_positioned_notif_counter( $items, $args ) 
    {
        if( $args->theme_location == 'primary' ) // only for primary menu
        {
            $items_array = array();
            while ( false !== ( $item_pos = strpos ( $items, '<li', 3) ) )
            {
                $items_array[] = substr($items, 0, $item_pos);
                $items = substr($items, $item_pos);
            }
            $items_array[] = $items;
            array_splice($items_array, 0, 0, '<li>Notif '. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</li>'); // 0,0 is first position, 1,0 is second, etc
    
            $items = implode('', $items_array);
        }
        return $items;
    }
    add_filter('wp_nav_menu_items','my_nav_menu_positioned_notif_counter', 10, 2);

    Reference: https://developer.wordpress.org/reference/hooks/wp_nav_menu_items/

    @danbp

    Participant

    The topic shows an example of code to get a correct notification counter. The snippet shows also how you can use already existing CSS. There is no need to reinvent the whell for just adding a notif’ counter, even if it’s a custom one.

    Can you give more details about the menu code you’re using.
    Which menu is concerned ? Or a screenshot of what/where your custom function is acting ?

    @danbp

    Participant

    The path should be your-site/register/

    index.php has nothing to do there. Recheck your settings and permalinks.

    BP pages should only have a title and no associated parent page or template.

    Configure BuddyPress

    @danbp

    Participant

    @danbp

    Participant

    What is not working ?
    I use it on a test site without any problems. All user who have selected a rank on their profile, have the belonging avatar. And this custom avatar is showing everywhere (groups, activity, friends, group forum and site wide forum.

    That said, I don’t use any avatar plugins.

    @danbp

    Participant

    @wrowlands,
    When you comment someting on activities, this comment will be attached to this activity.

    That means that if your initial activity was registered past mounth, even if you comment on it today, you won’t see it in today’s activities, but in past mounth activities.

    so, yes, you have to scroll or at least to choose an appropriate activity filter to get nearer, depending the activity amount of your site.

    @borisj, see if this plugin may help:

    BuddyPress Lock Unlock Activity

    @danbp

    Participant

    Finally, i got it to work by improving my previous code.

    This one works correctly now.

    function bpfr_my_new_avatar_url( $local_url, $params ) {
    
    // ensure we have always the right user_id
    $user_id = $params['item_id'];
    
    $ranking = xprofile_get_field_data ('ranking', $user_id );
    
    	if ($ranking == "Top 25") {		
    		$local_url = get_stylesheet_directory_uri() .'/custom_img/25.png';
    	}
    	
    	if ($ranking == "Top 24") {		
    		$local_url = get_stylesheet_directory_uri() .'/custom_img/24.png';
    	}
    return $local_url;
    
    }
    add_filter( 'bp_core_default_avatar_user', 'bpfr_my_new_avatar_url', 10, 2 );
    In reply to: Bookbag/Cart Function

    @danbp

    Participant

    Never heard about individual WP media library, specific to my buddypress account. By default, all authors can see others pictures when stored in the media library.

    BuddyForms is a premium plugin, you probably will have more chance for answers by asking on ThemeKraft support.

    @danbp

    Participant

    Any other idea? Yes !
    Use bbP Signature instead. This plugin has a filtrable function where you can easely add custom fields near signature.

    Activate the plugin. Create a field called signature and add this snippet to bp-custom.php

    function my_bbp_reply_content_append_user_signature( $content = '', $reply_id = 0, $args = array() ) {
    	// Default arguments
    	$defaults = array(
    		'separator' => '<hr />',
    		'before'    => '<div class="bbp-reply-signature">',
    		'after'     => '</div>'
    	);
    	$r = wp_parse_args( $args, $defaults );
    	extract( $r );
    
    	// Verify topic id, get author id, and potential signature
    	$reply_id  = bbp_get_reply_id       ( $reply_id );
    	$user_id   = bbp_get_reply_author_id( $reply_id );
    	if(function_exists('bp_has_groups')) {
    		$signature = xprofile_get_field_data( 'Signature', $user_id );
    	// here we add our custom fields
    		$wowi = '<br>'. xprofile_get_field_data( 'Industry', $user_id );
    		$wowt = '<br>'. xprofile_get_field_data( 'Type', $user_id );
    	}
    	else {
    		$signature = bbp_get_user_signature ( $user_id  );
    	}
    
    	// If signature exists, adjust the content accordingly
    	if ( !empty( $signature ) )
    		$content = $content . $separator . $before . $signature . $wowi . $wowt . $after;
    
    	return apply_filters( 'my_bbp_reply_content_append_signature', $content, $reply_id, $separator );
    }
    
    if ( !is_admin() ) {
    	remove_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_user_signature', 1, 2 );
    	add_filter( 'bbp_get_reply_content', 'my_bbp_reply_content_append_user_signature', 1, 2 );	
    }
    In reply to: Bookbag/Cart Function

    @danbp

    Participant

    They are plugins who can do this, without having to use a cart system or e-commerce plugin.

    Both are useable on BP profiles and have several settigns to allow different file format.
    See BuddyDrive or MediaPress.

    @danbp

    Participant

    Hi @fabwintle,

    have you tried this plugin ?
    https://wordpress.org/plugins/gd-bbpress-tools/

    there was also an older topic on bbpress forum with a solution

    [resolved] [Resolved] BBPress signatures with Buddypress

    @danbp

    Participant

    Change also your actual BP assigned Group page title. And check your menus that you have changed the word group to your need.

    In reply to: BuddyPress on Magento

    @danbp

    Participant

    @danbp

    Participant

    It’s built in automatic search feature.

    To deactivate the whole profile links, add this snippet to bp-custom.php or your child-theme functions.php

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

    To remove selectively such profile links, see here.

    @danbp

    Participant

    When your custom language file doesn’t contain a correct header version, it will be overwriten at each BP update.

    To avoid this, you have 2 solutions.
    – completely deactivate automatic translation upload, which will affect the whole site: theme and plugins.
    – keep a safe copy and upload it to the site AFTER the update. Tehn if something is missing or no more translated, you can update your version from the pot file shipped with BP.

    If you use a cache, you have to clear it before installing a custom version. You must be sure that your wersion is running, in any case.

    @danbp

    Participant

    I would recommend that you read at first how BuddyPress should be installed, before trying an experimental adventure.

    Configure BuddyPress

    Theme Compatibility & Template Files

    In reply to: Create user manually

    @danbp

    Participant

    See if this topic can inspire you:
    https://buddypress.org/support/topic/importing-members-from-joomla-csv/

    Search for csv import, you will find other answers.

    In reply to: Different questions

    @danbp

    Participant

    1) & 2) some plugins you could use: Mycred, Megathread (for comments only), Buddypress Profile Rating, BP Group Review

    3) wp-content/languages/plugins/buddypress.mo/po

    4) yes and also in wp settings.

    5) see Mycred plugin

    Keep in mind that BuddyPress is members oriented. Classic content like blog posts and forum topics are managed as content first than binded to a member’s activity.

    @danbp

    Participant

    See documentation about group roles.

    If you allow not logged-in users to see what hapens in a private group, the group privacy is very compromised. In this case make it public.

    @danbp

    Participant

    Read your theme documentation.

    Also here about premium theme and what you can expect as help from here in such a case.
    https://buddypress.org/support/topic/when-asking-for-support-2/

    @danbp

    Participant

    Find this in your theme style.css file and replace color:white to something else.

    a.button, a.comment-reply-link, #commentform #submit, .submit, input[type="submit"], input.button, button.button, #wrapper .woo-sc-button
     -moz-appearance: none;
        background: none repeat scroll 0 0 #428bca;
        border-color: rgba(255, 255, 255, 0);
        border-radius: 3px;
        border-style: solid;
        border-width: 1px;
        box-shadow: 0 0 0 0 #888;
        box-sizing: border-box;
        color: white !important; /* <-- change here */
        cursor: pointer;
        display: inline-block;
        font-family: inherit;
        font-size: 1em;
        font-weight: 200;
        line-height: 1.618em;
        overflow: visible;
        padding: 0.327em 1em;
        text-align: center;
        text-decoration: none;
        text-shadow: none;
        text-transform: uppercase;
        white-space: normal;
        width: auto;
    } 

    or see Canvas documentation on how to modify button colors.

    @danbp

    Participant

    Merci @imath ! 😉

    @danbp

    Participant

    You misunderstood me:
    […] if it uses the same template why would it work on the Members page but not the Profile.
    I said the same page, not the same template. Members directory has his own template and a profile has some other template. Directory and profiles are using the same page: members. And not at least, this is only a page name. Technicaly, BP use page.php

    See template hierarchy on Codex to understand how it works.

    Now, why is the sidebar not showing widgets despite the sidebar code is in the page source ? No idea… Seems to me you use a lot of parts which are not from WordPress and some unusual settings to show your site…

    If you use custom sidebars from your theme, you have to try those bars.
    Activate 2015 and see how to get widgets to appear on that theme first. Then reactivate Wellness and see what you get.
    Or ask your theme support.

    Sorry, but i can’t help you much more because you’re using a premium theme.
    And as you don’t give details about your install, you can’t expect more for now.

    In reply to: Display online info

    @danbp

    Participant

    Can you develop your idea ? Member’s loop is wide….

Viewing 25 replies - 2,076 through 2,100 (of 3,787 total)
Skip to toolbar