Needs review
Project:
Subgroups for Organic groups
Version:
6.x-1.0-beta3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2011 at 11:00 UTC
Updated:
15 Nov 2011 at 08:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
bschilt commentedThanks for working on this. Seems like it would be a good option to add as long as its done right and won't drastically affect currently installed modules. I would like to see this patch applied to both content and users. On the propagation settings page, users should only be able to enable propagation on content types that are group nodes and have been enabled on the main subgroups settings page.
Also I don't want to disrupt currently installed versions so when a site upgrades subgroups and doesn't check any propagation boxes, it should continue to propagate content and users as it does in the current version.
We only need to retrieve the content types that are "subgroups enabled". Doesn't make sense to get all content types.
The checkboxes will need to enable propagation for the selected content types, not prevent propagation.
If no checkboxes are ticked then all content types will have propagation, this way the default subgroups behavior is preserved.
Also remove the trailing white spaces.
change variable name to 'og_subgroups_propagate_enabled_{$content_type}'
Follow the way its done on the main subgroups settings page.
Let me know if you have questions or need me to clear anything up.
Thanks
Comment #2
aheredia commentedOnly one thing. In my patch by default all checkboxes are not selected so the propagation would take place for all content types, only those content types with the checkbox selected will not propagate.Doing this way all subgroups enabled before appliying this patch will propagate all their content types. I'm not sure if this is the correct behavior.
Please excuse my limited English
Comment #3
bschilt commentedDrupal core has already set a precedence for this type of thing. Take a look at the block add/edit form (admin/build/block/add) and scroll down to the "Role specific visibility settings" fieldset. When selecting block visibility by role it says "Show this block only for the selected role(s). If you select no roles, the block will be visible to all users" in the description.
I would like this feature to be implemented in a similar way. If no checkboxes are ticked for enabling content/user propagation, then propagation should happen to all enabled subgroups. But if a box is ticked then propagation only happens to that particular group(s).
Comment #4
aheredia commentedOk. You are right.
Comment #5
aheredia commentedI think I've made the required changes.
Please Have a look if they are correct
Thanks
Comment #6
bschilt commentedYou will need to submit a new patch with a different name. You cannot use # in the patch name, see #284899: Drupal url problem with clean urls
Review the Submitting Patches page for best practices.
Comment #7
aheredia commentedSorry i'm newbie
Comment #8
aheredia commentedI forgot to change the status
Comment #9
bschilt commentedThis is a little closer but the available options should be the groups that have been "enabled" on the subgroups settings page. In your foreach loop, use the og_subgroups_node_type_enabled_{$type} variable to determine which group types are enabled.
Instead of using the checkboxes form field, use the same method that is used in the og_subgroups_settings() function to display the node types to enable. Except that the possible values will only be the group types have have been enabled.
This would no longer be needed
only need to check a single variable... if(variable_get(og_subgroups_propagate_enabled_{node->type}, FALSE))
Comment #10
lahode commentedHi for your info, the patch I published few weeks ago does that:
http://drupal.org/node/1226002#comment-5088694
Still wondering however why there is new updates for this module...
Cheers
Comment #11
aheredia commentedI'm a little bit lost.
The idea of the patch was to being able to select what content types defined as group post would be propagated.
So i've used the function og_get_types('group_post') to select that content types first. i don't realise why i've to use og_subgroups_node_type_enabled_{$type} :( which defines what content types are a group container.
Another dude is why shouldn't be new updates for this module. Only version for drupal 7 is active?
Comment #12
lahode commentedHi Aheredia,
Sorry, I made a mistake when filtering the issues. My patch is for D7, I leave Bshilt reply to your answer as OG Group in D6 is a completely different concept
Cheers
Comment #13
aheredia commentedThanks for the explanation
"I made a mistake when filtering the issues" Dont worry this can happen to anyone.
regards
Comment #14
aheredia commentedI'm a little bit lost.
The idea of the patch was to being able to select what content types defined as group post would be propagated.
So i've used the function og_get_types('group_post') to select that content types first. i don't realise why i've to use og_subgroups_node_type_enabled_{$type} :( which defines what content types are a group container.