Forum Replies Created
-
How did you build your theme? Did you use the BP Compatibility Pack, or is it a child theme of bp-default? It’s possible that you’re missing some of necessary template files. (like those inside /members/single/)
In reply to: calling messages_get_unread_count() in new php fileFinally, this code probably won’t work all by itself, because `messages_get_unread_count()` assumes a logged-in user – but on an AJAX request, you’re not guaranteed to have that. So you may want to amend your ajax call and callback like so, to manually provide a user_id:
` jQuery.ajax({
….
user_id: ”,
….`Check out the way that bp-default does AJAX (buddypress/bp-themes/bp-default/_inc – the files ajax.php (for the PHP callbacks) and global.js (for the scripts). Good luck!
In reply to: calling messages_get_unread_count() in new php fileThe problem is that when you load message.php via AJAX, you’re not loading all of WordPress and BuddyPress, which means that the messages_get_unread_count() function is not defined.
Instead of using ‘message.php’ as your AJAX url, use the one that BP provides for you, and be sure to provide an ‘action’ parameter:
` jQuery.ajax({
url: ajaxurl,
action: ‘get_message_count’,
dataType….`That’ll ensure that WP/BP is loaded on your AJAX call.
Then, you’ll need to make sure that you have a listener function in your functions.php, using the `wp_ajax_` syntax. (Read more here: http://w4dev.com/wp/wp_ajax/) Use `wp_ajax_` plus your chosen action name to define the hook:
`function bbg_messages_ajax_callback() {
echo messages_get_unread_count();
die();
}
add_action( ‘wp_ajax_get_message_count’, ‘bbg_messages_ajax_callback’ );`Hi @takuya and @cyrille13 – Sorry for some of the miscommunications above. It was only after seeing the linked bug report that I was able recognize that what you were reporting was actually an instance of https://buddypress.trac.wordpress.org/ticket/3725, which we’ve known about for a while, but which was very difficult to track down. (See https://buddypress.trac.wordpress.org/ticket/3725#comment:7 for all the gory details.) It has been fixed for the next version of BP. In the meantime, you can fix your installation either by manually applying https://buddypress.trac.wordpress.org/changeset/5778, or by doing what @cyrille13 suggests: changing the name of your Full Name profile field at Dashboard > BuddyPress > Profile Fields.
Thanks for your patience.
In reply to: PHP HipHopDitto. Would love to hear more. Thanks for sharing!
In reply to: Do Not Understand BuddyPress1. Yes, you get that out of the box.
2. There are a couple ways to make this happen. One is a plugin called BP Album (or BP Media): http://code.google.com/p/buddypress-media/ Another is a simple forum attachment plugin, which is a bit outdated and not easy to set up on all systems, but might be worth a look: https://wordpress.org/extend/plugins/forum-attachments-for-buddypress/
3. BP Media is your best bet for that.Good luck with BuddyPress!
It looks like this error is coming from BP Moderation. You may want to ask the author of that plugin @francescolaffi about it.
It looks to me like the content is there and working fine, but the links in your menu are incorrect. The links read:
`http://survunity.com/survunity.com/buddypress/groups-3`
when they should read
`http://survunity.com/buddypress/groups-3`Is your menu being autogenerated, or have you created it manually at Dashboard > Appearance > Menus? If the former, try creating one manually and correcting the links. If the latter, go in and fix those links (you probably left out the http://)
Go to Dashboard > BuddyPress > Pages, and select the newly created pages from the relevant dropdowns (Groups for groups, Members for members, etc).
In reply to: PASSWORD RESET BROKENThanks for the bug report. This has been fixed in the BP trunk and branch, and will be part of the next release.
In reply to: ThemesJust to be clear: You are looking under the Appearance top-level menu of the root blog’s Dashboard, right? ‘BP Compatibility’ does *not* appear under the BP top-level menu. (It’s working fine for me with BP 1.5.2 + WP 3.3.)
@sameeraperera You’re correct that this is an xprofile-only problem.
In bp-default, we don’t show the options_nav at all (where subnav items appear) on others’ profiles. See https://buddypress.trac.wordpress.org/browser/tags/1.5.2/bp-themes/bp-default/members/single/profile.php#L12
This does not seem like the optimal design to me. I’ve opened a ticket to fix it in a future release: https://buddypress.trac.wordpress.org/ticket/3877 In the meantime, you can override members/single/profile.php in your theme, and remove the bp_is_my_profile() check.
In reply to: BP Has Members Search TermsThe core reason why it’s difficult to do infinite filters like this is because BP xprofile fields are abstracted. That is to say, in order for our profile fields to be extensible (so that your site can have different profile fields from mine) we have moved the profile data to a separate table, which is essentially a key-value table. This is in contrast to a solution where you store all profile data in a single table, making it very easy and fast to filter by many criteria at once (the trade-off being that the table structure needs to be set in stone).
The numbers you cite shouldn’t be much of a problem. You may experience some slowness if you try filtering along 7, 8, 9 criteria at the same time, though I suspect that this is probably an edge case. In any case, some solid MySQL query caching will help.
In reply to: BP Has Members Search TermsUnfortunately, you’re not going to be able to do this with the search_terms parameter. Our query class simply isn’t set up to work that way.
You may be interested in looking at my plugin BP Better Directories, which takes probably the only viable route to doing what you want to do: it filters the SQL query directly, and then adds more WHERE clauses. Here’s the plugin https://github.com/boonebgorges/bp-better-directories and here are some of the key parts that you will want to look it. (Note that I’ve tried to be super abstract in order to handle different kinds of content – your code could be much simpler.)
– where I add the filters to the queries: https://github.com/boonebgorges/bp-better-directories/blob/0.9.x/bpbd.php#L51
– the heavy lifting is https://github.com/boonebgorges/bp-better-directories/blob/0.9.x/bpbd.php#L104 It’s written to loop through and do an additional join for each of the search parameters. Line 127 is where I’m making the new LIKE clauses. Then, on 142, I blow up the original query and stick my new clauses in there.Not pretty (and it won’t scale infinitely – don’t try doing this with 10 different filters on a large member database!) but it does work.
Thanks for posting an update, @peeld.
There is an existing ticket going in one direction: https://buddypress.trac.wordpress.org/ticket/3463, and there is an old discussion related to the broader issue: https://buddypress.trac.wordpress.org/ticket/2678
This is part of a larger problem with the way that activity items are hidden in certain cases. It’s long been an issue of mine, so I’ve opened a ticket with a view to fixing it sooner rather than later: https://buddypress.trac.wordpress.org/ticket/3857
I’m unable to reproduce the problem. Without being able to reproduce, I’m afraid there’s nothing I can do.
Perhaps you can try installing a fresh installation of BuddyPress somewhere else, and then attempting to reproduce the issue. Take careful notes of the steps required to reproduce, so that you can share them with the team.
In reply to: Buddypress Forums & Group Forums Not WorkingTry toggling forums in a given group. Uncheck “enable forum” and save, then recheck. If that works, it narrows down the issue.
Also, is it happening with new groups as well as existing ones?
In reply to: [Plugin: BP Better Directories] Has anyone used it?@peterbujok – Turn down your PHP warning level. It should not be showing such minor notices on the front end of the site.
In reply to: [Plugin: BP Better Directories] Has anyone used it?The plugin does pretty much what you are looking for.
You should heed the warnings that @mercime points out. They are important. If you run the plugin on a production site without heeding the warnings, you’ll be in no position to complain if something goes wrong.
That said, why don’t you just install it and test?
In reply to: How to get the current group slugbp_get_current_group_slug() gets the slug for the current viewed group ($bp->groups->current_group->slug). For instance, in this group, it would return
`how-to-and-troubleshooting`bp_get_group_slug() gets the slug of the group when you’re inside of a group loop ($groups_template->group->slug).
In reply to: Members loop has bug (BP 1.5.1)Open a bug ticket for that please
In reply to: EMERGENCY!!! – new avatar imagesAlso, you might want to consider contacting Godaddy and explaining the problems (that newly updated avatars in /wp-content/uploads/avatars are getting the wrong permissions). It might be something they can help with.
In reply to: EMERGENCY!!! – new avatar imagesYeah, the permissions can be pretty weird on these kinds of setups.
FWIW you should probably not have Write permissions for “all users”. Set it to read-write for owner and group, read-only for all users.
In reply to: BuddyPress wipes out WordPress cache?Can you open a ticket at trac.buddypress.org?
In the meantime, try this https://wordpress.org/support/topic/plugin-wp-super-cache-clear-cache-when-user-login#post-2114809
In reply to: Members loop has bug (BP 1.5.1)“custom loop” is the one in the sidebar? How did you add it there?