Forum Replies Created
-
I’d also be interested to know how scalable BuddyPress is…? Never really tested it past a few thousand members.
Hi @mercime
The thread example I posted “username/messages/view/30/” can actually have more than two members. Conversations can have lots of members.
Obviously I can tell if the last message in the thread was sent to me by looking at it. I wanted to know how to check programatically. Sorry if I didn’t make that obvious. 🙂
Hi @mercime,
Apologies, let me explain..
If you see the message listed there then the message was sent
A private message thread can end up with many messages. Some of the messages in the thread were sent by you to a site member and some of the messages in the thread were received by you (sent to you by a site member).
I am interested in the very last message in the thread. How can I tell if that very last message was sent to me from somebody else or sent by me to somebody else?
Hope that helps?
In reply to: [Resolved] Disable 'activate' pageYep, I wrote a function to do redirect users away from it. You can add this to your theme’s functions.php
function bp_redirect_away_from_activate() { global $bp; if ( bp_is_activation_page() ) { wp_redirect( $bp->loggedin_user->domain ); exit(); } } add_action('wp','bp_redirect_away_from_activate');In reply to: BP Album – dont work@la-lena it is probably worth posting in the plugin’s support forum. That way one of the staff at rtCamp will be able to respond. They’ve just released v3.0 (is a bit buggy at the moment but their developers release bug fixes super quick)
http://rtcamp.com/groups/buddypress-media/forum/
@modemlooper is also a top dev, try his plugin too.
In reply to: BP Album – dont workBuddyPress Media (soon to be rtMedia) is great for albums. You could give that a try. It works very well for me and is actively supported by the development team.
Never used BP Album myself, perhaps try posting in the plugin’s support forum if you need to get that working.
In reply to: Crazy and yet simple questionThe demo used to be at testbp.org but it’s no longer available.
In reply to: Remove Public Message Button@chouf1 / @bphelp wrote a function to remove the button in this thread:
https://buddypress.org/support/topic/remove-public-message-button-in-child-theme/
In reply to: Change language to HebrewThe language translation page has info that might be useful:
https://codex.buddypress.org/user/translations/
Also see this page for translating WordPress:
In reply to: author nameSo you want to replace fullname “John Doe” with username “johndoe93”? Do you need to make the change sitewide?
r-a-y (BP core developer) has built a plugin for that:
https://wordpress.org/plugins/buddypress-usernames-only/Hugo beat me to it 🙂
Ah yes, my bad. BP forums was pre 1.6.5. The bbPress plugin is different.
This may help you move everything across:
https://codex.buddypress.org/user/buddypress-site-administration/migrating-from-old-forums-to-bbpress-2/‘BuddyPress forums’ is bbPress (as far as i know)!
In reply to: show header item when user not login in buddypressYour code is outputting the exact same line of code to both logged in users and logged out users:
do_action( 'bp_member_header_actions' );The idea of an ‘if’ statement is to output different code based on certain criteria being met.
In reply to: show header item when user not login in buddypressit should work, I have used this approach many times.
In reply to: show header item when user not login in buddypressI’m not sure what you’re asking exactly but take a look at this:
<?php if ( is_user_logged_in() ) { // whatever you put here will be displayed if the user is logged in } else { // whatever you put here will be displayed when logged out } ?>In reply to: show header item when user not login in buddypress‘Add friend’ and ‘send private message’ aren’t supposed to display when a user is logged out. For example, how would BuddyPress know who the friend request came from? How would BP know who the private message came from?
In reply to: Adding extra field data to Members DirectoryI wasn’t going to suggest you use bp-default, in fact I was going to suggest a switch from it. As @hnla mentioned, 1.7 introduced a template hierarchy which will allow your developers much more flexibility when working with BP. Watch for the 1.8 release – it introduces an even more advanced template hierarchy (the dev and testing teams are working on it as we speak) which will make adding job title and company to the members directory even easier as you’ll be able to create a template for that specific page.
In reply to: too many redirectsTry to get as many details from the client as you can. Browser, version and so on. Then perhaps try again using their exact environment. Might help you replicate the issue.
@shanebp nice approach targeting the array item, didn’t think of that!
In reply to: Adding extra field data to Members DirectoryAre you using the bp-default template or the newer template hierarchy method?
If you add this to your theme’s functions.php it will basically filter the entire button. You’ll then be free to modify whatever you need:
//filter group button function bp_change_group_button( $button ) { global $groups_template; if ( empty( $group ) ) $group =& $groups_template->group; if ( !is_user_logged_in() || bp_group_is_user_banned( $group ) ) return false; // Group creation was not completed or status is unknown if ( !$group->status ) return false; // Already a member if ( isset( $group->is_member ) && $group->is_member ) { // Stop sole admins from abandoning their group $group_admins = groups_get_group_admins( $group->id ); if ( 1 == count( $group_admins ) && $group_admins[0]->user_id == bp_loggedin_user_id() ) return false; $button = array( 'id' => 'leave_group', 'component' => 'groups', 'must_be_logged_in' => true, 'block_self' => false, 'wrapper_class' => 'group-button ' . $group->status, 'wrapper_id' => 'groupbutton-' . $group->id, 'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ), 'link_text' => __( 'Leave Group', 'buddypress' ), 'link_title' => __( 'Leave Group', 'buddypress' ), 'link_class' => 'group-button leave-group', ); // Not a member } else { // Show different buttons based on group status switch ( $group->status ) { case 'hidden' : return false; break; case 'public': $button = array( 'id' => 'join_group', 'component' => 'groups', 'must_be_logged_in' => true, 'block_self' => false, 'wrapper_class' => 'group-button ' . $group->status, 'wrapper_id' => 'groupbutton-' . $group->id, 'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ), 'link_text' => __( 'Join Group', 'buddypress' ), 'link_title' => __( 'Join Group', 'buddypress' ), 'link_class' => 'group-button join-group', ); break; case 'private' : // Member has not requested membership yet if ( !bp_group_has_requested_membership( $group ) ) { $button = array( 'id' => 'request_membership', 'component' => 'groups', 'must_be_logged_in' => true, 'block_self' => false, 'wrapper_class' => 'group-button ' . $group->status, 'wrapper_id' => 'groupbutton-' . $group->id, 'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_request_membership' ), 'link_text' => __( 'Request Membership', 'buddypress' ), 'link_title' => __( 'Request Membership', 'buddypress' ), 'link_class' => 'group-button request-membership', ); // Member has requested membership already } else { $button = array( 'id' => 'membership_requested', 'component' => 'groups', 'must_be_logged_in' => true, 'block_self' => false, 'wrapper_class' => 'group-button pending ' . $group->status, 'wrapper_id' => 'groupbutton-' . $group->id, 'link_href' => bp_get_group_permalink( $group ), 'link_text' => __( 'Request Sent', 'buddypress' ), 'link_title' => __( 'Request Sent', 'buddypress' ), 'link_class' => 'group-button pending membership-requested', ); } break; } } return $button; } add_filter( 'bp_get_group_join_button', 'bp_change_group_button' );Looks like you’re on the right track. The do_action will execute a particular function. However, the statements inside that function build a button. It is these statements you’d need to change if you want to modify the button.
Filters CHANGE stuff.
So are you trying to change the new topic button or the group join button? These buttons are filterable using:
bp_get_group_join_buttonand
bp_get_group_new_topic_buttonDoes this put help put you on the right track?
In reply to: Private Message Button in Member List LoopI’m still scratching my head with this one. It must be my install playing games. In the end I got it working with
Anyway I thought why not just build the link and throw it directly in the friends template?
In reply to: Create GroupOnce logged in as a member, try navigation to the Groups area. You’ll then be given the opportunity to create a new group.