I plan to create a module which allows automatic creation of groups/communities/fan clubs for the content types you want, therefore, dependent on Organic Groups . Examples:
1. A site with football teams -- every football team is a content type and the administrator wants that everytime a football team is created Fan Clubs be created automatically created.
2.A site with a lot of movies, celebrities, etc might need to have a community around all these content.
The module prevents you from the hassle of creating all these groups/communities/fan clubs for every content of yours.
The module classified content types into three categories:
1. Group content types (community, fan club)
2. Post content types (content types that can be posted in a group, e.g. image, video, story)
3. Remaining content types (active ones -- groups can be automatically created for these content types only)
The module allows the administrator to decide what group content types should be automatically created for active content types. Once a combination is selected, the module also allows the administrator to set default organic group settings like title, description, directory listing, membership type, private groups, and active on registration.
Once configured, every team a football team is created, the fan club will automatically be created.
Note: The module does not handle custom content fields in group content types.
The module is ready, verified with coder and tested for functionality in different scenarios.
Will also take the opportunity to congratulate every single member of drupal.org to make it such a wonderful CMS.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | autocreategroup.zip | 5.2 KB | blisstering |
| #8 | autocreategroup.zip | 5.2 KB | blisstering |
| #6 | autocreategroup.zip | 5.2 KB | blisstering |
| #1 | autocreategroup.zip | 5.4 KB | blisstering |
Comments
Comment #1
blisstering commentedUploaded the zip format of the module.
Comment #2
avpadernoComment #3
avpadernol()is not used togethert(); that is reported in the documentation page fort(), which reports the following text:The string passed to the function is not translatable; if it would be translatable, then it should also use placeholders.
The first argument of
t()should be a literal string, not a dynamic value; differently, the script for extracting the strings to translate is not able to extract the string.Code should use Drupal Unicode functions, which are able to handle multi-bytes strings.
The code creates a node object, and saves it, but it doesn't allow to other modules to attach their own properties to the module being saved.
There is no need to use a SWITCH-statement when the possible values are always, and just two.\
In case of errors, the function returns a not translatable string; it would be better to pass the error string to
drupal_set_message().Comment #4
pkunwar commentedCan You Elaborate More on Point No 5 & 7.Give Me an Exampleto understand it.
Comment #5
avpadernoFor point #5: Before to save the node, the code should invoke the implementations of
hook_nodeapi()made from other modules (passing'save'as first argument). It would then better if the code would invokehook_nodeapi('load'), andhook_nodeapi('save').For point #7:
$output = 'There are not enough content types to create groups automatically. To add more content types click '. l('here', 'admin/content/types/add') .'. Make sure you have at least one group node before trying to configure automatic creation of groups per content type.'. The string is not translatable as it is not passed tot(); if then you are passing the return value of your function tot(), then it doesn't work because the first argument oft()must be a literal string, not a concatenation of strings, nor the value of a variable.Comment #6
blisstering commentedComment #7
avpadernoPlease change only the status, when you upload new code; other metadata are not though to be changed by the applicant.
Comment #8
blisstering commentedComment #9
blisstering commentedplease review this and let us know.
Comment #10
avpadernoA menu callback title should be something that communicate something to the user, see the menu titles used from Drupal, which are , , etc…
Strings used in user interface should have the first word in capital case, and the other words in lower case (with the exception of proper nouns, adjectives derived from proper nouns, and acronyms).
It should enough to check if the variable contains an array, as a boolean value is not an array.
The code saves in a variable the result of a function, which is then immediately returned to the caller.
See the Drupal coding standards to understand how a module code should be written. In particular, see how the code should be formatted, and the character to use when indenting code, and the part about the namespace respect, which is also valid for the Drupal variables defined from the module.
l()is not used togethert(); that is reported in the documentation page fort(), which reports the following text:The first argument of
t()is a literal string, not a dynamic value; differently, the script to extract the strings to translate will not extract the string.I think there is a Drupal function to get the name associated with a content type.
Comment #11
avpadernoThere have not been replies from the OP in the past 7 days. I am marking this report as .
Comment #12
blisstering commentedwe are working on the bugs and will submit soon for review
Comment #13
blisstering commented