[SOLVED] CB Query for connession degree

13 years 1 month ago - 13 years 4 weeks ago #157610 by deltafidesign
[SOLVED] CB Query for connession degree was created by deltafidesign
I would like to know if I can use the CB Query plugin to show in a field, for every profile I visit, the degree of connession with that user and in case of no connession or not registered user (that visit someone's profile) a message like default messagge for no connession. If possible, will this field searcheble and how? How can I try to search, for example, users with 2 degree or 4 degree or 6 degree of connession?

Thanks

Please Log in to join the conversation.

13 years 1 month ago #157714 by krileon
Replied by krileon on topic Re: CB Query for connession degree
CB Query Field supports substitutions so I suppose you could put an IF statement in it or add to the WHERE condition of your query to check the viewing users ID (use complex substitution with operator to specify user="#me") is not zero. More on substitutions at following URL.

www.allmysocials.com/tutorials/item/233-substitution-usage

Believe it would just be easier to put the field on a tab only viewable to Registered users. Don't know what connession is so can't comment further.

At any rate CB Query Field is NOT searchable. Searching is done directly to database values, being a field that dynamically builds it's values it is not searchable. Will be reviewing possibility to add searching support, but at this point am not sure if is possible.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 1 month ago #157739 by deltafidesign
Replied by deltafidesign on topic Re: CB Query for connession degree
Thanks for reply krileon. I just need a field that can show the degree of connession when I visit someone elase profile...

I'm not sure I've understood it very well: can I do it without CB Query plugin?

How can I do it? can you please show me the sintax?

Many thanks

Please Log in to join the conversation.

13 years 1 month ago #157743 by krileon
Replied by krileon on topic Re: CB Query for connession degree

Thanks for reply krileon. I just need a field that can show the degree of connession when I visit someone elase profile...

Then CB Query Field can do this.

I'm not sure I've understood it very well: can I do it without CB Query plugin?

Yes.

How can I do it? can you please show me the sintax?

You make a new field within field management of query type then you supply a SELECT query to display the results. For example the following.
SELECT `cb_myfield` FROM `#__comprofiler` WHERE `id` = [user_id]

The above would cause the field to render whatever the contents of cb_myfield is for example.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 1 month ago #157867 by deltafidesign
Replied by deltafidesign on topic Re: CB Query for connession degree
Ok, how should the "cb_myfield" done to show the degree of connession? Another query type field?

Please Log in to join the conversation.

13 years 1 month ago #157908 by krileon
Replied by krileon on topic Re: CB Query for connession degree
No, I don't know what connession is or where you're storing this information. Simply put you just make a database SELECT query, that is all. CB Query Field will render the SELECT queries results. More on database query usage can be found at the below link.

dev.mysql.com/doc/refman/5.0/en/index.html


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.204 seconds

Facebook Twitter LinkedIn