Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 1,926 through 1,950 (of 3,463 total)
  • Author
    Search Results
  • #135747
    kodestar
    Member

    Thanks so much for that, it’s used within a plugin so I used:
    `
    function bp_send_image_denied_message($sender_id, $recip_id, $subject, $message) {
    global $bp;
    if ( $thread_id = messages_new_message( array(‘sender_id’ => $sender_id, ‘subject’ => $subject, ‘content’ => $message, ‘recipients’ => $recip_id ) ) ) {
    bp_core_add_message( __( ‘Image Denied Message was sent.’, ‘buddypress’ ) );
    } else {
    bp_core_add_message( __( ‘There was an error sending that Private Message.’, ‘buddypress’ ), ‘error’ );
    }

    } `
    and pass the required bits, the only thing it’s not doing is adding a notification item, is there an easy way to add that?

    Again, thanks a lot, I would have spent ages trying to figure that out.

    #135744
    shanebp
    Moderator

    The function is messages_new_message()

    > when an image is denied an email is sent out to the user

    So you have a function or some code that does that, yes?
    Then you could use parts of the below in that code or call it as a function

    `

    function bp_send_image_denied_message() {
    global $bp;

    //check_admin_referer(message_check”); // adjust if needed

    $sender_id = $bp->loggedin_user->id; // moderator id ?
    $recip_id = $bp->displayed_user->id; // denied image user id ?

    if ( $thread_id = messages_new_message( array(‘sender_id’ => $sender_id, ‘subject’ => ‘Image Denied, ‘content’ => ‘why it was denied], ‘recipients’ => $recip_id ) ) ) {
    bp_core_add_message( __( ‘Image Denied Message was sent.’, ‘buddypress’ ) );
    bp_core_redirect( $bp->displayed_user->domain ); // adjust as needed
    } else {
    bp_core_add_message( __( ‘There was an error sending that Private Message.’, ‘buddypress’ ), ‘error’ );
    }

    }
    add_action( ‘wp’, ‘bp_send_image_denied_message’, 3 );
    `

    thirstcard
    Member

    Thanks once again Hugo, you always have the solution!

    I was doing the sort of digging you describe yesterday in fact and was able to find out how to add a “Follow” button which may interest users of Andy’s plugin BuddyPress Followers:

    bp_follow_add_follow_button( bp_displayed_user_id() );

    Paul Wong-Gibbs
    Keymaster

    I don’t think this is very easy to do, if at all. The reason being groups are pretty much hardcoded to three types of membership status: public, private, hidden. You could add some checks to only permit display of the activity list page, but you’d need to somehow keep track of if the user has “joined” the group.

    I say “joined” because the user will have already joined the group — but you need a secondary type of group membership. You could store such a setting in group meta.

    #135588
    Paul Wong-Gibbs
    Keymaster

    This is the first time I’ve ever heard anyone ask to send messages without a subject. It’s mandatory.

    As a workaround, you could edit the messages templates, and replace the input text box (for the subject) with a input type of “hidden”, and set value to something like e.g. “private message”. It’s not foolproof, as a smart user could still change the subject, but I get the impression you wouldn’t be that bothered in that case :)

    Hugo Ashmore
    Participant

    bp_member_add_friend_button() you would find that by looking in the bp-friends-tamplate.php and to find it was in that file meant looking at the members loop to see how the action buttons are handled and tracing the do_action handle back to that template file you’ll then realise ‘bp_member_add_friend_button()’ echoes bp_get_add_friend_button() with passed args so you then need to trace that function to see further how the friends button works.

    In the profile we trace back to functions.php and find ‘bp_add_friend_button()’ that traces to various files, bp-friends-template.php the one of interest again.

    thirstcard
    Member

    OK i have managed to find

    bp_send_private_message_link and bp_send_private_message_link()

    This covers points 1 and 3 above.

    Does anyone know if there is a template tag for Add Friend button?

    @mercime
    Participant

    Looks like JS hiding all the buttons from this test user – though I can see all those links in source.

    smackmathew
    Participant

    Thanks for replying

    1. here is a test user account. Username: user1 Password: user1

    2. Not sure where the public message button went, although my thoughts are that its also overlapping with the others. In this theme they’re not buttons, but text links. so you can see a bunch of text on top of text. if that makes sense.

    When you log into http://www.writerscubed.com the home page won’t have much on it. click on a user image to the right and you should see the jumbled text on the top right of the profile page.

    Thanks for your help it’s much appreciated

    #135547

    In reply to: Private profile fields

    John – have you resolved this question? I’m interested in doing the same thing… would be grateful for guidance if you’ve been able to achieve what you described.

    @mercime
    Participant

    == ‘cancel friendship’ & ‘private message’ buttons overlap each other ==

    1. If you want volunteers to actually check out the issue, please provide test user username and password which you can delete later.

    2. What happened to the ‘public message’ button which in bp-default theme shows up between ‘cancel friendship’ and ‘private message’ buttons?

    3. In all probability, you would just need to add styles in your theme’s style.css file. something like:
    `#item-buttons a { margin-right: 15px; }`
    The above will work in bp-default theme. No guarantees this will work on your theme.

    #135437
    Paul Wong-Gibbs
    Keymaster

    We should. Please make an enhancement ticket on https://buddypress.trac.WordPress.org/. You can use your username and password from this site.

    #135424
    Paul Wong-Gibbs
    Keymaster

    This was cross-posted on BP trac, and the answer was provided at https://buddypress.trac.wordpress.org/ticket/4232

    #135421
    @mercime
    Participant

    To put your issues in context
    WP/BP versions? Theme used? Plugins used? basically … https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/when-asking-for-support/

    #135419
    notpoppy
    Participant

    I was also surprised to discover that when a user is marked as a spammer, no action is taken to delete or hide the messages they have sent from users.

    When a user is marked as a spammer, surely Buddypress should prevent all other users from seeing messages they have sent? Can this be added to a future version?

    #135383
    ladydeeb4213
    Member

    I activated each plug in one by one and it seems as though the plug in cubepoints bp integration is giving the error. not sure why. when I first installed it worked fine.

    #135382
    ladydeeb4213
    Member

    I switched back to our theme all plugins disabled and it works but isnt lined correctly. must be a plugin

    #135381
    ladydeeb4213
    Member

    It works in the default theme with all but bp deactivated. It was working once with our theme so not sure whats up

    #135380
    ladydeeb4213
    Member

    wp 3.3.2, bp 1.5.5 nothing changed. was working one day came back a week or two later and it was not working. ok Once I do that what should I do.

    @mercime
    Participant

    @nickharambee Remove the BP Component Pages you want to make private from the custom menu https://codex.buddypress.org/extending-buddypress/how-to-set-up-your-main-site-navigation-using-the-built-in-wordpress-menus/

    Add the following to your theme’s or child theme’s functions.php file

    add_filter( 'wp_nav_menu_items', 'mme_loggedin_only_links' );
    function mme_loggedin_only_links($items) {
    if (!is_user_logged_in())
    return $items;
    else
    $ouractivity = '<li><a href="' . home_url('/') . 'activity' . '">' . __('Activity', 'buddypress' ) . '</a></li>';
    $ourmembers = '<li><a href="' . home_url('/') . 'members' . '">' . __('Members', 'buddypress' ) . '</a></li>';
    $ourgroups = '<li><a href="' . home_url('/') . 'groups' . '">' . __('Groups', 'buddypress' ) . '</a></li>';
    $ourgroupforums = '<li><a href="' . home_url('/') . 'forums' . '">' . __('Forums', 'buddypress' ) . '</a></li>';
    $items = $items . $ouractivity;
    $items = $items . $ourmembers;
    $items = $items  . $ourgroups;
    $items = $items . $ourgroupforums;
    return $items;
    }
    #135005
    @mercime
    Participant

    WP/BP versions? What have you changed recently in your installation? Change to bp-default theme and deactivate plugins except BuddyPress to start troubleshooting.

    #134958
    Nasir Zia
    Member

    Put If Condition around the code which display Group Join/Leave Button…

    Go to your Database and search in table groups_members… If current Logged in user id exists in that table, then the join of leave button will not appear to that logged in user…
    So there will be no need to set private groups.. it will only show the joining option to the members who have not joined any group…

    #134910

    When I say private domain, I just mean not on the WordPress servers.

    @mercime
    Participant

    @sonnyjitsu thanks for posting the issue/resolution :-)

    Sonny Parlin
    Member

    I figured out the problem, sendmail couldn’t find a qualified domain name, so I changed the hostname to be an actual hostname of the machine and all is good.

Viewing 25 results - 1,926 through 1,950 (of 3,463 total)
Skip to toolbar