Hi,
It would be nice to add support for organic groups - for example to allow adding/removing multiple users to groups.
Now I am not sure should that feature need to be added to advuser or maybe to og module through user_operations callback.
Anyway for now I have patched advuser to allow adding multiple users to some organic group. If anybody is interested I can also add removing from organic groups and then upload patch here so others can test it.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | advuser.module.og_.patch | 7.24 KB | pivica |
| #11 | advuser_filters.inc_.og_.patch | 1.15 KB | pivica |
| #6 | advuser.module.og_.patch | 6.5 KB | pivica |
| #4 | advuser.module.og_.patch | 5.15 KB | pivica |
| #2 | advuser.module.og_.patch | 5 KB | pivica |
Comments
Comment #1
Anonymous (not verified) commentedYes, this would be a nice feature. I've been developing a site using OG. I'd be interested if you uploaded your patches.
Comment #2
pivica commentedOK here is first version of patch (note that i have created this patch against 5.x-2.0 version). I have also added support for removing users from organic group.
The next thing that would maybe be nice is adding filters for groups - so you can use advuser to filter users from only chosen group. What do you think?
Comment #3
Anonymous (not verified) commentedI prefer the patches to be cvs based differences. See the http://drupal.org/handbook/cvs guide if you need help with that. Or just ask me.
Yes adding OG filtering logic would be good.
Comment #4
pivica commentedtry this version is it ok now?
Comment #5
Anonymous (not verified) commentedPlease add some docbook/doxygen comments to the new functions. One of the near future goals is to be standard with coding and to be able to look at http://drupal.kollm.org/doxygen/_contrib/drupal-contrib-phpdoc/dirs.html, find advuser and see http://drupal.kollm.org/doxygen/_contrib/drupal-contrib-phpdoc/advuser_2... to get the documented version of the module.
Your JOIN
+ $result = db_query('SELECT node.nid as nid, title FROM {node} JOIN {og} WHERE node.nid = og.nid');needs to use ON instead of WHERE and I like to read the joined criteria on the left.+ $result = db_query('SELECT node.nid as nid, title FROM {node} JOIN {og} ON og.nid = node.nid');But this still isn't enough, since {node} and {og} are replaced with a defined $prefix the statement will fail in those cases where $prefix is defined. The fully corrected version is:+ $result = db_query('SELECT n.nid, n.title FROM {node} n JOIN {og} og ON og.nid = n.nid');Your other queries suffer from the same $prefix fate.When you upload your new patch please change the status to "patch (code needs review)".
Comment #6
pivica commentedHi earnie,
Thanks for the useful hints and here is new version of patch.
Comment #7
Anonymous (not verified) commentedYour new functions still need some phpdoc documentation.
You might want to check http://manual.phpdoc.org/HTMLframesConverter/DOM/default/ or http://www.stack.nl/~dimitri/doxygen/docblocks.html. I plan to test your patch further beginning Monday.
Comment #8
CHertlein commentedHey there - this OG stuff seems to work just fine for me. Any plans on making the user search filterable by group membership too?
Comment #9
Anonymous (not verified) commentedThanks for testing and the report. Ivica had mentioned that he was working on a patch for filtering by OG as well. I'm looking forward to it. I've been currently too busy with other things in life and haven't had a chance to give this more attention. We still need the phpdoc documentation comments.
Comment #10
pivica commentedHi,
Yes I will implement OG filtering but can't tell exactly when - i am also very busy at this moment. But will try to do some work on this and phpdoc next weekend.
Comment #11
pivica commentedHere is new version of patch, this time i also added og filter support. Tested a little bit and Its seems it works fine for 'EQ' operation.
Comment #12
Anonymous (not verified) commentedThanks for the patches. I'm out of cycles for August though I'm afraid. I'll have to review them later.
Comment #13
mdost@sharpdotinc.com commentedDid this ever go anywhere? Anyone work on a drupal 6 version?
Comment #14
Anonymous (not verified) commentedI began just yesterday looking at redesigning the filter options form. I'll take a look at this eventually.
Comment #15
brentratliff commentedsubscribing
Comment #16
Anonymous (not verified) commentedPushing feature request to 7.x version.