Hey @udarmo
Thanks for the report. Can you open a Trac ticket for this so it can be investigated?
https://buddypress.trac.wordpress.org/
I like your idea about calling a function from the php for the modal window.
Just FYI .. this is what I have set up for colorbox (which isn’t a real ajax call, you’ll see):
echo '<a class="ajax cboxElement launch-dashboard" href="' . get_stylesheet_directory_uri() . '/buddypress/members/single/dashboard.php?username=' . $row->username . '" title="Dashboard">Launch Dashboard</a>';
If you aren’t familiar with how colorbox works … note that the modal window is being enabled by simply adding the “ajax” class to the link … similar to how a lightbox popup works.
Ideally .. it’d be great if I didn’t have to call these 2 lines in my dashboard.php file either:
require("../../../../../../wp-blog-header.php");
require('../../../../../../wp-load.php');
It’s my understanding that this is a terrible approach anyways .. since the WordPress engine is supposed to be already loaded in the background (making it redundant).
So how would I implement something like what you’ve suggested? Could you show me an example, maybe? I’m assuming that if I don’t load the WordPress engine in my dashboard.php file, that I wouldn’t be able to call a function that’s been added to my functions.php file, right?
Here’s a dumb question. Should I maybe just place my dashboard.php file in a different location within my child theme directory structure, perhaps? I ask because I’m starting to think that I might need to treat this as a normal WordPress template file .. instead of a standalone PHP script. Any thoughts?
Dear R-A-Y,
Thank you for the support, appreciate it, and sorry I did not check google myself to find out you need to create bp-custom.php in case it does not exist yet.
It seems there is a conflict with my theme after extra review of my theme builders’ team.
Once they update the theme it hopefully works with the updated wordpress and buddypress. If I need your help afterwards, I will send a new request.
Only issue left is that I don’t know why the lines of coding don’t match in my buddypress version, I never changed code in the core buddypress files.
Thanks for the support,
Bart
VGVIDS
Hi,
I am trying to manipulate buddypress groups forum topic urls but did not get success, if someone could help, It will be really great. I have installed buddypress and bbpress activated groups module and allowed groups to own a forum.
Now the topics created under groups forum having URLs like :
<home_url>/groups/<group-slug>/forum/topic/<topic-slug>
The requirement is to remove /forum/topic from the url so it should be like,
<home_url>/groups/<group-slug>/<topic-slug>
Please help me if it is possible to do.
Wordpress Version – 4.4.1
Buddypress Version – 2.5.1
bbpress Version – 2.5.8
You’ll want to see a very similar thread to yours:
Template modification not shown on website
Hello! I have a Genesis Child Theme, I have added the folder structure from templates in the buddypress plugin, in this form, (in root of child theme: buddypress, groups, single, group-header.php. When I change out some code on thae group-header.php, nothing changes on the site.
I wanted to replace the <h2></h2> with <p></p> in these two places:
<?php if ( bp_group_is_visible() ) : ?>
<h2><?php _e( ‘Group Admins’, ‘buddypress’ ); ?></h2>
<?php bp_group_list_admins();
AND
do_action( ‘bp_before_group_menu_mods’ ); ?>
<h2><?php _e( ‘Group Mods’ , ‘buddypress’ ); ?></h2>
<?php bp_group_list_mods();
with :
<?php if ( bp_group_is_visible() ) : ?>
<p>Service Providers with a Background Check display the Shield icon
</p>
AND
<?php bp_group_list_admins();
do_action( ‘bp_before_group_menu_mods’ ); ?>
<p>Service Providers with a Background Check display the Shield icon
</p>
and I do not see any change, http://www.choresolution.com/groups/caregivers/
You can check the “Users > Pending Accounts” page in the WordPress admin dashboard. Then, you should be able to just delete them from there.
It might be worthwhile for BuddyPress to have a built-in script that removes pending accounts that are older than a month or so.
Also, just to get some clarity, would inactive users be causing BuddyPress to slow down all functions on my website, such as loading a member profile, or the activity page?
Not really.
If you indeed do have a popular website with many users that are concurrently logged in and performing operations, then this will slow down your site. You will need to utilize object caching plugins and the like (I believe WPEngine already has something built in for this). You might also need to consider upgrading your WPEngine plan.
We’re also thinking of doing some performance enhancements in the next version of BuddyPress that will decrease the amount of code that needs to run on non-BuddyPress pages.
Also, just to get some clarity, would inactive users be causing BuddyPress to slow down all functions on my website, such as loading a member profile, or the activity page? Because the entire site loads incredibly slow on every page, until I disable buddypress. Then it seems to function well.
Thank you both for your responses. My website is quite popular, and like most popular online communities there are definitely quite a few accounts that have not been activated for one reason or another. I would have cleaned these up already but I don’t see an easy way to do that with BuddyPress, and honestly wouldn’t really expect that do break the site altogether. How exactly do I go about batch processing the deletion of inactive users? If BuddyPress doesn’t function well with a large number of inactive accounts, I would think there would be an efficient way to manage them in order to prevent the entire site slowing down to a crawl because of them. Simply deleting them manually would take an insane amount of time. I have to believe there’s a better way. Thanks again!
I’m guessing you have disabled Search Engine Visibility in WordPress.
If you have, view the following:
https://github.com/boonebgorges/buddypress-group-email-subscription/wiki#1-bbpress-doesnt-record-its-forum-posts-into-the-group-activity-stream--why
The problem is with the function used to generate the active member count.
On your site, you have a ton of inactive users, which is causing the SQL query to be very large. I’m guessing you installed BuddyPress on a really big site recently and your users haven’t logged in yet? I’m guessing your site has a ton of pending users that you haven’t deleted yet?
BuddyPress can do better here, but in the meantime, one way to mitigate this SQL query is to generate a script that will backfill an activity timestamp for all your inactive users one way to mitigate this query is to delete all your pending users (the ones that haven’t completed registration) like Shane mentioned. This will stop WPEngine from killing the query.
Your line numbers do not match up with v2.9’s, which is why I recommend re-installing. Not sure how re-installing will cause problems unless you have directly modified core files in the past.
Regarding bp-custom.php, a quick search on Google would have explained what to do with it. Regardless, here’s the link to find out more:
bp-custom.php
If the code snippet I provided didn’t work in your theme’s functions.php, it most likely will not work in bp-custom.php either.
The other potential issue is there might be a plugin conflict.
I have successfully implemented the solution described in a closed thread https://buddypress.org/support/topic/hiding-groups-activity-members-list-to-non-members/ about how to hide BP components to non logged in users. The code is below and it works great. What I am looking to do is to make an exception for a single, specific member URL that will be accessible to all users.
In summary:
1. Hide all BP components to non logged in users [achieved]
2. All non logged in users to see mysite.com/members/member-x
This is the code used for the first part in. Any help would be greatly appreciated.
/* Prevent logged out users from accessing bp components */
function nonreg_visitor_redirect() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_members_component() ) {
if(!is_user_logged_in()) { //just a visitor and not logged in
wp_redirect( get_option(‘siteurl’) . ‘/register’ );
}
}
}
add_filter(‘get_header’,’nonreg_visitor_redirect’,1);
?>
WP version 4.8.0
BP version 2.12.12
Dear r-a-y,
I have the latest version v.2.9.0. I did not re-install yet, since that can maybe cause problems with my setup.
I found the spot where I have to add your code, see image: http://prntscr.com/g6uoav
However, I don’t see it fix the problem unfortunately.
I also added the code you’ve provided again as your second solution under childe theme functions.php –> the code does not seem to the trick either, also not in combination with the 1 above. See image:
http://prntscr.com/g6usss
I don’t know yet what you mean with: wp-content/plugins/bp-custom.php , do you mean wp-content/plugins/buddypress/bp-custom.php? Anyways, also in this location I can’t find bp-custom.php
Hopefully you can help me out now.
Best regards,
Bart
VGVIDS
Did you try un-checking the ‘Blog & Forum Comments’ option
in wp-admin > Settings > BuddyPress > Options
Hi,
I’m using BP 2.9 and WP 4.8 and Buddy theme.
Can’t see single activity item (I’m admin user). Not me and nobody. Clicking on timestamp of item redirects me to my profile page and error message “You do not have access to this activity”. My theme is non-bundled, I have tried this with Twenty Seventeen – no luck.
I have plugin BP Activity Privacy, but it’s is deactivated now.
I saw this topic:
buddypress.org/support/topic/post-update-unable-to-see-the-buddypress-activity and that’s not helping me.
What can I do to fix it?
Dear BuddyPress community,
please, is there a way to Switch of the Site Tracking ONLY FOR Comments?
When I unpublished/unticked the Site Tracking in buddypress config, it removes the New Post Site Tracking which I need to keep.
Thanks a lot 🙂
PS: I still use the comments, I just need to remove the comments Site Tracking
Hi,
I’ve just seen that BuddyPress forums topics don’t show up in the Activity feed.
You can see it here:
Activités du site
I’ve just create a topic in a group and nothing is on the activity feed.
How can I fix that?
Thanks! 🙂
I have a web in development with WordPress, in it I installed BuddyPress to create a series of forums. These need three levels of privacy:
1 – To access these you have to be registered, once with registration you can access all but one of them.
2 – Another level to access, this time to all.
3 – An admin that controls all permissions.
What plugin can I use?
Hi,
I’m using BP 2.9 and WP 4.8 and Buddy theme.
Can’t see single activity item (I’m admin user). Not me and nobody. Clicking on timestamp of item redirects me to my profile page and error message “You do not have access to this activity”. My theme is non-bundled, I have tried this with Twenty Seventeen – no luck.
I have plugin BP Activity Privacy, but it’s is deactivated now.
I saw this topic:
https://buddypress.org/support/topic/post-update-unable-to-see-the-buddypress-activity/ and that’s not helping me.
What can I do to fix it?
Hello Guys,
I am creating a social network and want to add membership Subscription in BuddyPress registration.
I am want to add checkout process before registration of buddypress, but I can’t find any action/filters.
Please let me know if you guys know about something.
Thanks
Dear @sbrajesh
Sorry to bother you.
Please, is there any chance you know how to remove this activity from Buddypress profile?
Mike “posted a new activity comment”
This is without url to the actual blog post so it’s useless. I tried to remove it from bp-activity-functions but it actually removes even the posted a new activity comment in a group.
Thanks a lot:)
What would you need specific documentation for?
I would just recommend doing a file search within the /bp-templates/bp-legacy/buddypress/ folder for certain things that you need to modify.
That way, you’ll be able to know what file to edit for template mods.
Cannot duplicate this.
You might have a javascript conflict.
Try disabling all plugins except BuddyPress and try again. If it works, then it’s a plugin conflict somewhere. If you’re running a custom theme that has purported BuddyPress support, also switch to a default WordPress theme.
Tried default theme and Inspirebook – using RTMEdia plugin and tried BP Cover Image and Buddypress Cover – all with same issue
Upload of Avatar or Cover Image works ok when creating or editing profile or group but when it loads crop avatar screen loads ok and allows me to drag handles etc) – then i get white screen and nothing happens
In Chrome console i get this
jquery-migrate.min.js:2 JQMIGRATE: Migrate is installed, version 1.4.1
underscore.min.js:5 Uncaught TypeError: Cannot read property 'replace' of undefined
at Function.m.template (underscore.min.js:5)
at n.template (wp-util.min.js?ver=4.8.1:1)
at n.render (wp-backbone.min.js?ver=4.8.1:1)
at n.inject (bp-plupload.min.js?ver=2.9.0:1)
at Object.uploaderView (cover-image.min.js?ver=2.9.0:1)
at Object.start (cover-image.min.js?ver=2.9.0:1)
at cover-image.min.js?ver=2.9.0:1
at cover-image.min.js?ver=2.9.0:1