Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 7,951 through 7,975 (of 68,950 total)
  • Author
    Search Results
  • #265765
    r-a-y
    Keymaster
    #265734
    Nahum
    Participant

    well I was trying post the my code, but I think I spammed myself after trying to edit the reply to this …
    CPT (and custom title thing)

    add_action('init', 'video_register_my_cpt');
    function video_register_my_cpt() {
    register_post_type('video', array( 
    'label' => 'Videos',
    'description' => 'Latest Videos',
    'public' => true,
    'show_ui' => true,
    'show_in_menu' => true,
    'menu_position' => 5,
     'show_in_nav_menus' => false,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug' => 'videos'),
    'query_var' => true,
    'has_archive' => true,
    'exclude_from_search' => false,
    'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes','buddypress-activity'), 
    'bp_activity' => array(
                'component_id' => buddypress()->blogs->id,
                'action_id'    => 'new_video',
                'format_callback' => 'bp_blogs_format_activity_action_new_blog_post',
                'comment_action_id' => 'new_video_comment',
                'comment_format_callback' => 'bp_activity_format_activity_action_custom_post_type_comment',
                'contexts'     => array( 'activity', 'member' ),
                'position'     => 40,
                ),
      'taxonomies' => array('video_category','video_tag'),
      'labels' => array(
      'name' => 'Videos',
      'singular_name' => 'Video',
      'menu_name' => 'Videos',
      'add_new' => 'Add Video',
      'add_new_item' => 'Add New Video',
      'edit' => 'Edit',
      'edit_item' => 'Edit Video',
      'new_item' => 'New Video',
      'view' => 'View Video',
      'view_item' => 'View Video',
      'search_items' => 'Search Videos',
      'not_found' => 'No Videos Found',
      'not_found_in_trash' => 'No Videos Found in Trash',
                
                'bp_activity_admin_filter' => __( 'New video published', 'custom-domain' ),
                'bp_activity_front_filter' => __( 'Videos', 'custom-domain' ),
                'bp_activity_new_post'     => __( '%1$s added <a href="%2$s">[Video]</a>', 'custom-domain' ),
                'bp_activity_new_post_ms'  => __( '%1$s added <a href="%2$s">[Video]</a>','custom-domain' ),
                
                'bp_activity_comments_admin_filter' => __( 'Comments about video', 'custom-domain' ), // label for the Admin dropdown filter
                'bp_activity_comments_front_filter' => __( 'Video Comments', 'custom-domain' ),        // label for the Front dropdown filter
                'bp_activity_new_comment'           => __( '%1$s commented on a <a href="%2$s">video</a>', 'custom-domain' ),
                'bp_activity_new_comment_ms'        => __( '%1$s commented on a <a href="%2$s">[Video]</a>, on the site %3$s', 'custom-domain' )
    
      )
    
    ) ); }
    
    function my_video_include_post_type_title( $action, $activity ) {
      if ( empty( $activity->id ) ) {
        return $action;
      }
    
      if ( 'new_video' != $activity->type && 'new_video_comment' !=$activity->type ) {
        return $action;
      }
    
      preg_match_all( '/<a.*?>([^>]*)<\/a>/', $action, $matches );
    
      if ( empty( $matches[1][1] ) || '[Video]' != $matches[1][1] ) {
        return $action;
      }
    
      $post_type_title = bp_activity_get_meta( $activity->id, 'post_title' );
    
      if ( empty( $post_type_title ) ) {
    
        switch_to_blog( $activity->item_id );
    
        $post_type_title = get_post_field( 'post_title', $activity->secondary_item_id );
    
        // We have a title save it in activity meta to avoid switching blogs too much
        if ( ! empty( $post_type_title ) ) {
          bp_activity_update_meta( $activity->id, 'post_title', $post_type_title );
        }
    
        restore_current_blog();
      }
    
      return str_replace( $matches[1][1], esc_html( $post_type_title ), $action );
    }
    add_filter( 'bp_activity_custom_post_type_post_action', 'my_video_include_post_type_title', 10, 2 );
    
    

    BP CUSTOM

    
    /*////////////////////////////////////////////////////////////////////////////////////////////*/
    // Modifying CPT Activity Actions
    /*///////////////////////////////////////////////////////////////////////////////////////////*/
    
    function record_blogpost_activity_action( $activity_action, $post, $post_permalink ) {
    global $bp;
    
    if( $post->post_type == 'jobs' || get_post_type($post->ID) == 'jobs' ) {
      
      $activity_action  = sprintf( __( '%1$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>');
    
    } elseif( $post->post_type == 'video' || get_post_type($post->ID) == 'video' ) {
    
      $activity_action  = sprintf( __( '%1$s posted a video', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
    
    } elseif($post->post_type == 'post'  ) {
    
      $activity_action  = sprintf( __( '%1$s posted a blog', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
    
    }  
    
    return $activity_action;
    }
    
    add_filter('bp_blogs_activity_new_post_action', 'record_blogpost_activity_action', 11, 3);
    
    /*////////////////////////////////////////////////////////////////////////////////////////////*/
    // Modifying CPT Comment Activity Actions
    /*///////////////////////////////////////////////////////////////////////////////////////////*/
    
    function comment_activity_action( $activity_action, $post, $post_permalink ) {
    global $bp;
    if( $post->post_type == 'post' ) {
    
      $activity_action  = sprintf( __( '%1$s commented on %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
    
    } elseif( $post->post_type == 'video' || get_post_type($post->ID) == 'video' ) {
    
      $activity_action = sprintf( __( '%1$s replied on the video %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . esc_url( $post_permalink ). '">' . $post->post_title . '</a>' );
    
    } 
    return $activity_action;
    
    }
    
    add_filter('bp_blogs_activity_new_comment_action', 'comment_activity_action', 11, 3);
    
    /*//// ? /////*/
    function bbg_record_video_post_type_comments( $post_types ) {
          $post_types[] = 'video';
          return $post_types;
      }
    //add_filter( 'bp_blogs_record_post_post_types', 'bbg_record_video_post_type_comments' );
    //add_filter( 'bp_blogs_record_comment_post_types', 'bbg_record_video_post_type_comments' );
    

    doing it this way, everything works except my custom comment action.

    #265714
    MadManSam
    Participant

    @dono12 I’m experiencing the same browser behavior, and it would be a better UI for notifications if we were to add AJAX and a batch (read/unread) feature would be great too.

    Or is that open to use something like wp-api for buddypress to solve this.
    How did you solve this?

    #265710
    threwthenevr
    Participant

    Update: nvm it only worked flawlessly when I had it all to the default wp-login.php.

    When someone registers to my site they are redirected to my buddypress register.php and within that page is would say thank you for registering please check your email for activation link.

    I wanted to place a resend activation email on the same page so I placed this code in that register.php file

    $resend_url=( ‘If you have not received an email yet, click here to resend it.’, ‘buddypress’ ), esc_url( $resend_url ) );

    The problem is ran into is the plugin wp security I use has an option to change the wp-login.php to whatever I want so I just renamed it to /login.

    I then changed the wp-login.php in the code to login?action and the linked redirected to the correct wp-login now the /login page but never sent the resent activation email.

    I also have it when a user trys to login without activating first it would post an error on the login popup with the resend activation email, if I keep wp-login.php it works but if I change the wp-login.php to just /login it won’t work.

    Those two issues have me confused. I’m totally new to php and recently been studying as much as I can but all the documentation out there had me struggling to Figuer this out.
    Does anyone by chance have any insight on this?

    #265682
    lalitavalon
    Participant

    Hello, I found the solution for the same.

    Customize the URL Slugs of BuddyPress Components


    this is the link that is helpful for me.
    There are many internal configuration settings that can be changed by adding a configuration definition line to our wp-content/plugins/bp-custom.php file.

    My another concerned is that In the message there is a button of starred and also a feature to make a message as a star marked so i want to disable/remove this feature form the message please help me in this if you have any idea

    #265679
    Henry Wright
    Moderator

    The Customizing Labels, Messages, and URLs article should help.

    #265675
    lalitavalon
    Participant

    Hi @henry,
    There are some labels like friends, nitifications, messages etc we want to change thees labels. Suppose we have to change Friends to Member and also url corresponding. How we can chnage all the things in the buddy press because buddypress donot provide any settings to change so please help me.

    #265669
    danbp
    Participant

    Please don’t double post. Closing this one as duplicate.

    #265667
    danbp
    Participant
    #265655

    In reply to: Disable Alphabetical

    Brajesh Singh
    Participant

    Do you want to remove the “Alphabetical” in the Order By dropdown?

    If you are using a BuddyPress specific theme, please look into yourtheme/buddypress/members/index.php and you will see the code there for this option. Just remove that.

    if you are not using a BuddyPress specific theme or your theme does not have this file, you can copy index.php file from plugins/buddypress/bp-templates/bp-legacy/buddypress/members directory and put it in yourtheme/buddypress/members directory.

    then you can modify the file to remove the dropdown option.

    Hope that helps.

    Regards
    Brajesh

    #265648

    In reply to: Membership

    Henry Wright
    Moderator

    You’ll probably need a plugin for that, or even custom code a solution because, by default, BuddyPress doesn’t give members the opportunity to create new pages.

    #265643
    lalitavalon
    Participant

    Hi @Henry Wright,

    I use the buddypress in my website and select the page for registration in setting of the buddypress. By default it is taking the default page.php layout like there is side bar my default page.php so i want to chnage the default page to my template and add disffrent page side at registration page.

    #265638
    shemakeswebsites
    Participant

    I found the solution. I tested the script I had tried before…but this time it worked. If anyone else is interested, see the script at the end of this post:

    https://buddypress.org/support/topic/username-vs-display-name/

    #265629

    In reply to: Ephemeral Messages

    Henry Wright
    Moderator

    You’d need to build a custom solution because I don’t think there’s anything available, at least for BuddyPress.

    Take a look at the WordPress Transients API. That might help.

    https://codex.wordpress.org/Transients_API

    #265623

    In reply to: Ephemeral Messages

    Henry Wright
    Moderator

    Private messaging in BuddyPress is persistent (saved to the db). There is also “flash” messages but these are stored as a cookie and are removed after the page request.

    #265619
    EMRETHEAVIATOR
    Participant

    The problem is solved. It was because of an old code I used to hide admin. Anyone needs to hide admin can use this link.

    #265618
    EMRETHEAVIATOR
    Participant

    Thank you very much. The problem is solved. Anyone has the same problem can use this link.

    #265614
    Henry Wright
    Moderator

    There are a few to choose from. I haven’t tried lately myself but these seem to be popular:

    lalitavalon
    Participant

    I useed the same website with diffrent link on local host it is working fine there is no issue.
    But I actaully try to set up the same website again on local differnt link and try to install the buddypress plugin getting errors and not able to uninstall.
    Still if you want some information please find below:

    Theme -custom theme
    php version 7.0.9
    Install type single
    List of plugins:

    Advanced Custom Fields
    Advanced Custom Fields: Date and Time Picker
    Advanced Custom Fields: Repeater Field
    All In One SEO Pack

    Breadcrumb NavXT

    BuddyPress
    Captcha

    Contact Form 7
    Dephue Data Design Hide Update Notifications – Developer Edition
    Limit Login Attempts
    Lockdown WP Admin
    Login With Ajax
    Restrict Categories
    Visualizer: Charts and Graphs
    WP-Mail-SMTP
    WPFront User Role Editor

    Host Type: Local

    danbp
    Participant

    Hi,

    please provide more details about your install. For now it is just impossible to help.

    Used theme ?
    Php version ?
    Install type ? (single, network)
    List of plugins ?
    Hoster and plan, server type ?

    You can also read here before posting.

    Thank you for comprehension.

    #265605
    Anil Sharma
    Participant

    you Can also check previous topic on this

    how to add new members to groups automatically?

    zsauce
    Participant

    This is the bar and menu I am trying to get rid of:
    WordPress Admin Bar

    While this is the bar I’m trying to maintain, but all of these options disappear when I hide the WordPress Admin Bar above:
    BuddyPress Admin Bar

    #265592
    Kriss Kellino
    Participant

    Hi guys

    I have just had a user try to post a picture and a link together… yes I am using Activity plus plugin.

    It came up with Security check requiried… now not sure what is causing it. Akismet approved the post.

    So is it the Activity plus plugin or BuddyPress?

    I am using the latest versions of everything.

    Kriss 🙂

    http://www.krissharmsworth.rocks/blog

    #265588
    lawlyet
    Participant

    This error is showing up to many websites. A google search for “PHP Warning: Creating default object from empty value in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-member.php on line 1170” returns almost 5500 results…

    And if you search for “PHP Warning: Creating default object from empty value in class-bp-groups-member.php on line” (removing line number and the path of the file from the results, you get some something like 337000 results.

    My site is also showing this message, and I already removed all plugins and themes, running the latest version of WP, BP and BBPress with Twenty Seventeen template.

    I guess it may be a problem with php, or maybe with chrome and chromium… Maybe it is time to start working on this issue.

    I already added the following in my functions.php:

    /* Remove errors if any */
    error_reporting(E_ERROR | E_PARSE);
    /* End remove Errors */

    it’s not the ideal. there is also the better option to add some lines in your wp-config.php, to do a proper debug and get it in a log file, instead of showing it in the site.

    #265586

    In reply to: BuddyPress Groups

    shanebp
    Moderator

    The widget’s ajax call does not check to see who is viewing it.
    So only public groups will appear; hidden & private groups will not appear even though you are a member.
    You could write your own widget that uses the logged-in member’s id.
    Use the group widget code as a reference:
    buddypress\bp-groups\bp-groups-widgets.php

Viewing 25 results - 7,951 through 7,975 (of 68,950 total)
Skip to toolbar