Patch (to be ported)
Project:
Popups: Add and Reference
Version:
6.x-2.0-alpha1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2009 at 20:56 UTC
Updated:
19 Sep 2009 at 11:35 UTC
It would be nice if the popup knew which group you were in.
Easiest way of achieving that, I think, is in the patch below - open to better ideas
See also
http://drupal.org/node/382130
Cheers
Mark.
Index: popups_reference.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/popups_reference/popups_reference.module,v
retrieving revision 1.4.2.2
diff -r1.4.2.2 popups_reference.module
135a136,143
>
> if (module_exists('og')) {
> $og=og_get_group_context();
> if ($og) {
> $options['query']['gids[]']=$og->nid;
> }
> }
>
Comments
Comment #1
markfoodyburton commentedMMM, my bad, not sure it works.... seems you get a 'bad response from submission' -
Comment #2
markfoodyburton commentedIt's not so nice, but it works...
RCS file: /cvs/drupal-contrib/contributions/modules/popups_reference/popups_reference.module,v
retrieving revision 1.4.2.2
diff -r1.4.2.2 popups_reference.module
135a136,144
>
> if (module_exists('og')) {
> $og=og_get_group_context();
> if ($og) {
> $options['query']['gids[]']=$og->nid;
> $options['query']['destination'].='?gids[]='.$og->nid;
> }
> }
>
Comment #3
patchak commentedHeyyy this is exactly what I was looking for, great!! Only thing is that I'm not sure where exactly this code needs to be inserted? How about submitting a patch so we can test it?
thanks a lot!!
Patchak