BuddyPress | BuddyPress DEVELOPMENT repo | Reverse Engineering library
kandi X-RAY | BuddyPress Summary
kandi X-RAY | BuddyPress Summary
Welcome to the BuddyPress development repository! This repository is a mirror of our development SVN repository. Please do not send pull requests here, instead submit patches to our SVN repository. Check out the Participate & contribute page of our Codex for information about how to open bug reports, contribute patches, test changes, write documentation, or get involved in any way you can.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Prepare user IDs query .
- Get the SQL for a clause .
- Get profile information .
- Get a list of users
- Sets the global variables .
- Mail an email .
- Get current threads for a user .
- Autoload classes .
- Get the comments for an activity .
- Prepare the list items .
BuddyPress Key Features
BuddyPress Examples and Code Snippets
Community Discussions
Trending Discussions on BuddyPress
QUESTION
I made a custom navigation page for users, using the plugins.php file. But I would like this page/option to be only available for some types of users; and make it the default landing page for them.
I can't figure out how to that.
I tried to make it the default landing page, and in the plugins template file, adding a condition that redirect users depending on their type... but redirection doesn't work by there it seems.
Any clue, plz?
I'm using Wordpress 5.8.2 and Buddypress 9.1.1. Thanks
...ANSWER
Answered 2022-Jan-18 at 13:08I found a solution.
First, here's how I created a new navigation item; I put this code in my bp-custom.php
file:
QUESTION
I'm making one custom app that already has over 10.000.000 users.
I had to create one custom query that extracts users from a specific member type.
The problem is if I want to see only 20 users and do pagination, it needs a lot of time to get the data out of the database and often there a critical error occurs because the query is very heavy.
The same happens if I use BP_User_Query
(Buddypress class) because my code is based on it.
The biggest problem is that Buddypress member_type
has been recorded within WP terms and is reached via a complicated relation.
Here is my query:
...ANSWER
Answered 2021-Oct-28 at 00:30Some things to work with.
First of all, ten million users is a very large number for WordPress. You already know that.
Second, please consider rewriting your query to do a so-called "deferred join." You have the notorious performance antipattern SELECT many_long_rows ... ORDER BY something LIMIT small_number
. This forces MySQL to sort a whole mess of data, just to discard all but a tiny fraction of it.
Suggested rewrite: Start with a subquery to get the wp_users.ID
values you're interested in. Working from your example, the subquery is this.
QUESTION
I'm attempting to upload an image file from the phone camera to a BuddyPress API from my Xamarin app (the API call documentation can be found here - https://developer.buddypress.org/bp-rest-api/reference/attachments/member-avatar/)
I can do this successfully using RestSharp as follows;
...ANSWER
Answered 2021-Oct-21 at 13:19Ah! it was so simple! I had part of the form data the wrong way around;
QUESTION
I'm a PHP newbie trying to extend the Wordpress API on our BuddyPress website. I've created a database table which I plan on using to store a user's friends (or in our specific case "favourite members"). I would like to write an API endpoint to return a user's friends using the user's id as an input (i.e. "myapi/v1/favouritemembers/[user id]"). This is what I've done so far;
...ANSWER
Answered 2021-Sep-24 at 11:37I've worked it out, I was almost there, just needed to change
QUESTION
I'm writing an app to interface to a WordPress BuddyPress API. The app will allow users to send messages to each other through the API. I'm having difficulty displaying these messages correctly when they contain emojis. Here is a short example of message text as returned by the API -
"Hi 🙂 hope you are doing well."
If I explicitly set the label text like below, it displays correctly (i.e. the smiley emoji displays correctly)
However, if I bind the label text to the string field in my view model, it just displays the code for emoji with the included text.
Here is the data returned from the WP BP API as seen in Postman for the "message" node;
What do I need to do to the data bound "message" string to get it to display correctly?
...ANSWER
Answered 2021-Jul-10 at 14:20Its because you received a string from an API that encoded for HTML transmission. Perhaps use System.Net.WebUtility.HtmlDecode.
(XAML decodes value strings automatically, so you didn't need to do that when the string was in XAML, because there are a few Unicode characters that are not permitted in XML.)
QUESTION
We have been trying to create a dynamic redirect for the BuddyPress message Compose page using .htaccess rules. I would like for the Compose area to be inaccessible, but when someone clicks the "Private Message" button on someone's profile, they can still get to the page and send a message to the user.
I found this post, but I can't get my redirect to work - htaccess redirect exact match, exclude all query strings
The Compose area redirects to the home page fine, but when a query string is added during an attempt to message the user, we are redirected to the home page, but the query string remains in the URL.
Here is what I am using:
...ANSWER
Answered 2021-Jul-02 at 05:36This should work for you. Remember to place the code at the top of your htaccess or before other directives .
QUESTION
I want to conditionally add a step in the Group Creation wizard of Buddypress / Buddyboss. In step 2 my form asks for a specific field (via a Select-box with the HTML name "group-types[]").
Whenever a specific group type is clicked and the user clicks "next step", I want to add a new step inbetween conditionally on the group type field.
I found this code: https://gist.github.com/shanebp/c9cdde9443bdeab9b4ca
It works, but there are two things: I'm not sure where exactly to "ask" the already made settings for the group in the creation wizard and unfortunately the settings-page "Ville" is added at the end.
I tried to set a "position"-element in the $arg which is passed to parent::init( $args ); but this is not accepted.
Any help would be highly appreciated.
...ANSWER
Answered 2021-May-23 at 17:24ville is an arbitrary term. I've updated the gist to use test. Replace it with whatever you want. The Test step will appear after the Settings step and will check for any group types selected in the Settings step.
You can get all the group type data as an object:
QUESTION
I just launched my store on wordpress and I ran into a problem: When I am on the home page of the site, all my product titles are in H2 and should be in h3 (SEO reasons), my recommendation products are also in h2 instead of h3 (on the single product page and in collections, i would like to change them all to h3). I looked for a long time where the problem could come from, searched all the files of the theme to change any title from h2 to h3 but nothing helped, I can't find where it is! I also asked the theme creators for help but they told me it was woocomerce's fault and there was nothing they could do ..
A lot of people have had some of the same problem under other themes but they don't have the same "function.php" as me. I also followed this: How can I change the product
in Woocommerce Storefront to ? but it didn't work for me.Can someone help me on this problem ?
here is my "function.php" but i dont think it'll help..
...ANSWER
Answered 2021-May-19 at 21:08I don't think the functions.php
file has anything to do with it - usually HTML structures like this are created in template php files which are in the themes folder - either on the top level of that folder or as "template parts" in an according subfolder. You have to edit those( or actually those among them that are used by the pages you are referring to), changing all
(also the closing tags).
However, since any not-selfmade theme will be updated every now and then, those changes would be overwritten with updated files when available, it would be necessary to create a child theme, which only contains those templates which you want to change (see also https://developer.wordpress.org/themes/advanced-topics/child-themes/). Then again, updated themes might contain template updates which are necessary, so you'd always have to check which details were updated in that particular template file, integrating it into your child theme templates or editing the updated original themes and using them in your child theme.
P.S.: I think the title of your question is a bit misleading: In the question text you are asking about certain title tags in the product pages, not about parts of the menu, aren't you?
QUESTION
Please help, I am trying to add some custom fields to the activity stream in buddypress but got stuck...
The following code adds two fields successfully to the activity form:
...ANSWER
Answered 2021-May-19 at 23:05This hook bp_activity_posted_update
is not the best approach. Use this hook instead: bp_activity_after_save
And you should store it in this table: $wpdb->prefix . 'bp_activity_meta';
unless you really want to use a custom table.
And your $wpdb->insert
query is malformed. You should have a format for each value in your data. See codex.
QUESTION
I've got the following query as a part of the function that shows posts in Buddypress user profile tab:
...ANSWER
Answered 2021-Apr-01 at 07:54Your ternary operator condition is incorrect (where assignment is happening), correct it like below:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install BuddyPress
macOS: brew install node
Windows: choco install node
Ubuntu: apt install nodejs npm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page