By instanceofjamie on
Hello :o)
I'm in the midst of trying to create a highly democratised environment, where users joining organic groups effectively create a 'poll', with which the existing members of the group vote on whether the prospective member can join or not. Once a percentage of the current members have voted favourably, the prospective member is admitted to the group - thus reducing the absolute power a group admin holds over the membership.
Has anyone out there achieved this, or anything even close to it?
-- J.
Comments
One Option
Sounds like you are going to be faced with some customized code for this to work.
I would start by creating your own custom module and call it something like "og_groups_helper.module". This module will control any custom functionality outside of the og.module currently.
You could start by doing a form_alter on the poll's form id in your new og_groups_helper.module and then add in an addition custom submit hook, which allows you to do additional handling when a poll vote is submited. You could start by checking the total votes for the current user and if it is great enough to apply the user to the group, directly call og_save_subscription and pass it the group id of the group the user should be saved to, the user id of this user, and any additional args if there are any for the function.
Here is an example of what I am suggesting.
og_groups_helper.module
I hope this gets you on the right path to being able to do this. Using two contrib modules with each other is not an easy task and requires some custom code and usually a middle man module. If you have more questions or any specific questions to this reply, please post. I will continue to follow this post as I am interested in making this work for you.