Closed (fixed)
Project:
Organic Groups Registration Codes
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2007 at 16:53 UTC
Updated:
24 Jun 2007 at 23:14 UTC
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 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 commentedThank you.
Any further thoughts on where to begin... Even a pointer on what hooks, etc... would be greatly appreciated.
Comment #3
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 commented