This patch introduces a new views argument to allow a view to have an argument for UID that then filters on that users subscription to the nodes in the view. This is useful for creating views to see the groups another user is subscribed to. E.g. 'John's groups' at user/123/groups where user 'John' has UID 123, and John is NOT the user making the request.
This patch also introduces some minor coding style improvements, and some changes to filter descriptions to make them clearer.
The CVS patch includes changes from http://drupal.org/node/194038 and http://drupal.org/node/166244
The SVN patch has the changes covered in this issue exclusively, although it probably won't apply without the above patches applied first.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 196488.patch | 1.72 KB | douggreen |
| #12 | 196488.patch | 1.72 KB | douggreen |
| #9 | 196488.patch | 1.58 KB | douggreen |
| #8 | 196488.patch | 6.17 KB | Bevan |
| #8 | 196488.svn_.patch | 5.06 KB | Bevan |
Comments
Comment #1
moshe weitzman commentedI want to add warning text like "This argument exposes a user's group subscriptions to other users. Depending on your site, this may be a violation of their privacy. Use thoughfully."
No longer applies cleanly. Sorry. The intent of the patch is good and committable.
Comment #2
Bevan commentedBugger. This patch has come through work on a CivicActions' client's site. I'll re-submit the patch when updates come through...
I assume you want this for head, right? Which is no longer 4.0, right?
Comment #3
owen barton commentedSubscribe
Comment #4
moshe weitzman commentedHEAD and DRUPAL-5 beacnhes are identical right now and thats the basis for patchers. Right now, they are nearly identical to 5.4.1 except for 1 minor UI fix.
Comment #5
Jkello commentedsubscribe.
So is group 4.2 now able to do this? To View a user base on the groups that the user is subscribe to? Thanks.
Comment #6
Bevan commentednot yet. feel free to have a go at porting the patch though.
Comment #7
Bevan commentedRe-rolled for head.
The CVS patch includes the newly re-rolled patch at http://drupal.org/node/166244
The SVN patch excludes it.
(The previously mentioned patch at http://drupal.org/node/194038 is now committed to CVS)
Comment #8
Bevan commentedWoops, missed a patched bug.
Comment #9
douggreen commentedAttached is a cleaner patch that only adds the new functionality.
@Bevan, please review to make sure I got it right. Also, I noticed a lot of "usability" changes in your patch that has nothing to do with the new feature. Drupal recommends that you try to keep patches to just one issue. If you see "usability" issues, you should probably create a separate issue with just those changes. See http://drupal.org/patch/create "Separating your changes".
Comment #10
douggreen commentedOh, and the new patch applies against the latest version...
Comment #11
moshe weitzman commentedthanks doug. please add warning text like i suggested above. also, no need to run db_query_range() when db_query() will suffice.
Comment #12
douggreen commentedAttached patch replaces
Comment #13
Vuds commentedIn fact the patch is working, but it's only showing the communities for the current user = uid collected in the views' argument. If I try to see another user, it's showing nothing (I'm using panels to overcome on user profiles and using this view as a block-panel).
Another thing to be fixed:
'help' => t('Filter for groups that user is subscribed to. User is specified by user ID (integer). This argument exposes a user\'s group subscriptions to other users. Depending on your site, this may be a violation of their privacy. Use it thoughfully.'),line 338, it's needing to put that \' in "user's" to avoid closing the argument.
Comment #14
douggreen commentedThis patch fixes the quote problem identified by Vuds. I'm marking back to needs review. Could someone else test Vuds claim, that "it's only showing the communities for the current user = uid." Looking at the code, I don't see why that would be the case.
Comment #15
arthurf commentedApplied cleanly for me and the escaped slash works as advertised. Marking tested by community...
Comment #16
moshe weitzman commentedCommitted. Thanks all.
Comment #17
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #18
niklp commentedThis is not present in 6.x-2.x! Just spent a *serious* amount of time trying to work out how to achieve this...
Going to look at the patch and see what gives.
Comment #19
greg.harvey*mumble* *grumble* NikLP beat me to it... =/
Comment #20
niklp commentedNope. No idea...
Comment #21
niklp commentedI did *not* reassign that - must have been using back button and form settings stuck. Sorry Bevan! :)
Comment #22
niklp commentedSo. Nada. In which case, I present some choices:
1) You fool! This is already available but is cleverly disguised as "feature x"
2) This isn't in 6.x, because of a glaring omission
3) This was taken out of 6.x because of security / niche use case
4) We need a new patch for 6.x
Someone tell which it is at least, so I know where to place my efforts? :)
Comment #23
webkenny commentedI agree. This is a needed aspect especially if you are using Views for nodereferences. I wonder if maybe it is somewhere else. Hmmmmm.
Comment #24
niklp commentedUgh. This is actually covered by the "Organic groups: Member of a group" thing - assign this as an argument, pass in a uid and you will have access to all the group data that this uid is a member of. Filters etc all work as normal.
Normal service may now be resumed. Would have been nice if someone could have mentioned this two weeks ago tho :/
Comment #25
Bevan commentedNikLP; this is in the the "Organic groups: Member of a group" argument settings. But you know that already now. ;p
Sorry I didn't answer 2 weeks ago. I was offline...