Keyword

User choose K2 User Group during registration

More
11 years 4 months ago #102526 by Antonios Pazarlis
Replied by Antonios Pazarlis on topic Re: User choose K2 User Group during registration
Hello everybody. I am trying to work a site out with K2, this is my first post and i'd have the same "problem".

I am trying to build a social site about giving space to various type of artist, in order to have their space and i'd like to have them divided in categories (singer, pianist, dancer, etc.). Furthermore, i'd like them to be searchable/filtered through these categories, as for example the K2 tool module where you can have a category select box in order to filter the articles through the categories.

Now in order to achieve that, i was wondering if it's possible to give the possibility to the users, during registration to be able to select their category in order not to have to do it manually. At least, i'd like to know if there is a way to do this with K2.

Thank you very much in advance, even because i'm using K2 with allvideos and image gallery pro, it works fine and it is intuitive for new users too.

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

More
11 years 4 months ago #102527 by Peter Grube
Replied by Peter Grube on topic Re: User choose K2 User Group during registration
Hi Antonios,

The only way I could achieve this functionality was by using Community Builder to handle both the Registration & Profile but although the CB is free you need to purchase either their Conditionals plugin or alternately get the third party Community Builder Profile Pro which is able to create different profile types & Registration forms.

The only drawback is that although you can select different user types during registration, & K2 adds them to your list of users, it doesn't automatically add them to your K2 User Groups. So they cannot add items until you add them manually. Which in my case is ok, because I need to approve the users anyway.

While I am at it I thought I would ask for some feedback from the Admins here, this link mentions the same problem about syncing CB & K2 but it's over 2 yrs old, I am hoping I am missing something.

One last thing in the CB Forum has suggested work around for this but my PHP skills are limited & I am getting the dreaded white screen of death.


It says around line 957 begins the function "function saveRegistration( $option )", at the end of this function, before the "}" sign insert this code (it must be a part of the function) ...
Could someone point out where exactly is the end of this function.
Log in  or Create an account to join the conversation.

More
11 years 3 months ago - 11 years 3 months ago #102528 by Antonios Pazarlis
Replied by Antonios Pazarlis on topic Re: User choose K2 User Group during registration
Hi Peter,
I'd like to thank you for your indication of using CB but had already bought the following plugin that does the same thing and also misses the feature of inserting users in K2 users list, but they told me that they will implement it in a future version.
extensions.joomla.org/extensions/access-a-security/site-access/frontend-access-control/20450

About your question on implementing the code in the CB, it seems that the function user registration ends at line 120 and not around 957 which corresponds to the following line:
echo "\n<div>" . implode( "</div>\n<div>", $messagesToUser ) . "</div>\n";
}

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

More
11 years 2 months ago #102529 by Eduardo
A bit late on here, but just wanted to chime in and agree how useful this would be.

Having several defined k2 user groups, each with different permissions, would be brilliant. And then you could let user select which group to belong to - or even better - have separate registration forms for different users.

To use the example stated previously, a student reg form and teacher reg form, each with their unique access and permissions.

This would be very useful for lots of sites. Will check out CB suggestion in meantime, thanks !

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

More
11 years 1 week ago #102530 by Sergey Yakovlev
Replied by Sergey Yakovlev on topic Re: User choose K2 User Group during registration
One more vote that the use case is viable. But it also should be tied with approval mechanism for some user groups.

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

  • Agence culturelle départementale Dordogne-Périgord
  • Agence culturelle départementale Dordogne-Périgord's Avatar
  • Offline
  • Junior Member
More
10 years 3 months ago - 10 years 3 months ago #102531 by Agence culturelle départementale Dordogne-Périgord
Replied by Agence culturelle départementale Dordogne-Périgord on topic Re: User choose K2 User Group during registration
I too am in need of this function... I've got 3 age ranges on a writing contest, each age range (hence usergroup) get to write in their respective categories.

Being that there will be many contestants, manual sorting would be a pain for site admin and also participants would probably like to start writing ASAP (without having to wait for a manual update; wait which could be demoralising them.)

Hence the need to get the user to select his usergroup / age range.

Thank-you

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 3 months ago #102532 by Yiota
I'm afraid that there is no easy way to achieve this. You will have to make modifications as suggested by @Lefteris

This is very special situation. Ther code you need to modify is located in two files:

1. The register.php layout where you need to place the groups the user needs to select
2. The K2 user plugin which is the one that saves the user to the predefined user group.


A good starting user plugin is this getk2.org/extend/extensions/73-user-extended-fields-for-k2.

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

  • Agence culturelle départementale Dordogne-Périgord
  • Agence culturelle départementale Dordogne-Périgord's Avatar
  • Offline
  • Junior Member
More
10 years 3 months ago #102533 by Agence culturelle départementale Dordogne-Périgord
Replied by Agence culturelle départementale Dordogne-Périgord on topic Re: User choose K2 User Group during registration
Thank you for the tip. Guess I'm burned, I'm running Joomla 3.2 and that plugin is only good for 1.5-2.5
erk !

I don't have time to do any php tinkering, unless someone has already acheived this.

I started working on this site this morning, and it's going live in 5 days... so no time to guess & try.
It'll just have to be as is :/

Thanks again.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 3 months ago #102534 by Yiota
I'm sorry I cannot provide more help on this matter.
You are welcome.

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