Skip to Content Skip to Menu

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

connect user to k2 group

11 years 5 months ago #227709 by matthewdavey
Replied by matthewdavey on topic connect user to k2 group
Ok I need a 500 k2 category directory where you can join that category's k2 user group and add and edit an article in that k2 category after sign up. Is it better to make like 500 ACL groups?
The topic has been locked.
  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #227711 by krileon
Replied by krileon on topic connect user to k2 group
I don't think K2 even provides this. No 500 ACL usergroups isn't better. I don't suggest implementing either usage as that's a massive amount of usergroups. You should look into a directory extension at Joomla.org or use GJ groups and its Wall integration for your article(s) on a per group basis this way the user can just create what group they want themselves without your interaction or having to pre-create 500 of anything.


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.
The topic has been locked.
11 years 5 months ago #227735 by matthewdavey
Replied by matthewdavey on topic connect user to k2 group
Ok I said before I would like to be able to make a new k2 user group on sign up and select one from 500 k2 categories to join the new k2 user group to is that posible ?
and you said
Yes, that's possible, but you're going to have to code it. K2 action can only add 1 usergroup per action, it's not dynamic, so you'd need 500 actions to add those K2 usergroups based off a dropdown for example. There is no action for creating K2 usergroups so you'd need to develop one or use a Query action and insert the usergroup using a database query.

I meant I would like to be able to make a new k2 user group and its k2 category on sign up and select one from 500 k2 parent categories is that possible?
If not the first example will do.
How do I use a Query action and insert the usergroup using a database query. Can you point me in the right direction please I'm an amateur

The reason for this is i have built an online magazine where you auto join your local area and join and make groups but when you want to advertise in the magazine or the menus you upgrade your subscription and your user group can add and edit their k2 category
Thanks
The topic has been locked.
  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #227752 by krileon
Replied by krileon on topic connect user to k2 group
User do not join K2 categories. K2 is a content management system for articles. There is no joining feature. All that they could be a part of is a K2 usergroup and if you want them to have 1 of 500 K2 usergroups then you'll need to create a new select field with all 500 K2 usergroups. You then need to create 500 CB Auto Actions with conditionals to match what is selected and give them the respective K2 usergroup. Alternative to 500 actions is to try doing this with a database query using a Query action, but that's entirely based off what values you set the select field too so I've no idea how well that'd work out.

The ideal approach is to create a new CB plugin that provides a new fieldtype that dynamically generates the dropdown based off K2 database and on save gives them the K2 usergroup they selected.

I highly do not suggest using the CB Auto Actions approach as that's 500 triggers being checked at once and will consume resources rapidly. When you originally proposed this I did not know you intended to have 500 and with that detail provided I believe you need to custom develop something to fit your needs.


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.
The topic has been locked.
11 years 5 months ago #227823 by matthewdavey
Replied by matthewdavey on topic connect user to k2 group
Thanks now I know. Ok how do we create a new CB plugin that provides a new fieldtype that dynamically generates the dropdown based off K2 database and on save gives them the K2 usergroup they selected. This would be a good plugin I guess it would work like autojoin group jive group in a dropdown menu on sign up which is what I need.
How do we custom develop something to fit this situation.
Thanks
The topic has been locked.
  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #227915 by krileon
Replied by krileon on topic connect user to k2 group
You'll need to review our existing fieldtype plugins and use them as examples. You can try review the GJ Auto Integration and at the very top of it is the Field usage. It's probably best to review our fieldtypes such as the File and Video fieldtype plugins for examples.


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.
The topic has been locked.
Moderators: beatnantkrileon
Powered by Kunena Forum