Novel Registration Code... Could new groups be created ad hoc?

keysar7 - June 18, 2007 - 16:53
Project:Organic Groups Registration Codes
Version:5.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

pwolanin - June 19, 2007 - 18:53

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.

#2

keysar7 - June 19, 2007 - 20:42

Thank you.

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

#3

pwolanin - June 19, 2007 - 23:12

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

#4

pwolanin - June 24, 2007 - 23:14
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.