Search Results for 'private'
-
AuthorSearch Results
-
June 13, 2012 at 11:25 pm #135747
In reply to: function to send a private message
kodestar
MemberThanks 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.
June 13, 2012 at 10:19 pm #135744In reply to: function to send a private message
shanebp
ModeratorThe 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 );
`June 8, 2012 at 11:46 pm #135593thirstcard
MemberThanks 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() );
June 8, 2012 at 10:51 pm #135590Paul Wong-Gibbs
KeymasterI 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.
June 8, 2012 at 10:43 pm #135588In reply to: Can’t send a message without a Subject
Paul Wong-Gibbs
KeymasterThis 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
June 8, 2012 at 1:30 pm #135581Hugo Ashmore
Participantbp_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.
June 8, 2012 at 11:06 am #135579thirstcard
MemberOK 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?
June 8, 2012 at 5:05 am #135563@mercime
ParticipantLooks like JS hiding all the buttons from this test user – though I can see all those links in source.
June 7, 2012 at 5:30 pm #135555smackmathew
ParticipantThanks 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
June 7, 2012 at 12:53 pm #135547In reply to: Private profile fields
differentflies
MemberJohn – 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.
June 6, 2012 at 2:37 am #135508@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.June 3, 2012 at 10:25 pm #135437Paul Wong-Gibbs
KeymasterWe should. Please make an enhancement ticket on https://buddypress.trac.WordPress.org/. You can use your username and password from this site.
June 3, 2012 at 4:42 pm #135424In reply to: Issues with Private Group Updates
Paul Wong-Gibbs
KeymasterThis was cross-posted on BP trac, and the answer was provided at https://buddypress.trac.wordpress.org/ticket/4232
June 3, 2012 at 4:06 pm #135421In reply to: Issues with Private Group Updates
@mercime
ParticipantTo 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/June 3, 2012 at 2:38 pm #135419notpoppy
ParticipantI 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?
June 2, 2012 at 2:12 am #135383In reply to: Private Messaging option suddenly not working
ladydeeb4213
MemberI 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.
June 2, 2012 at 2:07 am #135382In reply to: Private Messaging option suddenly not working
ladydeeb4213
MemberI switched back to our theme all plugins disabled and it works but isnt lined correctly. must be a plugin
June 2, 2012 at 2:06 am #135381In reply to: Private Messaging option suddenly not working
ladydeeb4213
MemberIt works in the default theme with all but bp deactivated. It was working once with our theme so not sure whats up
June 2, 2012 at 2:03 am #135380In reply to: Private Messaging option suddenly not working
ladydeeb4213
Memberwp 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.
May 26, 2012 at 5:12 pm #135093@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; }May 24, 2012 at 2:41 am #135005In reply to: Private Messaging option suddenly not working
@mercime
ParticipantWP/BP versions? What have you changed recently in your installation? Change to bp-default theme and deactivate plugins except BuddyPress to start troubleshooting.
May 23, 2012 at 7:55 am #134958In reply to: Allow users to join only one group?
Nasir Zia
MemberPut 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…May 21, 2012 at 8:49 pm #134910In reply to: Pictures not showing up.
davidshaw1985
MemberWhen I say private domain, I just mean not on the WordPress servers.
May 14, 2012 at 5:17 pm #134541@mercime
Participant@sonnyjitsu thanks for posting the issue/resolution
May 14, 2012 at 5:09 pm #134539Sonny Parlin
MemberI 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.
-
AuthorSearch Results