Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

    Participant

    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

    @danbp

    Participant

    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
    ?>

    @danbp

    Participant

    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. 😉

    @danbp

    Participant

    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. 😉

    @danbp

    Participant

    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 ! 😉

    @danbp

    Participant

    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. 😉

    @danbp

    Participant

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

    @danbp

    Participant

    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)

    @danbp

    Participant

    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

    @danbp

    Participant

    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

    @danbp

    Participant

    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.

    @danbp

    Participant

    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 ?

    @danbp

    Participant

    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)

    @danbp

    Participant

    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.

    @danbp

    Participant

    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.

    @danbp

    Participant

    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;

    Customizing Labels, Messages, and URLs

    @danbp

    Participant

    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.

    @danbp

    Participant

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

    Installing and using bbPress forum plugin is explained here:

    Installing Group and Sitewide Forums

    @mention is explained here:
    https://codex.buddypress.org/template-updates-2-1/

    @danbp

    Participant

    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' );

    @danbp

    Participant

    @rosyteddy,

    snippets published on the forum are generally related to a specific topic/question. And of course, dependant of theme and/or bp version, if not php or mysql or server settings. Over the time, they stop working or can’t be used anymore because the Core changed or because of other evolutions….

    Despite having a kind of snippet store accessible by forum menu seems to be a usefull idea, it is not. Each usage case is different and can not be extended to all case. FYI information, i had the same idea a few years back, and was quickly discouraged to do so by our Core dev. I was first disapointed, but i finally had to admit they where right. And today, i’m absolutely persuaded and on the same line.

    That’s why you have Codexes. For WP, BP or bbP with general explanation of default usage and more rarely, with usage examples. If you find a snippet example in Codex, in 95% of cases, you have to adapt it to your personnal usage.

    To answer your question, as you know, BuddyPress is (only) a WordPress plugin. When installed, the site continue to work with WordPress and WP dashboard. Nothing is modified in WP Core, only that BP was added to the site. As a plugin.

    How to handle WordPress is explained and widly documented in his Codex.
    Menu management, CPT management or how to modify menu items on Toolbar or Admin bar is also documented. And the’re so many sites giving WP tips (from excellent to awfull), you can read.

    @danbp

    Participant

    Logged-in user names are visible on the swa when the plugin is activated.

    If you allow visitors to publish without login, things goes differently. Even if they have to provide a name, site url, category, title and content, which is IMO no gain in regard of the defaut register form, which has the same number of fields. And once they are registered, they can publish by just typing a title and a content…

    After that, the name is stored as meta_key and the post content is associate to a default registered author.
    Unfortunately in this situation, SWA can’t know the name and use the default author name instead, simply because meta_keys are not used by swa.

    Maybe ask the plugin author for some enhancement for unregistered users ?

    @danbp

    Participant

    You’re welcome 😉
    And to resume the situation in one word, say: integration.
    One example between many other here.

    @danbp

    Participant

    Add this to your child-theme functions.php or to bp-custom.php

    Not sure it will work with your theme, and ‘activity’ tab seems now impossible to remove (since 2.2 at least). I don’t know why exactly. Uncomment both lines to see if it works for you.

    function bpfr_hide_top_nav() {	
    	
    	if( !is_user_logged_in() ) {	
    
    // bp topnav items to hide	
    	//	bp_core_remove_nav_item( 'activity' );			
    		bp_core_remove_nav_item( 'profile' );
    		bp_core_remove_nav_item( 'friends' );
    		bp_core_remove_nav_item( 'groups' );
    		bp_core_remove_nav_item( 'forums' );	
    
    //bp subnav (my activities, my groups, etc)
    	//  bp_core_remove_subnav_item( 'activity', 'activity' );
    		bp_core_remove_subnav_item( 'activity', 'friends' ); 
    		bp_core_remove_subnav_item( 'activity', 'favorites' );
    		bp_core_remove_subnav_item( 'activity', 'groups' );
    		bp_core_remove_subnav_item( 'activity', 'mentions' );
    	}
    }
    add_action( 'bp_ready', 'bpfr_hide_top_nav', 10 );

    @danbp

    Participant

    @danbp

    Participant

    How do you allow guest posting ? Are you using a plugin ?
    What is their WP role ? Subscriber, author or did you create a custom role for them ?

    Give more details please !

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