Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 10,826 through 10,850 (of 69,119 total)
  • Author
    Search Results
  • #251009
    shanebp
    Moderator

    It might be a timing thing – bp_init is called before the namaste code creates the cpt.

    Anyhow… try this in the creation of the namaste cpt:

    "supports"=>array("title", 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'post-formats', 'buddypress-activity'),
    'bp_activity' => array(
        'component_id'          => buddypress()->activity->id,
        'action_id'             => 'new_namaste_lesson',
        'contexts'              => array( 'activity', 'member', 'groups', 'member-groups' ),
        'position'              => 70,
    ),
    "taxonomies"=>array("category"),

    #251007
    agnesmeil
    Participant

    I’m quite sure, but it’s absolutely possible I misunderstood the code. This is in plugins/namaste-lms/models/lesson-model:

    	static function register_lesson_type() {		
    		$lesson_slug = get_option('namaste_lesson_slug');
    	   if(empty($lesson_slug)) $lesson_slug = 'namaste-lesson';
    	   
    		$args=array(
    			"label" => __("Namaste! Lessons", 'namaste'),
    			"labels" => array
    				(
    					"name"=>__("Lessons", 'namaste'), 
    					"singular_name"=>__("Lesson", 'namaste'),
    					"add_new_item"=>__("Add New Lesson", 'namaste')
    				),
    			"public"=> true,
    			"show_ui"=>true,
    			"has_archive"=>true,
    			"rewrite"=> array("slug"=>$lesson_slug, "with_front"=>false),
    			"description"=>__("This will create a new lesson in your Namaste! LMS.",'namaste'),
    			"supports"=>array("title", 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'post-formats'),
    			"taxonomies"=>array("category"),
    			"show_in_nav_menus"=>'true',
    			'show_in_menu' => 'namaste_options',
    			"register_meta_box_cb"=>array(__CLASS__,"meta_boxes")
    		);
    		register_post_type( 'namaste_lesson', $args );

    That very last line tells us it’s called ‘namaste_lesson’ right?

    Maybe I can somehow add some extra code to this file? But then there would be the problem of updates, right?
    Would it help (and how would I do that) if the namaste_lesson cpt is made WITH the buddypress-activity support like suggested by RecoilDesign BEFORE the Namaste plugin is activated or something?

    Thanks so much for helping me 🙂

    #251005
    mcpalls
    Participant
    #250987
    shanebp
    Moderator

    Did you try using the repair tool?

    wp-admin > Tools > BuddyPress > Reinstall emails (delete and restore from defaults).

    #250977
    tkuron
    Participant

    I managed to fix the issue.

    Apparently BuddyPress does not change the avatar url when get_avatar_data() -function is called. I managed to fix the issue by adding following piece of script to my plugin’s source code:

    <?php
    add_filter("get_avatar_data", function($args, $id_or_email){
    	$bp_avatar_url = bp_core_fetch_avatar([
    			"html" => false,
    			"item_id" => $id,
    			"type" => "full",
    			"width" => $args["size"],
    			"height" => $args["size"]
    	]);
    	
    	$bp_avatar_url = htmlspecialchars_decode($bp_avatar_url);
    	$args["url"] = $bp_avatar_url;
    			
    	return $args;
    }, 10, 2);
    ?>
    #250975
    Henry Wright
    Moderator

    If it’s a BuddyPress page then I guess the bp_core_fetch_avatar() function should display the local avatar if no Grav exists. Are you saying this doesn’t happen?

    #250972
    Henry Wright
    Moderator

    So wp_mail_from works for all email notifications aside from private message email notifications? If that’s the case then this is likely a bug. You could open a ticket for this on Trac.

    paddy33
    Participant

    I’ve setup 2 copies of the site locally to do a Before & After comparison. The attached image is a side by side comparison of Chrome’s Inspector when a link in the navbar is selected. https://i.imgur.com/2p6IU1l.png

    BEFORE – BP Version 1.7.2 (Everything looks fine, but BP needs to be updated)

    AFTER – BP Version 2.1.2 (Upon updating to this version, custom templates are not showing. After adding theme support for BP to functions file, custom templates load properly but the custom styling for BuddyPress navbar is lost).

    Spent quite some time trying to figure this out but can’t get to the bottom of it. Hopefully, an experienced set of eyes can spot the issue.

    Thanks for your help.

    #250955
    vinzen
    Participant

    @imath – this didn’t solve my problem. It remains the same as I had mentioned in https://buddypress.org/support/topic/buddypress-2-5-0-medici/ (no trigger situations seen).

    #250945
    shanebp
    Moderator

    I’m not aware of any plugin that controls 1-to-1 private messaging for BP.
    You’ll most likely have to write it yourself or hire a developer.

    #250943
    danbp
    Participant
    #250924
    johnywhy
    Participant

    I simply don’t believe there isn’t a built-in way to do this without writing your own SQL

    Would be convenient, but i can’t find any. I searched all BuddyPress 2.5.0 files for any references to the ‘bp_xprofile_groups’ table. I found it in the following files:

    \bp-core\admin\bp-core-admin-schema.php
    \bp-xprofile\bp-xprofile-cache.php
    \bp-xprofile\bp-xprofile-template.php
    \bp-xprofile\classes\class-bp-xprofile-component.php
    \bp-xprofile\classes\class-bp-xprofile-group.php

    None of these pull Group ID based on Group Name. Does not seem to exist. Some do refer to the ID field, but they are raw SQL statements.

    I did see some caching code, so that might help me figure out how to cache this function. Perhaps i can pull the data from a cache? \bp-xprofile\classes\class-bp-xprofile-group.php seems like it might have some clues about that.

    Also found the tableprefix code: $bp->table_prefix.

    dgalfano
    Participant

    I was able to get the registration to work with BuddyPress on Twenty Fourteen. Is there much of a difference between Twenty Fourteen and Twenty Fifteen?

    Jek-fdrv
    Participant

    Thank you. Can you please help me with this ticket?

    Paul Wong-Gibbs
    Keymaster

    Hi @jek-fdrv

    Yes. See https://buddypress.org/support/topic/read-this-first-buddypress-2-5-master-list/

    This has been fixed for BP 2.5.1 which we hope to release this week.
    I am sorry that we caused this problem.

    #250901
    Kial_Mi_46130
    Participant

    Namaste JJJ, I received the address of BuddyPress forum in response to the same question on the Codex … and translated by Google (while trying to be aware of nonsense or against the grain, which implies to know a little English). Anyway, I never paid attention to this aspect of security, particularly because of its complexity, my priorities are elsewhere!
    Thanks for responding.

    #250885
    shanebp
    Moderator

    Use this hook ( from buddypress\bp-groups\classes\class-bp-groups-member.php ) to call a function that deletes the activity:

    do_action_ref_array( 'groups_member_after_remove', array( $this ) );

    #250879

    Hi there! Where did you get the codex.fr.buddypress.org URL from? I have a hunch the reason you’re seeing this is because subdomains more than 1 level deep aren’t covered by our certificate, but I also don’t think we use those anywhere. If we do, we should correct those URLs to be more friendly.

    That said, I suspect keeping codex content synchronized across multiple languages will be a pain. Maybe it’s easier (though obviously not very welcoming or inviting) to machine translate from English?

    #250878
    RecoilDesign
    Participant

    The only way I was able to get this to work was by modifying my custom post type directly in the functions.php. Agnes, perhaps this will help you as well:

    function create_post_type_videos() {
    	register_post_type( 'my_videos',
    		array(
    			'labels' => array(
    				'name' => __( 'Videos' ),
    				'add_new_item' => __( 'Add Video' ),
    				'edit_item' => __( 'Edit Video' ),
    				'all_items' => __( 'All Videos' ),
    				'singular_name' => __( 'Videos' ),
    				'view' => __( 'View Videos' ),
    				'view_item' => __( 'View Video' ),
    				'search_items' => __( 'Search Videos' ),
    				'not_found' => __( 'No videos found.' ),
    				'not_found_in_trash' => __( 'No videos found in Trash.' ),
    			),
    			'public' => true,
    			'has_archive' => false,
    			'supports' => array( 'title', 'author', 'editor', 'thumbnail', 'revisions', 'comments', 'buddypress-activity' ),
    			'taxonomies' => array( 'product_type', 'videos_categories' ),
    			'rewrite' => array('slug' => 'videos'),
    			'menu_icon' => 'dashicons-video-alt3',
    			'menu_position' => 5,
    			'bp_activity' => array(
    			    'action_id'         => 'new_video',
    			    'comment_action_id' => 'new_video_comment',
    			)
    		)
    	);
    }
    add_action( 'init', 'create_post_type_videos' );
    

    The key bits of code are the ‘buddypress-activity’ the ‘supports’ array and the ‘bp-activity’ array at the end. After modifying my custom post type to include this code, I now see comments appearing in the Activity Stream.

    Perhaps someone could verify if this code is correct, and also explain why the code in Shane’s example (and in the BP docs) is not working?

    #250871
    Paul Wong-Gibbs
    Keymaster
    #250861
    Henry Wright
    Moderator

    Is it a relatively simple process?

    Yes, BuddyPress is just a plugin so once you have WordPress set up you can install BuddyPress via a few clicks.

    Importing members from a spreadsheet will most likely need a plugin. Try searching the Plugin Directory to see what is available.

    #250858
    Henry Wright
    Moderator

    BuddyPress can do all of these things right out of the box. Regarding point 5, you will need to disable both the private messaging and activity components. That can be done from the admin area in a few clicks.

    #250849

    In reply to: howto downgrade?

    verenar
    Participant

    Hey,

    I did not backup the database.

    So I will only change the files under plugins/buddypress.

    Thanks.

    #250847
    johnywhy
    Participant

    i checked here, but not sure if answers my question:

    Profile Fields Loop

    #250839
    shanebp
    Moderator


    @agnesmeil
    – Try:

    function agnes_customize_lesson_tracking_args() {
    
        if ( ! bp_is_active( 'activity' ) ) 
            return;
     
        add_post_type_support( 'namaste_lesson', 'buddypress-activity' );
     
        bp_activity_set_post_type_tracking_args( 'namaste_lesson', array(
            'action_id'                         => 'new_namaste_lesson',
            'bp_activity_admin_filter'          => __( 'Published a new Lesson', 'custom-textdomain' ),
            'bp_activity_front_filter'          => __( 'Lessons', 'custom-textdomain' ),
            'bp_activity_new_post'              => __( '%1$s posted a new <a href="%2$s">Lesson</a>', 'custom-textdomain' ),
            'bp_activity_new_post_ms'           => __( '%1$s posted a new <a href="%2$s">Lesson</a>, on the site %3$s', 'custom-textdomain' ),
            'contexts'                          => array( 'activity', 'member' ),
            'comment_action_id'                 => 'new_namaste_lesson_comment',
            'bp_activity_comments_admin_filter' => __( 'Commented a Lesson', 'custom-textdomain' ),
            'bp_activity_comments_front_filter' => __( 'Lessons Comments', 'custom-textdomain' ),
            'bp_activity_new_comment'           => __( '%1$s commented on the <a href="%2$s">Lesson</a>', 'custom-textdomain' ),
            'bp_activity_new_comment_ms'        => __( '%1$s commented on the <a href="%2$s">Lesson</a>, on the site %3$s', 'custom-textdomain' ),
            'position'                          => 100,
        ) );
    }
    add_action( 'bp_init', 'agnes_customize_lesson_tracking_args' );
Viewing 25 results - 10,826 through 10,850 (of 69,119 total)
Skip to toolbar