agnesmeil
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Namaste! LMS] Comments to lessons in buddypress activity streamI’m sorry, I know very little about coding. What I meant was that the post type “namaste_lesson” was already made before the buddypress activity thingy was made, and therefore it wouldn’t actually add any support to the lesson. If that makes any sense.
Either way, at the buddypress support forum they found me the solution to my problem: https://buddypress.org/support/topic/custom-post-type-comment-tracking/#post-250738
The solution:
$args=array( "label" => __("Namaste! Lessons", 'namaste'), "labels" => array ( "name"=>__("Lessons", 'namaste'), "singular_name"=>__("Lesson", 'namaste'), "add_new_item"=>__("Add New Lesson", 'namaste'), 'bp_activity_admin_filter' => __( 'Lessons', 'namaste' ), 'bp_activity_front_filter' => __( 'Lessons', 'namaste' ), 'bp_activity_new_post' => __( '%1$s created a new <a href="%2$s">Lesson</a>', 'namaste' ), 'bp_activity_comments_admin_filter' => __( 'Comments about Lessons', 'namaste' ), 'bp_activity_comments_front_filter' => __( 'Lesson Comments', 'namaste' ), 'bp_activity_new_comment' => __( '%1$s commented on the <a href="%2$s">Lesson</a>', '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', 'buddypress-activity'), 'bp_activity' => array( 'action_id' => 'new_lesson', 'contexts' => array( 'activity', 'member' ), 'comment_action_id' => 'new_lesson_comment', 'position' => 70, ), "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 );In the
function register_lesson_type()in lesson_model.phpForum: Plugins
In reply to: [Namaste! LMS] Comments to lessons in buddypress activity streamThat would be great!
According to the help I received in the buddypress support forum this should be added to the lesson-model.php file, but I still didn’t get it to work (a timing issue?)"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"),
Viewing 2 replies - 1 through 2 (of 2 total)