Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 1,334 total)
  • Profile photo of danbp
    danbp
    Moderator

    @danbp

    hi @michaelhpdx,

    maybe these posts will help you ?

    https://buddypress.org/support/topic/my-conditional-tags-are-not-being-respected-in-genesis/

    https://yoast.com/wordpress/plugins/canonical/

    Or maybe this snippet (intended for WP SEO at least) which removes canonical

    function bpfr_wpseo_canonical_exclude( $canonical ) {
      global $bp;
      if ( function_exists( 'buddypress') && ( buddypress()->displayed_user->id || buddypress()->current_component ) ) {
        $canonical = false;
      }
      return $canonical;
    }
    add_filter( 'wpseo_canonical', 'bpfr_wpseo_canonical_exclude' );

    @utahman1971

    try this plugin: https://github.com/imath/activity-sticker/
    It works without problem on 2.2.1

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Yes i see that. It’s probably because you use some custom roles.
    I see admin-prez and admin-ws

    The code is only cibling the original WP admin role, not galery admins.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    :D

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Hi @verdon,

    Background

    consider this and this

    Can BuddyPress Profiles (Members) set-up and associate listings

    Read here

    Can BuddyPress have a professional look and feel?

    Visit biowebspin.com

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    You didn’t read the Codex ! bp-custom.php

    Do you omitted opening and closing php tags ?

    <?php
    // hacks and mods will go here</blockquote
    ?>
    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Hi @ksmithlondon,

    the add friend button on members directory or profile header is styled here
    wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress.css
    line 761

    The class=”friendship-button not_friends add” is not used by CSS.

    The class name comes up in:
    wp-content/plugins/buddypress/bp-friends/bp-friends-template.php between line 352 > 410

    and is also used in wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.js:1211

    Next time instead of looking and looking and looking, simply search. And use the appropriate tools which will do this for you ;-)

    Firebug and Notepad++ in this case, taked me less than 5mn. ;-)

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Hi @hnla,

    it’s not easy for us frenchies to write Codex articles. @imath write very good tutorials in french, guess it’s more difficult for him to be as good in english. Same for me.
    And after writing php a long time, i suppose it can be difficult to find a more literary style. ;-)

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    The code works with BP 2.2
    and will better work when in bp-custom.php.
    Also don’t forget to logout as site admin before testing it or you will continue to see you ! ;-)

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Please read here, it’s better explained.

    The example given on Codex is related to ‘page’, and you want to show something on ‘activity’.

    Instead of 'component_id' => buddypress()->activity->id,
    use 'component_id' => 'activity',
    and instead of
    add_action( 'bp_init', 'customize_page_tracking_args' );
    use init with a very late priority
    add_action( 'init', 'customize_page_tracking_args', 999 );

    Pfuiiiiii, taked me a while to find this.

    Here a working example of a CPT called Music and how to get it in the SWA

    // allow tracking of our CPT
    add_post_type_support( 'music', 'buddypress-activity' );
    
    // creating the dropdown filter on activity and members page
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
     
        bp_activity_set_post_type_tracking_args( 'music', array(
            'component_id'             => 'activity', // unique ID
            'action_id'                => 'new_music', // new_$post_type where new_ is mandatory
            'bp_activity_admin_filter' => __( 'Published a new music', 'text-domain' ),
            'bp_activity_front_filter' => __( 'Music', 'text-domain' ),
    			'contexts'                 => array( 'activity', 'member' ), // swa & member activity page
    			'activity_comment'         => true,
    			'bp_activity_new_post'     => __( '%1$s posted a new <a href="%2$s">Music</a>', 'text-domain' ),
    			'bp_activity_new_post_ms'  => __( '%1$s posted a new <a href="%2$s">Music</a>, on the site %3$s', 'text-domain' ),
    			'position'                 => 100,
        ) );
    }
    add_action( 'init', 'customize_page_tracking_args', 999 );
    
    // creating the CPT
    function bpfr_create_post_type() {
      register_post_type( 'music',
        array(
          'labels' => array(
            'name' => __( 'Music', 'text-domain' ),
            'singular_name' => __( 'Music', 'text-domain' )
          ),
          'public' => true,
          'has_archive' => true,
        )
      );
    }
    add_action( 'init', 'bpfr_create_post_type' );
    

    FYI, i added the mentionned topic to the Codex page. Would probably help more than one. ;-)

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Glad you got it finally. Marking this topic as resolved.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    You don’t have FTP access ?

    Can you access to this page ? your-site/wp-admin/options.php This page shows the content of the wp_options table.

    From here you can normally modify your site url. The’re two places to find and modify, siteurl and home. Enter only hxxp://crabstreetjournal.org (no www and no wp directory)

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Actually you have a single install with BuddyPress with N members and activities.

    Nothing will be deleted if you activate the site as network.

    That said it’s strongly recommended to dump your DB before doing this.

    For a better overview of the DB, see here
    The BP tables are the same on MS as on a single install, and WP adds only new tables for each blog and only if you create one at least.

    WP’s user table stays intact in any case, like bp activities and others related to members (profile, message and so on).

    This can help you too:

    https://codex.wordpress.org/Importing_Content

    https://wordpress.org/support/plugin/import-from-ning

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Hi,

    first off, check your permalinks and choose one of the option EXCEPT default. Then deactivate the current theme and make a test with one of the Twenty’s.

    If it’s ok with standart setup, revert to your theme and see if it works now.

    If not, try the patch mentionned on this topic

    https://buddypress.org/support/topic/my-conditional-tags-are-not-being-respected-in-genesis/#post-235182

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Welcome to the buddypress debug club ! Please open a ticket and give details about your install and any step to reproduce the issue. Add also a link to this topic.

    Go here and use same login as on this forum.

    https://buddypress.trac.wordpress.org/newticket

    If you don’t know how to post a ticket on a wiki page, read here first.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    hi @tipsy,

    You didn’t explain what you wanted to achieve , so it’s a bit difficult to give a precise answer… but glad you got it ! ;-)

    Your solution, a bit simplier

    $field = xprofile_get_field_data( '2', $user_id ); 
    echo $field;

    Here two examples. The first allows to publish a video on the profile and works only if you’re in the member loop. The second does the same thing, but outside of the loop and need that you add an action hook to your template where the vid should play. When outside of the loop, you need always a user_id

    function set_video_field( $field_value ) {
    	$bp_this_field_name = bp_get_the_profile_field_name();
    	// field name (case sensitive)
    	if( $bp_this_field_name == 'Video' ) {
    		$field_value = strip_tags( $field_value );
    		$field_value = '<iframe width="420" height="315" src="http://www.youtube.com/embed/'.$field_value.'" frameborder="0" allowfullscreen></iframe>';
    	}
    	return $field_value;
    }
    add_filter( 'bp_get_the_profile_field_value','set_video_field');

    For outside the loop. Add do_action( 'myfield' ); into a custom 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('24', $current_user_id); // the field ID
    
    	$output = '<iframe width="420" height="315" src="http://www.youtube.com/embed/'.$custom_field.'" frameborder="0" allowfullscreen></iframe>';
    	
    	// show the data
    	if ( is_user_logged_in() && !empty( $custom_field ) ) :
    		echo '<div class="authorinfo">'. $output . '</div>';
    	endif;
    }
    add_action( 'myfield', 'bpfr_field', 1 );
    

    May this help ?

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Sorry but i’m unable to reproduce that. I don’t have notices or warning about this issue.

    Can’t you make a test with the trunk version ? (direct link to zip – BuddyPress is in the src folder)

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    hi @daethian,

    if you’re using BP 2.2, don’t use the “old” bp-default theme.

    If you have FTP access, your wordpress should be at the site root if you want to use BuddyPress. If it’s you who created the /wp/ folder and if you haven’t any other site on the same account you don’t need it. Install wordpress directly at the root ! Mostly in a folder named www or htdocs (ie. htdocs/wp-admin, htdocs/wp-content/, htdocs/wp-include/)

    But let’s say it’s correct for now.

    Connect to your site and go to admin
    On WP dashboard> General ensure you entered WP URL and site URL correctly (hxxp://your-site.xxx) without trailing slash (normally the same URL)
    Then dashboard > Appearence>Theme and activate Twenty Fifteen
    Then dashboard > Settings > Permalinks > anything but default
    Then dashboard > plugins and deactivate/reactivate BuddyPress
    Then dashboard > Appearence > Menu > screen option (top right), check buddypress and add the BP menu to Twenty 15

    See if it works.

    If not, you’ll have to setup WP correctly at first.
    Return to FTP, move WP to the root, erase htaccess and wp-config and restart the installation

    your-site.xxx/install
    Re enter your DB name, psw and all other information needed for installing WP.
    Your DB and actual content won’t be erased (but you can make a dump before, in case of).

    5mn install later, you are invited to login. And you have to do what i’ve explained previously.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Wow stunning ! Are you on a local server ? MS or single install ?

    Could be that something went wrong during upload.
    Erase the BP folder and add a new copy.

    And remove your theme from the theme directory while testing with Twenty.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    hi @ksmithlondon

    please give details…

    Which plugin are you using ? Where does the msg show ? Front, backend, both ?

    This is usually handled with a language file or using CSS display:none;

    https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    hi @tjtaylor,

    which is your theme and do you use bp-custom.php or some custom function ?
    Have you the same msg when you change the theme to Twenty 13 or 14 ?
    If you use a cache, clear it and retry.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    I don’t know BuddyPress forum (v 2.2).

    Installing and using bbPress forum plugin is explained here:

    https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    @mention is explained here:

    https://codex.buddypress.org/template-updates-2-1/

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Hi @gatelli,

    it’s not a bug, it’s not avaible i guess. ;-)

    Add this to your child-theme functions.php or into bp-custom.php (BP 2.1 & >)

    function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) {
    	if ( function_exists( 'bbpress' ) && is_bbpress() ) {
    		$retval = true;
    	}
     
    	return $retval;
    }
    add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' );
Viewing 25 replies - 1 through 25 (of 1,334 total)