Popoup refference and OG
markfoodyburton - September 17, 2009 - 20:56
| Project: | Popups: Add and Reference |
| Version: | 6.x-2.0-alpha1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Jump to:
Description
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;
> }
> }
>

#1
MMM, my bad, not sure it works.... seems you get a 'bad response from submission' -
#2
It'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;
> }
> }
>
#3
Heyyy 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