Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

    Participant

    Late nite coffee riot. 😀 Go to bed it’s time to sleep a little.
    I understood what you asked. Tab tab tab… on profile page.
    Profile stuff is on the member page (the member Core component).
    And when when you say profile page, i understand the profile tab (in reality the profile template), displayed on the member page in My profile context.

    Items you listed are part of the buddymenu.
    They are also used in the usermenu(top right corner), which is part of the toolbar (aka wp admin bar)

    End of jargon. 😉

    @danbp

    Participant

    Keine ahnung ! It works on my forum… Do you use a cache or clear your browser history and cookies.

    Aside, did you allowed mention in BP settings ?

    @danbp

    Participant

    And ?

    @danbp

    Participant

    Nothing happen ? Where do you try to use this function ?
    And No you haven’t to use another snippet.

    The snippet is not correct as it ouput the display name. We need nicename.

    Use this instead

    function abc() {
    $user = get_userdata( bbp_get_reply_author_id() );
    	if ( !empty( $user->user_nicename ) ) {
    		$user_nicename = $user->user_nicename;
    		echo '@'.$user_nicename;
    	}
    }
    add_filter( 'bbp_theme_after_reply_author_details', 'abc' );

    This will only show up in a bbpress forum. Like here, that’s what you asked for.

    @danbp

    Participant

    hi @svend-rugaard,

    this is a bbpress trick. Add this snippet to bp-custom.php

    
    function abc() {
    	echo '@'. bbp_get_topic_author_display_name();
    }
    add_filter( 'bbp_theme_after_reply_author_details', 'abc' );

    @danbp

    Participant

    @danbp

    Participant

    Activities prior to your slug modification are not modified recursively. That’s normal behave.

    The only way i know to do that is to change the slug manually in the activity table.
    If you have many forum related activities, use a mysql script.

    @danbp

    Participant

    To link to a profile within bbpress topic editor, you should add the snippet to bp-custom.php

    Read also here, where i mentionned a plugin
    https://buddypress.org/support/topic/link-to-users-profile-non-template/

    @danbp

    Participant

    BP_MEMBERS_SLUG is documented in bp-core-functions.php:654
    The function is declared in bp-members-template.php:22

    But you use a filter for titles. Maybe you can do something, based on this example which upercase the username on profile page title.

    function bpfr_title_apparence( $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_title_apparence', 20, 3 );

    This filter is in the same file, line 514.

    @danbp

    Participant

    Wide subject and several answered on this forum.

    Askimet covers comment spam and doesn’t avoid clever spam bots to hit directly the DB.

    Basic recommandation is to use table prefix different of the classic wp_. This calms down most bots.

    A closed door is always a challenge for any spammer. WP is not fort Knox and depending your host, what YOU did and many other security details, this has no end in fact. If your site is Facebook, you’ll probably receive more spam than if it would be mykittycat homepage. Glory has a price ! 😉

    Some htaccess rules against reputated spam server and one or to plugins aside what exist natively in WP should be enough to protect you a little from massive spam.

    For example: buddypress honeypot + ban hammer for BP

    or more simple and rought
    http://mattts.net/development-stuff/web-development-stuff/wordpress/buddypress/anti-spam-techniques/registration-honeypot/

    … + searching this forum, maybe you can find more tips. 😉

    @danbp

    Participant

    You just need an existing user_id.

    He an example where you get a field value to add in a custom action in one of your template.

    
    function bpfr_field( $custom_field ) {
    	global $bp;
    	
    	// is xprofile component active ?
    	if ( bp_is_active( 'xprofile' ) )
    	
    	// fetch the user_id
    	$current_user = wp_get_current_user();
    	$current_user_id = $current_user->ID;
    	
    	// fetch the data
    	$custom_field = xprofile_get_field_data('42', $current_user_id); // 42 is a field ID
    	
    	// show the data
    	echo '<div class="authorinfo">'. $custom_field . '</div>';
    	
    }
    add_action( 'myfield', 'bpfr_field', 1 );

    Then, add this at the appropriate place in your template <?php do_action( 'myfield'); ?>

    Another example, which you can add at the begin of a custom function.

    global $bp;
    	// Check if the Activity component is active before using it.
    	if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
    	if( bp_is_user() && ! bp_get_member_user_id() ) {
            $user_id = 'displayed: '. bp_displayed_user_id();
        } else {
            $user_id = 'get_member_user: '. bp_get_member_user_id();
        }
    
    // your stuf here

    Note that both examples use global $bp, a check for active component with a different usage for a same result: if not active, the function will do nothing. This allows you to deactivate a component without throwing a warning or a php failure despite the function is in your theme, bp-cutom or plugin.

    @danbp

    Participant

    You can directly search in BuddyPress with notepad++ or a similar tool.
    Or online, here:
    http://phpxref.ftwr.co.uk/buddypress/nav.html?_functions/index.html

    Also by in-depth reading the codex.

    In reply to: mention part

    @danbp

    Participant

    Please don’t double post !

    Closing this topic which can be continued here:
    https://buddypress.org/support/topic/mentions-suggestion-js-problem/

    @danbp

    Participant

    Probably because no one use BP xprofile component as is only.

    One use it only by default, another add 20 tabs and another one only 3.
    Ajaxifying such tabs, not all are in english when they are customized, will became a bit too complex to adjust each individual case.

    But i can be wrong. 😉

    In reply to: Custom sort members

    @danbp

    Participant

    That is also explained, with filter example, on the member loop codex page !

    See Filtering by Xprofile fields.

    @danbp

    Participant

    Ok, no problem as this detail doesn’t change my previous question.

    @danbp

    Participant

    hi @okulsayfam,

    What do you think?

    Nothing without a site URL. 😉
    https://buddypress.org/support/topic/when-asking-for-support-2/

    Have you setup BuddyPress correctly ?

    Configure BuddyPress

    @danbp

    Participant

    Hi @andrew55,
    add this snippet to bp-custom.php. Now you can use shortcode [profilo] in any blog post, blog comment, page and BP notice. Note that activity walls are stripped, the shortcode will not work/appear there.

    For bbPress topics and replies, use this plugin. Read the doc, as you’ll have to check user capacity to get it to work for participant.

    function bpfr_link_to_profile() {	
    
    	return ' <a href="'. bp_get_loggedin_user_link() .'">View my profile</a>';			
    }
    add_shortcode( 'profilo', 'bpfr_link_to_profile' );
    add_filter( 'comment_text', 'do_shortcode' );

    @danbp

    Participant

    Here an example which work when you’re in a members loop. You could use from within bp-custom. Note: it’s just a way to do it, may exist others.

    function xyz( $user_id = 0, $field_name = 'Location' ) {
    
    $return = false;
    	
    	if ( empty( $user_id ) || empty( $field_name ) || ! bp_is_active( 'xprofile' ) ) {
    		return $return;
    	}
    
    // the bp way to get user datas
    $location = xprofile_get_field_data( 'Location', $user_id ); 
    
    // output the div only if $location has data
    if ( ! empty( $location ) ) {
    		echo '<div>'. $location .'</div>';
    	}
    }
    
    // we show this on the member header, using an pre-defined action hook in members-header.php
    add_action( 'bp_before_member_header_meta', 'xyz' );
    In reply to: Custom sort members

    @danbp

    Participant

    Have tried this ?

    <?php if ( bp_has_members( 'type = alphabetical' ) ) : ?>
        <?php while ( bp_members() ) : bp_the_member(); ?>

    @danbp

    Participant

    Please read here, as you have to debug your install.

    Are all pages assigned to BP components ?
    Have you same issue with Twenty Fifteen or one of the other WP default themes ?

    Note also that you got that issue after activating bbPress, which has his own support.
    And as you use a premium theme, we can’t help you much here, as we have no free access to it’s code.

    @danbp

    Participant

    I told about BuddyDrive because you have a download button aside a description written in french. And that plugin author is french, like me. And i’m a user of this plugin….

    You use a premium theme, and we can’t help you much here if you have an issue with it. As we have no free access to it’s code.

    As site admin, you can configure the registration form and add some description if you need some near a field.
    Go to dashboard > users > profile fields

    If you need some more details about BuddyPress feel free to read the Codex. And don’t hesitate to ask your theme support.

    Have a nice day too.

    @danbp

    Participant

    Sorry, i have no answer as i’m not a dns or php specialist. Maybe you’ll find your answer in apache’s doc or googling a bit. 😉

    I just know that apache changed his internal configuration since 2.2 and that some php command won’t work correctly due to lack of these settings in some configuration.

    Now you have to declare each local site specifically, like in the above example.

    Don’t forget it if you want to install several sites locally.

    @danbp

    Participant

    Weebly is a site buider with his own tools to do that.
    BuddyPress is a WordPress plugin. 2 different concept, 2 technologies.

    The answer is no. 😉

    @danbp

    Participant

    The wrong thing was that you assigned a parent to a BP page. 😉
    (your-site/community/my-stuff/activate) activate was parent of my-stuff !

    BP comp’ pages are not working as ordinary WP pages. They should stay blank, without any template or parent page. Just a title and basta. They are in for internal usage only, WP’s page system gives the url and that’s enough for BP which will add fully dynamically content, depending the member and the current action.
    WP pages are static. BP’s are … ? Yes !

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