Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)

  • jennifersanchez
    Participant

    @jennifersanchez

    Amazing!

    `if (bp_is_active(‘xprofile’)) {
    xprofile_set_field_data( 1, $userId, $form->getValueText(‘quform_7_28’));
    }`

    and its works!`

    thanks very much!


    jennifersanchez
    Participant

    @jennifersanchez

    Resolved!


    jennifersanchez
    Participant

    @jennifersanchez

    @dopeboy did you can it?


    jennifersanchez
    Participant

    @jennifersanchez

    Warning: Cannot modify header information – headers already sent by (output started at public_html/home/wp-content/mu-plugins/message.php:1) in /public_html/home/wp-content/themes/eonet/inc/hooks.php on line 347

    Warning: Cannot modify header information – headers already sent by (output started at public_html/home/wp-content/mu-plugins/message.php:1) in public_html/home/wp-admin/includes/misc.php on line 1198


    jennifersanchez
    Participant

    @jennifersanchez

    Hi! i tried but it isnt work.. i mean one message inside buddypress inbox like a user write to another.. is it?

    function send_message_to_new_member( $user_id, $key, $user ) {
    
        if ( ! bp_is_active( 'messages' ) )
            return;
    $recipients = array( $user_id );
    
        $args = array(
            'sender_id' => 1,
            'thread_id' => false,
            'recipients' => $recipients,
            'subject' => 'Hello new user',
            'content' => 'Welcome to the site',
            'date_sent' => bp_core_current_time()
        );
    
        $result = messages_new_message( $args );
    }
    add_action( 'bp_core_activated_user', 'send_message_to_new_member', 3 );

    jennifersanchez
    Participant

    @jennifersanchez

    Thanks!! it s works!!


    jennifersanchez
    Participant

    @jennifersanchez

    i found it!!

    array(
    			'column' => 'hide_sitewide',
    			'value'  => 1
    		),

    jennifersanchez
    Participant

    @jennifersanchez

    Hi! Great post!

    But i only need that the user only can be the activity of his friends and group and not to all the community.

    Any suggest? i cant found a solution for it.
    Thanks!!!


    jennifersanchez
    Participant

    @jennifersanchez

    Great @shanebp this works!! =)
    these is a custom shortcode from my theme.


    jennifersanchez
    Participant

    @jennifersanchez

    Hi! i tried both options..but it didnt work.
    This is the last version with your suggest, any idea?Thanks!!!!

    function devb_show_role_on_profile()
    {    global $wp_roles;
    $user_id = bp_displayed_user_id();
    $user = get_userdata($user_id);
    $roles = $user->roles;
    $profilebuddy = bp_is_user_profile() ;
    if ( !$profilebuddy )
          return '';
      
    if (!$roles )        return '';
    	
    if (!isset($wp_roles))        
    $wp_roles = new WP_Roles();
    
    $named_roles = array();
    foreach ($roles as $role) {
    $named_roles [] = $wp_roles->role_names[$role];    }
        
    
    if ($named_roles)        
    return '<span class="user-role_activity">' . join(', ', $named_roles) . '</span>';
    
            
        }
    
    add_filter('eo_title_content_html_below_title', 'devb_show_role_on_profile');

    jennifersanchez
    Participant

    @jennifersanchez

    Hi Venutio! I modified this

    function devb_show_role_on_profile()
    {    global $wp_roles;
        $user_id = bp_displayed_user_id();
        $user = get_userdata($user_id);
        $roles = $user->roles;
        if (!$roles)        return;
        if (!isset($wp_roles))        $wp_roles = new WP_Roles();
        $named_roles = array();
        foreach ($roles as $role) {
            $named_roles [] = $wp_roles->role_names[$role];    }
        if ($named_roles)        return '<span class="user-role activity">' . join(', ', $named_roles) . '</span>';
    }
    add_filter('eo_title_content_html_below_title', 'devb_show_role_on_profile');

    This works and show it in the cover page of the profile.
    the problem is in the other pages like group or other page out of my profile (when i open it) this error appear in the cover page:
    NOTICE: TRYING TO GET PROPERTY ‘ROLES’ OF NON-OBJECT IN

    I tried with !null but it didnt work.
    Any suggest?
    Thanks!!


    jennifersanchez
    Participant

    @jennifersanchez

    Hello! Thank you! I would want that the role of user to be shown on the cover of the page.
    or you want to say that it does and my theme does not interpret it? Can i put this in the header.php?


    jennifersanchez
    Participant

    @jennifersanchez

    I tried with this and it dont works

    global $bp;

    $hmag_inbox_count = messages_get_unread_count();

    echo ‘<span class=”mobile-menu-builder–links mobile-menu-builder–link-2 “>’.$hmag_inbox_count.'</span>’;


    jennifersanchez
    Participant

    @jennifersanchez

    Hello! In the theme that I have installed I can only use Legacy Buddypress, is there any code where I can modify it? or css?
    Thank you very much for the response!

Viewing 14 replies - 1 through 14 (of 14 total)
Skip to toolbar