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

pwolanin’s picture

Well, 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.

andrew7’s picture

Thank you.

Any further thoughts on where to begin... Even a pointer on what hooks, etc... would be greatly appreciated.

pwolanin’s picture

Well, 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()

pwolanin’s picture

Status: Active » Closed (fixed)