Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Wonderful module. Many thanks!
Wondering if it is possible for a user to enter a non-existent Registration Code, and initiate an OG on the spot. The code will be used from that point on for other users wanting to register for that OG.
I want to assign zip codes as registration codes, and instead of creating a group for all zip codes in the US, have a group created as its zip (registration code) is entered.
Many thanks in advance.
K.
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedWell, in theory that would be possible, but it would require a totally different module than this. You could obviously use this code as a starting framework, however.
Comment #2
andrew7 CreditAttribution: andrew7 commentedThank you.
Any further thoughts on where to begin... Even a pointer on what hooks, etc... would be greatly appreciated.
Comment #3
pwolanin CreditAttribution: pwolanin commentedWell, you're basically trying to create new nodes that are groups - so you need to look at the OG module's API, as well as look into programatic node creation. I'm not sure how well OG handles this, so one possibility is that you'll need to put the data into the node form's data structure and call drupal_execute on it. http://api.drupal.org/api/5/function/drupal_execute
However, if OG plays nice, you might be able to just stick all the data in $node and call node_save()
Comment #4
pwolanin CreditAttribution: pwolanin commented