Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Plugin behavior

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #230016 by krileon
Replied by krileon on topic Plugin behavior
The below will count the number of groups the user owns.
Code:
SELECT COUNT(*) FROM `#__groupjive_users` WHERE `user_id` = '[user_id]' AND `status` = 4


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 or Create an account to join the conversation.

  • ver
  • ver
  • OFFLINE
  • Posts: 142
  • Thanks: 4
  • Karma: 2
11 years 3 months ago #230312 by ver
Replied by ver on topic Plugin behavior
Sorry, but dont work at all.

i create the field (type query) using the query you said
Code:
SELECT COUNT(*) FROM `#__groupjive_users` WHERE `user_id` = '[user_id]' AND `status` = 4

MODE: Internal

OUTPUT: Single Row

COLUMNS: Single Column

CB Conditional: Field condition preferences: Normal CB Settings

After that use a tab conditional

FIELD: (The query field)

OPERATOR: Greater than or Equal

VALUE: 1

MODE: Show

DIRECTION: Two-Way

But i cant see the tab, even if the user create a group. I would like to show the TAB if the user create at least one group. Please help me.

Thanks in advance.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #230341 by krileon
Replied by krileon on topic Plugin behavior
Does the query field output fine on profile? Try using custom value as follows instead of selecting the query field from the dropdown. Ensure your query field is on a public and published tab and that your query field is set to display on profile.

Field: Value
Value: [cb:userfield field="cb_queryfield" /]


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 or Create an account to join the conversation.

  • ver
  • ver
  • OFFLINE
  • Posts: 142
  • Thanks: 4
  • Karma: 2
11 years 3 months ago #230384 by ver
Replied by ver on topic Plugin behavior
Now its work! Thank you Kyle ;)

Just one thing, i dont want to show the quantity of group created, that happens because the field is part of the tab.

this is the whole tab:



Even if i select "NO" on "Show Title on Profile", i have the number of group created. :sick:



How can i quit the entire field? How can i quit the number 1?

I cant use "Show on Profile" "NO" because the tab disappears.

What can i do?

Thank you again kyle, you are the best.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #230411 by krileon
Replied by krileon on topic Plugin behavior
Move it to a tab that is in a not shown on profile position. Ensure the field is set to display on profile when on such a tab so it can still be used by substitutions.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum