Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private message button'

Viewing 25 results - 151 through 175 (of 331 total)
  • Author
    Search Results
  • evitorino
    Participant

    My wordpress is 4.1 and Buddypress 2.1.1

    Hello Community,

    I am having a problem with a custom member page pagination, when clicking link to pagination page 2, pagination takes us to page 2 and adds the string “?upage=2” to the site URL.

    After that, clicking page 1 or back symbol on pagination links does nothing, only refreshes page.

    Problematic page: http://wp1.kodeserver.net/coach/
    I have set the page above in Twentyfifteen theme as to exclude any third party theme related errors.

    If we use the default member page “http://wp1.kodeserver.net/members/” then pagination works ok.

    I believe the error might be caused by the member filter i made or maybe i messed up the template.

    Hope you can help.

    Below is the code i am using:

    functions that i use to filter member loop by member types on the site:

    function bp_exclude_users_but_player() {
    $excluded_users_but_player = implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_player;
    }

    function bp_exclude_users_but_coach() {
    $excluded_users_but_coach = implode(',',get_users('role=player&fields=ID'));
    //$excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_coach;
    }

    function bp_exclude_users_but_senior_coach() {
    $excluded_users_but_senior_coach = implode(',',get_users('role=player&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_senior_coach;
    }

    function bp_exclude_cc_backend_users() {
    $excluded_cc_backend_users = implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_cc_backend_users;
    }

    Member Loop that calls member “Coach” filter:
    <?php if ( bp_has_members( bp_ajax_querystring( 'members').'&exclude='.bp_exclude_users_but_coach().'&per_page=24' ) ) : ?>

    And this is the problematic page template code (The one that filters by role type (coach))

    <?php
    /**
    * The template for displaying all pages
    *
    * This is the template that displays all pages by default.
    * Please note that this is the WordPress construct of pages and that
    * other 'pages' on your WordPress site will use a different template.
    *
    * @package WordPress
    * @subpackage Kleo
    * @since Kleo 1.0
    */

    get_header(); ?>

    <?php get_template_part('page-parts/general-title-section'); ?>

    <?php get_template_part('page-parts/general-before-wrap'); ?>

    <?php
    if ( have_posts() ) :
    // Start the Loop.
    while ( have_posts() ) : the_post();
    /*
    * Include the post format-specific template for the content. If you want to
    * use this in a child theme, then include a file called called content-___.php
    * (where ___ is the post format) and that will be used instead.
    */
    get_template_part( 'content', 'page' );
    endwhile;
    endif;
    ?>

    <?php do_action( 'bp_before_directory_members_page' ); ?>
    <section class="container-wrap main-color">
    <div class="section-container container">

    <div id="buddypress">

    <?php do_action( 'bp_before_directory_members' ); ?>

    <?php do_action( 'bp_before_directory_members_content' ); ?>

    <!--<div id="members-dir-search" class="dir-search" role="search">
    <?php //bp_directory_members_search_form(); ?>
    </div>--><!-- #members-dir-search -->

    <?php do_action( 'bp_before_directory_members_tabs' ); ?>

    <form action="" method="post" id="members-directory-form" class="dir-form">

    <div id="subnav" class="item-list-tabs" role="navigation">

      <!--<li class="selected" id="members-all">"><?php //printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?>--> <!--Contatore membri totali-->

      <?php //if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
      <!--<li id="members-personal">"><?php //printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>-->
      <?php //endif; ?>

      <?php //do_action( 'bp_members_directory_member_types' ); ?>

      <?php //do_action( 'bp_members_directory_member_sub_types' ); ?>

      <!--<li id="members-order-select" class="last filter">
      <label for="members-order-by"><?php //_e( 'Order By:', 'buddypress' ); ?></label>
      <select id="members-order-by">
      <option value="active"><?php //_e( 'Last Active', 'buddypress' ); ?></option>
      <option value="newest"><?php //_e( 'Newest Registered', 'buddypress' ); ?></option>

      <?php //if ( bp_is_active( 'xprofile' ) ) : ?>
      <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
      <?php //endif; ?>

      <?php //do_action( 'bp_members_directory_order_options' ); ?>
      </select>
      -->

    </div><!-- .item-list-tabs -->

    <div id="members-dir-list" class="members dir-list">

    <?php

    /**
    * BuddyPress - Members Loop
    *
    * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter()
    *
    * @package BuddyPress
    * @subpackage bp-legacy
    */

    ?>

    <?php if ( bp_has_members( bp_ajax_querystring( 'members').'&exclude='.bp_exclude_users_but_coach().'&per_page=24' ) ) : ?>

    <div id="pag-top" class="pagination">
    <div class="pag-count" id="member-dir-count-top">
    <?php bp_members_pagination_count(); ?>
    </div>
    <div class="pagination-links" id="member-dir-pag-top">
    <?php bp_members_pagination_links(); ?>
    </div>
    </div>

    <?php do_action( 'bp_before_directory_members_list' ); ?>

    <ul id="members-list" class="item-list row kleo-isotope masonry">

    <?php while ( bp_members() ) : bp_the_member(); ?>

    <?php $user_info = get_userdata(bp_get_member_user_id()); ?>
    <?php
    $user_roles = $user_info->roles;
    $user_role = array_shift($user_roles);

    // echo 'User ID: ' . $user_info->ID . "\n";
    // echo bp_core_get_user_displayname( $user_info->ID ) ;
    // echo $user_info->ID ;
    ?>

    <li class="kleo-masonry-item type-<?php echo $user_role; ?>">

    ID ; ?>' value='show/hide'> <!-- link che apre info's nascoste -->

    <div class="member-inner-list animated animate-when-almost-visible bottom-to-top">

    <div class="item-avatar rounded">
    <!--
    ">
    --> <?php bp_member_avatar( 'type=full&height=150&width=150' ); ?>
    <!--
    -->
    <?php //do_action('bp_member_online_status', bp_get_member_user_id()); ?>
    </div>
    <!-- "> -->
    <div class="item">
    <div class="item-title"><span class="loop-nome"><?php bp_member_name(); ?></span><span class="loop-cognome"><?php bp_member_profile_data( 'field=Cognome' ); ?></span></div>

    <!-- <?php if ( bp_get_member_latest_update() ) : ?>
    <span class="update"> <?php bp_member_latest_update(); ?></span>
    <?php endif; ?>
    -->
    <?php do_action( 'bp_directory_members_item' ); ?>

    <?php
    /***
    * If you want to show specific profile fields here you can,
    * but it'll add an extra query for each member in the loop
    * (only one regardless of the number of fields you show):
    *
    * bp_member_profile_data( 'field=the field name' );
    */
    ?>

    </div>

    </div><!--end member-inner-list-->
    <!-- link che apre informazioni nascoste -->
    <div id="contenuto-nascosto-<?php echo $user_info->ID ; ?>" class="hidden-infos">
    <div class="nascondi-infos">
    ID ; ?>' value='show/hide'>
    <i class="icon-cancel"></i>

    </div>
    <div class="unhidden-infos unhidden-infos-first ">
    <div class="item-avatar-small">
    ">
    <?php bp_member_avatar( 'type=full&height=50&width=50' ); ?>

    <?php do_action('bp_member_online_status', bp_get_member_user_id()); ?>
    </div>
    </div>
    <div class="unhidden-infos">
    <div class="item-title">
    ">
    <span class="loop-nome"><?php bp_member_name(); ?></span>

    ">
    <span class="loop-cognome"><?php bp_member_profile_data( 'field=Cognome' ); ?></span>

    </div>
    </div>
    <div class="unhidden-infos">
    <span class="nomeazienda-titolo custom-title">Azienda:</span>
    <span class="nomeazienda custom-infos"><?php bp_member_profile_data( 'field=Azienda' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="pos-lavorativa-title custom-title">Funzione:</span>
    <span class="pos-lavorativa custom-infos"><?php bp_member_profile_data( 'field=Funzione' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="settore-title custom-title">Settore:</span>
    <span class="settore custom-infos"><?php bp_member_profile_data( 'field=Settore' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="laurea-title custom-title">Laurea:</span>
    <span class="laurea custom-infos"><?php bp_member_profile_data( 'field=Laurea' ); ?></span>
    </div>

    <div class="action">

    <div class="generic-button" id="send-private-message">
    " title="Clicca per profilo completo" class="send-message">Profilo Completo
    </div>

    <?php //do_action( 'bp_directory_members_actions' ); ?>

    </div>
    </div>

    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery('#nascondi-mostra-<?php echo $user_info->ID ; ?>').live('click', function(event) {
    jQuery('#contenuto-nascosto-<?php echo $user_info->ID ; ?>').toggle('show');
    });
    });
    </script>

    <?php endwhile; ?>

    <?php do_action( 'bp_after_directory_members_list' ); ?>

    <?php bp_member_hidden_fields(); ?>

    <?php else: ?>

    <div id="message" class="info">
    <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
    </div>

    <?php endif; ?>

    <?php do_action( 'bp_after_members_loop' ); ?>

    </div><!-- #members-dir-list -->

    <?php do_action( 'bp_directory_members_content' ); ?>

    <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>

    <?php do_action( 'bp_after_directory_members_content' ); ?>

    </form><!-- #members-directory-form -->

    <?php do_action( 'bp_after_directory_members' ); ?>

    </div><!-- #buddypress -->

    </div>
    </section>

    <?php do_action( 'bp_after_directory_members_page' ); ?>

    <?php get_template_part('page-parts/general-after-wrap'); ?>

    <?php get_footer(); ?>

    #233545
    ARCangelGIRL
    Participant

    Thank you for your answers! Looks like that I did not describe clear what is my problem, because what I tried from you suggestions it did not work.

    There is the code that I’m using to generate “Give a point” button”

    function one_star_points() {
    	if ( ! function_exists( 'mycred' ) ) return;
    	$current_id = get_current_user_id();
    	$profile_id = bp_displayed_user_id();
    	if ( $current_id == $profile_id ) return;
    	echo '<div class="award-star-rating-img">';
    	echo do_shortcode( '[mycred_send to="' . $profile_id . '" amount="1" ref="tip" log="Tipping"]Give a point[/mycred_send]' );
    	echo '</div>';
    }
    add_action( 'one_star_points_button', 'one_star_points' );

    To give points in user profile I used $profile_id = bp_displayed_user_id();
    To give points in forum I used $profile_user_id = bbp_get_reply_author_id();

    But i bumped into a problem when I want to give points to user in activity stream. I placed the button near every activity stream entry, so the user could give a point if the like what other user posted in activity stream. I used this code $profile_video_id = bp_get_activity_user_id(); There is no error or warning, but it’s not working, not giving points.

    Also I would like to give a point if I like private message answer that other user send me. I used this $profile_message_id = bp_get_the_thread_message_sender_id() ;, but it says that “Missing the recipient for this shortcode.”.

    Looks like that in the last two cases (activity stream and messages) something is wrong with indicating user id.
    Any recommendations on this? I have tried many functions, but still can’t grab user ID in those last two..

    #233180
    airsid
    Participant

    Hello,

    On event page, I need to add a button that link to compose message so event’s organizer can invite others users to his event.
    After looking for hours on the web, i’ve found this old topic but it seems that the code shown in is not good anymore as i get a white page when copying it in my fuction.php child theme.
    Is there someone that could help me with this issue ?
    Thanks a lot.

    #231757
    sufyan_hassan
    Participant

    Hello 🙂
    Is there any short-code for Profile buttons such as (Add Friend and Private Message) ?
    because i want to insert these buttons in another page :3

    #231597
    Henry Wright
    Moderator

    @dainismichel

    When in doubt, back up your database! You’ve probably heard that lots of times but in situations like this where the outcome is uncertain, it is definitely worth being prudent.

    searched a bit and apparently, the word on the forum-street is: there is no way to delete PM except through the DB. is that still true?

    Are you referring to an individual private message, or a whole thread? There should definitely be a way to delete an entire thread via the front-end. It will depend on your theme but by default, there should be a delete button available.

    Hi,

    I just noticed that after Updating one of my site to 2.1.1, Private Message Button is now showing on My own Profile which is very weird.

    Please how can I solved this problem, have searched google and couldnt find anything.

    Am using Latest wordpress and Latest Buddypress.

    Thanks
    AB

    #229735
    elpix
    Participant

    I’ve found by myself 🙂

    To send HTML private message, you must add :
    [
    edited – Please use the ‘code’ button when you post code.
    Please note that removing that filter creates a major security risk.
    It means user input WILL NOT BE SANITIZED.
    So some very bad things can happen to your database.

    ]
    remove_filter( 'messages_message_content_before_save', 'wp_filter_kses', 1);

    To the bp-custom.php file.

    I hope it will helps !

    Tiger007xy
    Participant

    The Private Message Button only appears, if an user is logged out. If he is logged in, only the Public Message Button is displayed anymore.

    #191883
    Julia_B
    Participant

    I hope it’s OK to post something like this…

    I’m brand new to Buddypress and not a professional developer. I’m moving a community from a Facebook group to my new Buddpress site. A lot of my members are not very net-savvy and are unfamiliar with how other community sites/forums work. So, I’m trying to offer familiar functions that they’ve seen on Facebook. The forum is going to be the main hub of the site, so I need to get it look good and easy to use.

    Set up has gone well do far, but the forum is just looking a bit dull.

    Is there a better way I can display the forum to show the activity?

    Are there any other plugins or shortcodes people would recommend to make the forums as similar as possible to what my members have been used to in the Facebook group? (I’m only just getting to grips with shortcodes, so I’m afraid I’d need pretty basic instructions)

    I have a Latest Activity feed on the site homepage which shows all activity:
    This looks a bit more compelling than the forum page, but it would be nice if it could have things like reply buttons or ‘Go to forum’ to make it more obvious how people can get in the conversations.

    I’m also having trouble getting the Private Message function set up. I do have it selected in Buddypress settings, but it’s not working (error page comes up). Any ideas?

    Just one more thing, people are getting confused about how to @mention each other due to @names being different from the usernames which appear under member’s profile photos. Because my members are used to a Facebook group they expect to be able to @ message using user names. At the moment, as a temporary work around, I’ve installed some shortcode which displays the @name below the user name, but it’s not ideal (and also seems to display the ip address which I don’t like):

    Suggestions on all of the above would be great and anything else I can do to make my site’s community elements more similar to Facebook really. Thanks. 🙂

    godavid33
    Participant

    BP 2.0.2
    WP 3.9.2

    Whenever I use the “Private Message” button from a user’s profile, I am taken to a URL like the following:

    http://mysite.com/members/myname/messages/compose/?r=recipientname&_wpnonce=9bbf44fdf9

    (obviously, with the correct data)

    When I send the message, I am shown a screen like the following:

    View post on imgur.com

    The message sends correctly, but to someone who isn’t the one coding the website, this would be extremely offputting and gives no success or error message so the user would have no clue if the message is actually sent!

    The wp_nonce seems to be the problem, though I’m not sure why as it is default behavior. If I go to the compose page and manually input the recipients username, it works correctly. Please halp 🙁

    #186959
    akovia
    Participant

    1. Which version of WordPress are you running?
    Latest
    2. Did you install WordPress as a directory or subdomain install?
    Directory
    3. If a directory install, is it in root or in a subdirectory?
    Root
    4. Did you upgrade from a previous version of WordPress? If so, from which version?
    N/A
    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.
    N/A
    6. Which version of BP are you running?
    Latest
    7. Did you upgraded from a previous version of BP? If so, from which version?
    N/A
    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    N/A
    9. Are you using the standard BuddyPress themes or customized themes?
    Custom
    10. Have you modified the core files in any way?
    No
    11. Do you have any custom functions in bp-custom.php?
    No
    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
    Not using bbpress anymore
    13. Please provide a list of any errors in your server’s log files.
    N/A
    14. Which company provides your hosting?
    Dedicated server
    15. Is your server running Windows, or if Linux; Apache, nginx or something else?
    Linux with Nginx

    Fanart.tv

    I am unable to figure out how to forward a message. I’ve searched Google and this site for some information unsuccessfully. I did find some people asking to have this added as a feature, or ask how to do it, but there have been no answers.

    From what I read here:

    "Private Messages
    
    Private Messaging works like an internal site email. Members can message people on their friends list as well as forward and reply to received messages. Each member will have their own individual Inbox and Sent messages folders as well as a Compose message screen. Members will be notified of new messages by a new message count in own Messages tab, in notification circle in Admin toolbar, as well as receive email notifications of the private message, if enabled."

    It is clearly stated that this is a feature that is already there, but on our site we have no button for forwarding messages. Only replies.

    Could someone clear this up or help troubleshoot the problem?

    I would also like to know if there is a way to disable the “feature” that only allows you to message people on your friends list? Instead, I’d like everyone to have the ability to start typing a name in the “TO” field and have the the auto-matching feature enabled so you can select from the list.

    #186525
    b2marketing
    Participant

    Thanks Henry. Will download the plugin and see if it works with some other customisations I got. It might not so that is why I am looking at doing this filter thing similar to this code I am trying to get to work.

    function override_button() {
    return apply_filters( ‘bp_get_send_private_message_link’, wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/compose/test/?r=’ . bp_core_get_username( bp_displayed_user_id() ) ) );

    }
    add_filter(‘bp_get_send_private_message_link’,’override_button’);

    #186523
    b2marketing
    Participant

    Hi

    I want to create a #link in the “private message” button/link that is on the profile page. So when people click on the “private message” button they are taking down to the compose form. This is a nice thing for user on iPhone. It is a little weird to click “private message” and then all mobile users are seeing is their avatar. So I wanted to create a #link.

    My problem is that BuddyPress does not pick my custom bp-messages-template.php in my childtheme/buddypress/bp-messages/bp-messages-template.php. Cannot I not move this file over or is it only legacy folder I can move to my child theme?

    If I can’t is there anyway to change the below filter for the message link and paste that into my function.php?

    function bp_send_private_message_link() {
    echo bp_get_send_private_message_link();
    }
    function bp_get_send_private_message_link() {

    if ( bp_is_my_profile() || !is_user_logged_in() )
    return false;

    return apply_filters( ‘bp_get_send_private_message_link’, wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/compose/?r=’ . bp_core_get_username( bp_displayed_user_id() ) ) );
    }

    I want to add #messageform to the end of the link.

    I am not super skilled at using filters.

    Thanks
    Philip

    #186452
    msegroves
    Participant

    I’m getting emailed notices that I have received messages and replies to my posts in the Activity Stream but when I go to look for the items that are being referred to they aren’t there. I have no idea where to start looking for this one.

    I’m running WP 3.9.2 and BP 2.0.2, bbP 2.5.4. Using BuddyBoss Theme 3.3.2. the site is http://www.buttonwoodfriends.com which is locked down with jonradio Private Site 2.11.2.

    pardo_bsso
    Participant

    Hi all,
    I’m using BuddyPress 2.0.2 on top of WordPress 3.9.2, running on Linux.

    The problem I’m trying to solve is that for some themes (specially, ) when viewing a profile ( http://mysite/members/some_username ) the buttons like “Add Friend” or “Send Private Message” do not appear.

    I kind of worked around it adding an action to bp_member_header_actions and calling bp_get_button passing block_self=>false, the rest of the arguments copied from BuddyPress internals.

    What I’ve found so far is that within that action bp_get_member_user_id() always returns the logged in user if using that theme (looking at line 1904 of bp-core/bp-core-classes.php ).

    Inspecting the code of bp_get_member_user_id (line 385 of bp-members/bp-members-template.php ) $members_template is NULL when using the stock WordPress themes (so that function returns false, the check inside BP_Button passes and I have them) but on the one I’d like to use it is a populated object.

    I’m blaming this on the theme but that behavior puzzles me.

    Any thoughts?

    intristin
    Participant

    My Site is http://outwire.net/

    I’m using the latest wordpress/buddypress with the following mods:

    bbpress
    BuddyPress Activity Plus
    BuddyPress MyMood
    BuddyPress Wall

    Ok, I’m also using a non related chat app called cometchat, I’m trying to integrate the two a little better. I want to do this: http://www.cometchat.com/documentation/developers-api/javascript-api/chatwith/

    It’s pretty straight forward, instead of a link I want a button that matches the other contact buttons. I want to add it after the “Public Message” “Private Message” buttons on the main profile page but I can’t for the life of me find correct file to edit. Can someone smart point me in the correct direction? Here is a direct link to a user profile to see what I mean…

    http://outwire.net/members/testuser/

    sangramghatage
    Participant

    Hi Guys,

    I Want to Add new button named ‘Work With’ similar to ‘Add Friend’ in Member Header. I want to implement a function similar to Add friend using this button. When logged in User will Click this button on Other Member’s profile; It will mean logged in user is interested to work with that member.

    Currently I have written function code in a plugin. But problem is that I am unable to add button on profile. I want to place this button next to ‘Private Message’ button. and when that button is clicked my function should be triggered. Please help me add button on Profile.
    I am not using any custom theme. I am using default twentyfourteen theme. Someone please help; its very urgent.

    #182636
    modemlooper
    Moderator

    change whatever you want in the arguments

    function filter_send_message_btn() {
    
    		$args = array(
    			'id'                => 'private_message',
    			'component'         => 'messages',
    			'must_be_logged_in' => true,
    			'block_self'        => true,
    			'wrapper_id'        => 'send-private-message',
    			'link_href'         => bp_get_send_private_message_link(),
    			'link_title'        => __( 'Send a private message to this user.', 'buddypress' ),
    			'link_text'         => __( 'Private Message', 'buddypress' ),
    			'link_class'        => 'send-message',
    		);
    
    		return $args;
    
    }
    add_filter('bp_get_send_message_button_args', 'filter_send_message_btn');
    adamt19
    Participant

    It looks like bp_get_send_message_button is reserved for private messages only, and returns a filtered result of bp_get_button according to some private-message-specific parameters.

    I’d like to remove the term “Private” from the language, since it is the only kind of messaging I’m going to use, but with two additional requirements:

    1) I don’t want to deal with language files
    2) I want to keep the customization on this element of BP with the other customizations — i.e. in my functions.php

    It seems I cannot redefine bp_get_send_message_button in my functions.php. When I use an if (!function_exists.. my changes are ignored. When I remove the check, the conflict between the functions is fatal.

    How can I override the link_title and link_text without modifying BP core or using language files?

    function bp_get_send_message_button() {
    		// Note: 'bp_get_send_message_button' is a legacy filter. Use
    		// 'bp_get_send_message_button_args' instead. See #4536
    		return apply_filters( 'bp_get_send_message_button',
    			bp_get_button( apply_filters( 'bp_get_send_message_button_args', array(
    				'id'                => 'private_message',
    				'component'         => 'messages',
    				'must_be_logged_in' => true,
    				'block_self'        => true,
    				'wrapper_id'        => 'send-private-message',
    				'link_href'         => bp_get_send_private_message_link(),
    				'link_title'        => __( 'Send a private message to this user.', 'buddypress' ),
    				'link_text'         => __( 'Private Message', 'buddypress' ),
    				'link_class'        => 'send-message',
    			) ) )
    		);
    	}
    #182164
    djsteveo
    Participant

    I did some searches first, but have not found much.

    Has anyone created a “flag this”, “report user” “report abuse” kind of button thing for buddypress that works and is currently usable?

    I have seen things for admins to mark things as spam, but I think we all need a button for other users to click and report – anything from an activity stream post, to a private message, or a user, (media and or blog posts would be a bonus)

    I found: http://www.icoder.com/wordpress/buddypress/bp-abuse/

    but I doubt it works with any current wp / bp combo, and have no idea if it was even supposed to work in this manner. Since it is not in the official wp plugin depository I am not even going to mess with it.

    Certainly someone can put together some code to mix a “like button” kind of code with a “send info to admin” kind of thing.

    I think most of us need or will need something like this. I am trying to learn php right now, wish I could help with this!

    Any ideas?

    #179827
    Patryk
    Participant

    I have the same thing to me and not display private message button, etc

    Doremdou
    Participant

    I tried to create a shortcode to show the join/leave button using the buddypress-functions but can’t make it to work… 🙁
    What am I doing wrong?

    I would like a shortcode like this :

    [groupbutton name=”party1″]

    I tried with this code for a join button only at first:

    add_shortcode( 'groupbutton', 'groupbutton_check_shortcode' );
    
    function groupbutton_check_shortcode( $attr ) {
    
    	extract( shortcode_atts( array( 'name' => 'read' ), $attr ) );
    
    	$current_group_id = BP_Groups_Group::get_id_from_slug($name);
    	$group = groups_get_group( array( 'group_id' => $current_group_id ) );     
    		if(bp_loggedin_user_id()) {
    			if( 'public' == $group->status ) {
    				echo '<a id="group-' . esc_attr( $current_group_id ) . '" class="join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
    			}
    		}
    }

    I am not a developer at all so I dont understand everything but I am trying… :/
    Cant figure what I am doing wrong… and why it does not display anything at all.

    Thank you for your help and sorry for my bad english 🙂

    PS: I would like to use all cases of buttons like here on the buddypress-functions.php:

    function bp_legacy_theme_ajax_joinleave_group() {
    	// Bail if not a POST action
    	if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    		return;
    
    	// Cast gid as integer
    	$group_id = (int) $_POST['gid'];
    
    	if ( groups_is_user_banned( bp_loggedin_user_id(), $group_id ) )
    		return;
    
    	if ( ! $group = groups_get_group( array( 'group_id' => $group_id ) ) )
    		return;
    
    	if ( ! groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
    		if ( 'public' == $group->status ) {
    			check_ajax_referer( 'groups_join_group' );
    
    			if ( ! groups_join_group( $group->id ) ) {
    				_e( 'Error joining group', 'buddypress' );
    			} else {
    				echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
    			}
    
    		} elseif ( 'private' == $group->status ) {
    
    			// If the user has already been invited, then this is
    			// an Accept Invitation button
    			if ( groups_check_user_has_invite( bp_loggedin_user_id(), $group->id ) ) {
    				check_ajax_referer( 'groups_accept_invite' );
    
    				if ( ! groups_accept_invite( bp_loggedin_user_id(), $group->id ) ) {
    					_e( 'Error requesting membership', 'buddypress' );
    				} else {
    					echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
    				}
    
    			// Otherwise, it's a Request Membership button
    			} else {
    				check_ajax_referer( 'groups_request_membership' );
    
    				if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
    					_e( 'Error requesting membership', 'buddypress' );
    				} else {
    					echo '<a id="group-' . esc_attr( $group->id ) . '" class="membership-requested" rel="membership-requested" title="' . __( 'Membership Requested', 'buddypress' ) . '" href="' . bp_get_group_permalink( $group ) . '">' . __( 'Membership Requested', 'buddypress' ) . '</a>';
    				}
    			}
    		}
    
    	} else {
    		check_ajax_referer( 'groups_leave_group' );
    
    		if ( ! groups_leave_group( $group->id ) ) {
    			_e( 'Error leaving group', 'buddypress' );
    		} elseif ( 'public' == $group->status ) {
    			echo '<a id="group-' . esc_attr( $group->id ) . '" class="join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
    		} elseif ( 'private' == $group->status ) {
    			echo '<a id="group-' . esc_attr( $group->id ) . '" class="request-membership" rel="join" title="' . __( 'Request Membership', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_send_membership_request' ) . '">' . __( 'Request Membership', 'buddypress' ) . '</a>';
    		}
    	}
    
    	exit;
    }
    
    /**
     * Close and keep closed site wide notices from an admin in the sidebar, via a POST request.
     *
     * @return mixed String on error, void on success
     * @since BuddyPress (1.2)
     */
    function bp_legacy_theme_ajax_close_notice() {
    	// Bail if not a POST action
    	if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    		return;
    
    	if ( ! isset( $_POST['notice_id'] ) ) {
    		echo "-1<div id='message' class='error'><p>" . __( 'There was a problem closing the notice.', 'buddypress' ) . '</p></div>';
    
    	} else {
    		$user_id      = get_current_user_id();
    		$notice_ids   = bp_get_user_meta( $user_id, 'closed_notices', true );
    		$notice_ids[] = (int) $_POST['notice_id'];
    
    		bp_update_user_meta( $user_id, 'closed_notices', $notice_ids );
    	}
    
    	exit;
    }
    devlopez
    Participant

    Hello

    I need to send private messages clicking a button, is there a way in buddypress code or I need to implement it?

    <script>
      var $ = jQuery;
      $(function() {
        
        $('input[id=mybutton]').click (function ()
        {         
          $.post( "¿¿¿???", function( data ) {
             //Message sent!
          });
        }); 
      });
    </script>
    

    In other hand.

    Is there a way already done in buddypress to show a form with the subject and the content to send a message? Any shortcode or something like this:

    
    <?php
    show_message_form()
    ?>
    

    Thank you very much.

    #178025
    dhaine
    Participant

    Hello

    WP 3.8
    BP 1.9.2
    Friends and private message buttons disappeard.
    It was working fine with 1.7
    I know it’s an issue related to my custom theme, the buttons are fine with default themes.
    Any idea what I can do ?
    I think it’s related to this buddypress bug :
    https://buddypress.trac.wordpress.org/ticket/5170
    I have some buddypress calls in my header, which makes the rest of the calls not working.
    I’m not a dev but I know how to edit files.
    I tried to edit the files from the changhes in the patch that it didn’t work out, maybe it was me who did not do it correctly
    My custom theme developer is looking into it but it’s a pro team and they are very busy, if I can do it myself maybe it would be nice 🙂 Any suggestions ? Should I try again to do the edit from patch2 ?

    http://www.warlegend.net/members/loloderp/

    #176237
    e-regular
    Participant

    Hello,

    I have just installed Buddypress 1.9 to my website http://plantswap.com.au and what used to be a great forum search tool no longer functions. When I click the submit button nothing happens.

    The reason I installed buddypress 1.9 is to allow users of my forum to private message each other. I read on a number of other topic posts here, JJJ said that the PM functionality was not available in BBPress.

    So my option now is either – I have no search functionality, or no PM functionality.

    I have tried to install a large number of plugins such as WP Ultimate Search, Relevanssi and BBPress Forum Search (and the extended forum search) but none of these works with the BBPress Forum search widget. Some of them do work with the blog side search but that is not what I want unfortunately.

    I have looked at Buddypress options/settings and none pertain to bbpress forum search engine.

    Cheers,
    Henry Gomez

Viewing 25 results - 151 through 175 (of 331 total)
Skip to toolbar