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.

Comments

Anonymous’s picture

Version: 5.x-2.0 » master

Yes, this would be a nice feature. I've been developing a site using OG. I'd be interested if you uploaded your patches.

pivica’s picture

StatusFileSize
new5 KB

OK 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?

Anonymous’s picture

Version: master » 5.x-2.x-dev
Status: Active » Needs work

I 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.

pivica’s picture

StatusFileSize
new5.15 KB

try this version is it ok now?

Anonymous’s picture

Please 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)".

pivica’s picture

Status: Needs work » Needs review
StatusFileSize
new6.5 KB

Hi earnie,

Thanks for the useful hints and here is new version of patch.

Anonymous’s picture

Status: Needs review » Needs work

Your new functions still need some phpdoc documentation.

/**
 * Example phpdoc documentation
 *
 * @param int $someint
 *  Provide an param sample
 * @return bool
 *  Operation status
 */
function somefunction ($someint) {
 if ($someint) {
  return TRUE
 }
 return FALSE
}

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.

CHertlein’s picture

Hey there - this OG stuff seems to work just fine for me. Any plans on making the user search filterable by group membership too?

Anonymous’s picture

Thanks 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.

pivica’s picture

Hi,

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.

pivica’s picture

StatusFileSize
new1.15 KB
new7.24 KB

Here 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.

Anonymous’s picture

Thanks for the patches. I'm out of cycles for August though I'm afraid. I'll have to review them later.

mdost@sharpdotinc.com’s picture

Did this ever go anywhere? Anyone work on a drupal 6 version?

Anonymous’s picture

Version: 5.x-2.x-dev » 6.x-3.x-dev

I began just yesterday looking at redesigning the filter options form. I'll take a look at this eventually.

brentratliff’s picture

subscribing

Anonymous’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs work » Postponed

Pushing feature request to 7.x version.