Closed (fixed)
Project:
Organic Groups
Version:
6.x-2.x-dev
Component:
Og Views
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Nov 2009 at 19:01 UTC
Updated:
27 Jul 2010 at 18:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marcp commentedHere's the patch.
It adds a group of checkboxes -- one for each group node type -- to the Validator Options for the Group nodes argument validator. The help text for the checkboxes explains it this way:
This is similar to the way the Node validator explains what its checkboxes do.
There is no need for an update function -- this is fully backwards compatible as no selection retains the previous functionality of checking to make sure that the argument represents a group node.
Comment #2
marcp commentedTo apply the patch, put it in sites/all/modules/og and:
Comment #3
bonobo commentedThis is working well for us in our dev environment.
Comment #4
izmeez commentedsubscribing, I have been trying to configure an argument to do exactly this, apply to specific group type, http://drupal.org/node/638058
I will give this patch a try.
Comment #5
izmeez commentedsorry, my dev environment isn't to the point of running patches and I was hoping to be able to do this fast manually.
I am trying to apply to og 6.x-2.0 and can't seem to get my bearings with the patch. I had a quick look at the files in og 6.x-2.x-dev but still having problems. I must be missing something simple. Any help would be appreciated. Thanks.
Comment #6
izmeez commentedSorry to be a pest. I am very new to applying patches in Drupal and would appreciate any help.
I used a patch utility in WinOS to apply the patch to og 6.x-2.0 and it is not working. I am getting a .rej file. I do not know what I am supposed to make of this file. I am attaching it in case someone can suggest to me what I should try next. I would really like to use this patch.
Thanks,
Izzy
Comment #7
marcp commentedAre you applying the patch on 6.x-2.x-dev version of the codebase?
I'm attaching as a text file the one file -- modules/og_views/includes/og_views_plugin_argument_validate_og_group_types.inc -- that the patch modifies. Replace your copy of og_views_plugin_argument_validate_og_group_types.inc with this one in the appropriate place.
Comment #8
izmeez commentedThanks for the quick response.
No, I was not applying it to the dev version. I looked at the og_views_plugin_argument_validate_og_group_types.inc file in both og 6.x-2.0 and og 6.x-2.x and they looked identical.
Thanks for the file attachment. Do I need to apply the patch to this file?
Izzy
Comment #9
marcp commentedNope, that's the already patched file.
Comment #10
izmeez commentedThanks, I thought so and have run tests and it works great. I also like the additions in the validator to choose if the user is a member of the group or an admin or neither. This patch is very useful.
Izzy
Comment #11
marcp commented@izmeez - As a member of the community, you should feel free to set the status of this thing to reviewed & tested by the community. I'd do it, but I submitted the patch.
Comment #12
izmeez commentedI have tested the patch with og 6.x-2.0 and it seems to work great.
I will go ahead and change the status of the issue to reviewed by community but had previously held off because I thought it needed to reach a certain threshold to qualify for that status.
Thanks again for this very useful patch. I would suggest this should be committed to og as soon as possible as it is a feature that is fundamental to configuring the module.
Izzy
Comment #13
izmeez commentedOT: Sorry to use so much bandwidth, but I wondered about changing the title of the issue to "Group type validation for Group nodes validator" ?
I didn't change it because I find it can be confusing when others change titles of posts, so I would rather leave that to whoever started the thread or someone with a fully understanding if they think it's even worthwhile.
Comment #14
bonobo commentedChanging title --
Also, to reiterate from above: this has been working flawlessly for us.
Comment #15
bonobo commentedHello!
Any feedback on this?
This is in place, working well, and has been perfectly stable.
It allows you to be much more flexible in creating different options for group types.
Comment #16
izmeez commentedNot sure what feedback you are looking for.
I agree this is a VERY useful addition to og_views and seems to be totally stable on OG 2.0
As a novice Drupal user I'm not really clear on the next steps.
Does this patch need to be committed to the dev release so it can become part of the next release?
My quick encounter with the dev release a couple of weeks ago seemed to cause some hiccups. Unfortunately, I was too pressed for time to explore why and reverted to og 6.x-2.0
I appreciate there are efforts to address a number of the issues in the og queue for the next release and issues with views.
It would be great to see this patch in og. Meanwhile, others can apply it or use the zip file.
I'll have to find some time to test out the current og dev again soon.
Izzy
Comment #17
marcp commentedWondering if this has a chance to get committed. Should bonobo draw up some more pretty pictures?
Comment #18
bonobo commentedDid somebody ask for pretty pictures? Sweet! I'd love to!
The screenshot below shows what is added by this patch:
So, using the options shown with this patch, and the options shown in the screenshot below--
-- it is possible to show different views, for different group types, to different users based on their group membership.
To break this down into a practical use case:
Let's say a school has classes and clubs set up as group types. The person running the site wants people who manage classes to be able to email users and reset their passwords; however, all people in clubs should only be able to email members from that club.
Using this patch (in conjunction with Views Bulk Operations), this type of functionality becomes possible, and group admins/members can be given very targeted rights based on membership in a group.
Comment #19
marcp commentedWondering if this has a shot. I'm getting ready to submit a patch for another useful feature and was hoping it could count on this one being committed.
Comment #20
moshe weitzman commentedCommitted. Thanks for your patience and persistence and pictures.
Comment #21
amitaibuIt's almost there - marcp can you please add some PHPdocs to validate_group_node_type()
[edit: seems to cross post with Moshe. A follow up patch on the docs with be still nice :) ]
Comment #22
marcp commented@Amitaibu - Here are the PHPdocs for both of the undocumented helper functions in there. Always a good idea to include some documentation!
Comment #23
marcp commentedComment #24
moshe weitzman commentedComment #25
bonobo commentedIs this committed?
If not, what additional feedback/review is needed?
Comment #26
bonobo commentedAnd btw, I was referring to the PHPdocs in #22 --
Comment #27
izmeez commentedI was doing some house cleaning and noticed that the status of this ticket has not changed but the feature was committed on December 15, 2009 and is in OG 2.1
Should this issue status be changed to "fixed" or "closed" ?
Thanks.
Comment #28
amitaibuCommitted docs, thanks.