Hi,
I just have a really quick question regarding the plugin. There are several operators that i understand, but what exactly does the “Like/Not Like” mean when i use it to compare profile fields? Also would it be anyhow possible to make the plugin match people who match for like 50% or maybe 70% of the matches? Because it seems a little crazy to have only match ALL the arguments or ANY.
All is very low possibility and Any is way too many matches eventhough people might share just one common field.
Thanks!Sorry, I posted reply of another topic here by mistake. I will be following up soon.
- This reply was modified 6 days, 20 hours ago by Brajesh Singh.
Hi, no problems at all haha, happens to the best of us.
Regarding my question – I already found out how “like” and “not like” works – its a query based argument, works kinda like “contains”, right?
So i would only love to know if there’s any chance to modify the plugin so that certain percentage/amount of conditions is met.I tried to look through the code and saw that its working based on AND or OR, so maybe let’s say we have 5 conditions, if first 2 match, then check if any of the remaining 3 match and if yes, match?
Thank you very much for your time and answer!
Hi,
sorry for the double post, but I just found out something – when I use like, it doesnt work with arrays, meaning if I use LIKE and the logged in users profile field is a string, it won’t match users at all.
Like for example we have two field groups – About Me and Looking for. They share profile fields – in About me, you insert data about you and in Looking for you insert data your ideal match should have.
Lets say we have a field Body Type, the logged in user picks “Regular” from the dropdown and picks “Regular, Slim, Fit” from multiple choices in “Looking for”, i then set the rule that when logged in users “Looking for Body type” matches with “About me Body type” of a different user, its match, but it doesn’t work, because the logged in users data is array while the matched users is a string and currently there’s no way to set it up in the opposite way (matched user body type LIKE logged in user looking for body type).
Any help pls?Hi,
sorry me again. One last question (so you can answer them all at once). In your template for the widget, you have a comment like this:
* You can override it in your theme/buddypress/members/friends-suggestions-pro/default/widgets/
But when i actually put the file in this path in my child theme it doesn’t work :/
HI,
Thank you for the patience and the replies.1. Our condition builder is not shophisticated to allow mutiple conditions(and/or nested conditions), so we are limited to and/or only and can not do partial(2 and 3 or).
2. The like operator only works on text fields. For other fields, I will suggest using equality operator instead(If both of them is a single dropdown field).
3. For template, It goes to your current active theme’s directory. For example, if my-theme is active, It would go to wp-content/themes/my-theme/buddypress/members/friends-suggestions-pro/default/widgets/
If you have a child theme, you can put it in the child theme or the parent theme, both will work..
Hope that helps.
Regards
BrajeshHi,
Thanks for the reply.
1) thats a shame :/ do you think it would be possible to do at all?
2) well the thing is i need to compare two fields that are different kind, for example a multiselect checkbox and a dropdown, any way to do this please? Or in case it doesn’t work in current setup maybe you could point me in the direction of how it could be achieved by modifying the code?
I saw in and not in inside the code commented out, maybe i could use that?
3) i used exactly this path and it didn’t override the plug-in template :/
Thanks in advanfe for your reply.
Hi,
1. Yes, its is possible in a limited way.. Internally, we createBP_XProfile_Query
which has api similar toWP_Meta_Query
. You can set nested conditions. The main function used to generate xprofile query isbp_friends_suggestions_pro_get_xprofile_query
. Please take a look into this.2. You may try serializing value for like/not like to see if that makes it work. I am not sure if that would work.
3. Can you please tell me which file you wanted to overwrite, I can check that.
Regards
BrajeshHi,
1) thanks for your reply, i will definitely look into it!
2) I did try that but sadly it didn’t work :/ Could I have a different question regarding this? Currently, you can only do Logged-in user LIKE potential match, which means currenty it works such as “If logged-in single value field match anything in potential’s match longer text, it will match” – I tested this by switching the profile fields, as in the matching was done that potential match field was multi select while logged in user was single value (dropdown or just a word in text field) and it worked. Could you please point me to a possibility that I could internally “Switch” the logged-in and potential match in the query? So that i would check potential match single value LIKE logged-in multi select?
3) I already found the issue haha, it was a typo. In a template file for the buddyboss widget, you specified a path theme/buddypress/members/friends-suggestions-pro/default/widgets/, but it is actually theme/buddypress/members/***bp-***friends-suggestions-pro/default/widgets/, i realized when i looked into the original file path, so all good there.
Thank you again for your time and effort, i really appreciate it very much!
Hi,
1. Thank you. I look forward to your feedback.
2. I am sorry, that will not work. here is the reason.In order to suggest, we are searching for users in the database and we are using the profile field data from the current logged in user as the search term. The other users are unknown at this point, so reversal will not be feasible there. I will try to look into it in a bit more detail, I am sure we can have a solution for you if you are interested in editing the plugin(Can’t have it in the plugin as generalization of the matching is a problem). I will get back to you in next 24 hours on this one.
3. I am sorry about that, even I skipped it while looking at your reply and posted without checking. I am sorry, the comment in our plugin mislead you. Will update that in next release.
Regards
Brajesh
You must be logged in to reply to this topic.