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

  • ver
  • ver
  • OFFLINE
  • Posts: 142
  • Thanks: 4
  • Karma: 2
11 years 4 months ago #229834 by ver
Plugin behavior was created by ver
Hi, i use CB_JoomDonation Plugin in my site. So users have the possibility to make a Donation to another users profile.

Every people have a DONATION FORM into the profile.

But I would like to show the DONATION FORM only to people who create a GROUP in GJ. :unsure:

How can i do that? It is possible?

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 4 months ago #229892 by krileon
Replied by krileon on topic Plugin behavior
Assuming it's just a normal CB tab you could use CB Query Field to query the database for the number of groups the user has created. This will give you a way to condition if they've created a group or not. Next you'd use CB Conditional to show/hide the tab based off the value of the query field (you need to use Conditional Self with Custom Value and substitute in the query field).


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 4 months ago #229918 by ver
Replied by ver on topic Plugin behavior
Thank you Kyle.

Assuming it's just a normal CB tab you could use CB Query Field to query the database for the number of groups the user has created.


Yes it is a tab. How can i set the query field. What i should put into " Input substitution supported query "
I need to show when the user create one group.

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 4 months ago #229923 by krileon
Replied by krileon on topic Plugin behavior
You need to write a database query to query the GJ groups table and count the number of groups a user owns. You'd then use the query field in a custom value conditional on your tab to show/hide it based off the count. If unsure how to write the query please search as it maybe already provided or please contact a database specialist to write the query for you.


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 #229965 by ver
Replied by ver on topic Plugin behavior
Hi kyle,

I found that query but i dont know if count the number of groups a user owns:
Code:
SELECT COUNT(*) FROM `#__groupjive_users` WHERE `group` IN ( SELECT `id` FROM `#__groupjive_groups` WHERE `user_id` = '[user_id]' )

Could you help me please.

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 #230004 by ver
Replied by ver on topic Plugin behavior
I only need that line to finish the site... please. :(

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

Moderators: beatnantkrileon
Powered by Kunena Forum