Hello,
I tried this with the private buddypress and private community plugins but Im having a problem with both plugins… when user types the url without the “www” they get ridirected to register page… I have been researching and trying for a week now and no luck…
is there a way to put a filter in buddypress so only homepage and register page are allowed for non logged in users?
HELP!
Okay, so I have a few groups that I don’t want to display. I’m using S2 Member so only groups a person belongs to will display in their group index regardless of group status (i.e. hidden, private).
I have code like this:
`
<?php if (bp_get_group_id() == 33 && !current_user_can ("access_s2member_ccap_xx")) {
continue;}
else {?>`
Display the group.
All it seemed to work before and now it seems not to. In any case, I can’t get bp_get_group_id() to return anything and I’m sure I’m missing something silly and small. I was just hoping someone might have a guess as to what’s not working there….
Thanks,
I reinstalled the forums and then created more groups (my first group was private). Now it works fine. So I have no idea what to tell you. This is a completely fresh install I did about an hour before I posted I was having the problem.
Try adding more groups and putting in some test posts. That’s what fixed mine. (When I reinstalled, I was still having the same problem until I added more groups.)
What BP version are you on? That issue has been fixed https://trac.buddypress.org/ticket/2759 to address deprecated notice if you’re on PHP 5.3+
== It shouldn’t need 33MB of RAM just to activate the plugin. ==
It depends on server configurations ultimately. I set up a BP install for a friend on a shared hosting plan with 32MB and it’s running well with a private community of 250+ members. Resolve the deprecated notices issues first and see if you still need to increase memory limit.
First thing’s first, if you want to have user-blog-URL’s as http://myname.mysite.com/ then you have to install BuddyPress in domain root http://mysite.com/ Otherwise, if you install BP in secondary site with a subdomain configuration, e.g. http://buddypress.mysite.com/, the glitch is that the user blogs created from the secondary site will turn out like http://myname.buddypress.mysite.com/
Reported here: https://trac.buddypress.org/ticket/1796
== 4. but when i do that , the links etc starts showing in the main site ==
Unless you put in code or widget for sitewide recent posts or for list of all blogs, then those links won’t show up in the home page of your main site.
== i only wants users to see once the login to community ==
Read through to the end of this related topic with solutions for the https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-make-a-private-community?topic_page=1&num=15
You should also add some type of nonce verification:
https://codex.wordpress.org/Function_Reference/wp_create_nonce
Reason is in your function anyone can send a Bzzt even if you’re not logged in if they know the correct URL schema.
Thanks for the pointer. Got the listener working.
Here it is, for other noobs…
`
function bp_send_private_bzzt() {
global $bp;
if ( $bp->profile->slug != $bp->current_component || ‘bzzt’ != $bp->current_action || ‘send’ != $bp->action_variables[0] )
return false;
$sender_id = $bp->action_variables[1];
$recip_id = $bp->action_variables[2];
$recip_name = htmlspecialchars(urldecode($bp->action_variables[3]));
$sender_name = $bp->loggedin_user->fullname;
$alert_message = “You just sent a BZZT! to ” . $recip_name;
bp_core_add_message( __( $alert_message, ‘buddypress’ ) );
$subject = $sender_name . ” just sent you a BZZT!”;
messages_new_message( array(‘sender_id’ => $sender_id, ‘subject’ => $subject, ‘content’ => “BZZT!”, ‘recipients’ => $recip_id ) );
bp_core_redirect( wp_get_referer() );
}
add_action( ‘wp’, ‘bp_send_private_bzzt’, 3 );
function bp_send_private_bzzt_link() {
echo bp_get_send_private_bzzt_link();
}
function bp_get_send_private_bzzt_link() {
global $bp;
if ( bp_is_my_profile() || !is_user_logged_in() )
return false;
$sender_id = $bp->loggedin_user->id;
$recip_id = $bp->displayed_user->id;
$recip_name = $bp->displayed_user->fullname;
return apply_filters( ‘bp_get_send_private_bzzt_link’, wp_nonce_url( $bp->displayed_user->domain . $bp->profile->slug . ‘/bzzt/send/’ . $sender_id . ‘/’ . $recip_id . ‘/’ . $recip_name . ‘/’) );
}
`
Right now, your function is coded so it runs whenever the function is called.
You need to create an action listening function at a predetermined slug so your function should run; or if you’re feeling really up to it, use ajax to send the request.
Check out any action function in BP for hints.
Here’s such an example to get you started:
https://trac.buddypress.org/browser/tags/1.2.8/bp-xprofile.php#L398
I need to add a button on single profile pages.
The button will send a private message to the user being viewed – but the message is preordained.
(It’s a promotional thing)
So we don’t want to go to a compose page – just send the message.
In member-header.php, I add a button:
`
<a href="” title=””>
`
In bp-custom, I add the functions:
`
function bp_send_private_grrr_link() {
echo bp_get_send_private_bzzzt_link();
}
function bp_get_send_private_bzzzt_link() {
global $bp;
if ( bp_is_my_profile() || !is_user_logged_in() )
return false;
return apply_filters( ‘bp_get_send_private_bzzzt_link’, bp_send_private_bzzzt() );
}
function bp_send_private_grrr() {
$subject = ” I just sent you a BZZT!”;
messages_new_message( array(‘sender_id’ => 1, ‘subject’ => $subject, ‘content’ => “BZZT!”, ‘recipients’ => 9) );
// sender_id & recipients hard-coded for testing
}
`
The above will send a message – But it does so as soon as a profile page is loaded.
How can I stop the message from being sent until the “Send a BZZZT!” button is clicked ?
@r-a-y put together a solution that worked for caching and private messaging https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/persistent-caching-and-private-messaging
Maybe this is in a similar family…
Thanks for your input Paul.
Howdy all,
I’m in the process of building a site around buddy press and am curious about the lifecycle of a group. Many of the groups on my site will revolve around time-based events. For example, there might be a group for “MLB 2011”. The group will be public at first. anyone can join and participate. But at some point after the end of the MLB 2011 season I’d want to shutdown the group.
I see that a group can be deleted. But I’d like to be able to lock/close/whatever a group to new activity while still being able to see the existing content of the group. In case we want to go back and mine it for lesson’s learned, etc.
I thought about making the group private, kicking everyone out except the admin and just leaving it in that state. That mostly works except that the content goes away from public view.
Any other ideas?
Thanks for the reply, all I had installed prior to the template pack was BP Private COmmunity so I am thinking that I do not have the correct plugin installed. What is the exact plugin name that I need to install so that the BP Template Pack will work? Thx 4 the reply by the way.
I created a private group to test something out and i had myself leave the group thus leaving it entirely empty. The group vanished from the listing but the group total remains 3 instead of 2. What can i edit to completely remove traces of this test private group?
yeah sure, doesn’t matter if it’s private or public. can you just show me how to fix the sidebar separator? the header thingy isn’t so important.
I’m afraid that you do need the services of a coder really, you can post in the jobs section for some help or as I said earlier try approaching the themes author which really you should try first as they wrote the theme know their code and how to adapt / modify it.
I’m afraid I no longer help privately on small jobs as they cost too much time, happy to help on support in public posts where I can though.
thanks but, tbh, i didn’t understand a thing you said there
can you make it a bit easier for me? or can you help me privately maybe? thankss!
Hi not-so-poor Programmer,
That stuff made my head spin. Exactly the reason why I became a poor designer. I kind of misunderstood the functionality as it seems, and so it is more to prevent dupes in the stream, and for hidden and private groups.
I think the functionality described by me will be extremely useful for bigger communities. I’d rather not start blocking certain types of Activity Stream items (https://wordpress.org/extend/plugins/buddypress-block-activity-stream-types/) and just show certain items to followers/friends only.
So if you could do something magical to make that happen.. I think a lot of bigger BP communities will be pleased. Or just turn it into a plugin! (HINT HINT LOUD NOISES)
This was an issue but it was attended to with a workaround by Boone with a little help from me ( well I discovered it
) it predates the favorite issue and shouldn’t be apparent but it’s a while since I looked.
I am using cometchat quite successfully and it works great with BP. It is a single-user sign in and pulls avatars and passwords from your wordpress/bp site. You can choose to have friend-to-friend chats or make public/ private rooms… You can also choose not to have it appear for non-logged in users. You can also have other modules like Wibya chat… I have had not one issue with it on my site. It is a little heavy for shared-hosting… if you have a VPS 512 Meg plus, you should be fine. It’s well worth the $49 U.S. dollars. They are working on version 3.0 and it should be out within the next 2 months, so it should be getting better (free upgrades for those of you within the year of your purchase).
Not aware of any current issues regarding this. We have fixed a situation where when a private group’s member could favourite an item, which then any other site member could view that single item by going to the group member’s profile and viewin their favourites. This is going to become BuddyPress 1.2.9 this weekend.
If you think you’ve found an issue, please consider any conflicts with other plugins (or by using any theme other than BP-Default) and give clear instructions how to recreate.
I am having the same issue… I’m not a super techie so can someone clarify whether there is some way around this now? I am using 1.2.8 and WP 3.1
Members are able to comment on so-called private forums. They appear in the normal flow of posts, but a further glitch: when you click their name you don’t go to their profile, you get redirected to the site homepage.
In case anyone else has the same issue, I switched to BuddyPress Private Community pluign and that seems to sort everything out fine.
@philsquires wait for 24 hours before bumping your topic.
You would need to create a plugin for that private diary/blog and look at how it’s done in BuddyPress Docs plugin.
Hi
I am looking to morph my BuddyPress site to allow each member to have a private diary/blog that allows them to share this ONL~Y with chosen friends
I have done quite a bit if searching without success and would appreciate any ideas for a solution please
Anyone running a BP site like this?
Phil