Simple patch for allow posting to a group with the following command:
og_groups: GID (group id)
--- mailhandler.bak 2007-11-14 10:10:40.147366964 -0500
+++ mailhandler.module 2007-11-14 13:11:50.891242011 -0500
@@ -237,6 +237,11 @@
if ($data[0] == 'taxonomy' && !is_numeric($data[1][0])) {
array_walk($data[1], 'mailhandler_term_map');
}
+ if ($data[0] == 'og_groups') {
+ $value = array($data[1] => $data[1]);
+ $data[1] = $value;
+ $node->is_public = 1;
+ }
$node->$data[0] = $data[1];
}
else {
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mailhandler-og_support.patch | 11.18 KB | dman |
Comments
Comment #1
dman commented+1
need something like this.
I don't think the is_public is intended though? Should be another flag.
og-public: true
?
Comment #2
dman commentedStill a good idea, still needed. The trivial patch still works, here's a current D5-dev update.
I'm using it to create drop-boxes for my groups - I set up a dummy email for special-interest@example.com and a mailhandler mailbox to check it and post updates into the 'special-interest' organic group stream.
Very appropriate.
As an improvement:
On setting up mailhandler again after some time, I found a few places where the lack of documentation stalled me. Links to the helpfiles were incorrect, I've fixed the ones I noticed.
I also gave the config form a bunch of (I think) useful defaults so that first-timers don't have to think so much. Seeing radio boxes with NEITHER option selected left me wondering what I should do. ... and I made some mistakes by taking a guess.
So the port is 110,
Emailing plaintext passwords is off,
/notls is a default extra command,
Error replies are on,
Processed messages are deleted,
and cron processing is on
... as a start.
... Oh dear, this patch looks heavy, but it's not really that big. Just some small #default_values changed in the form, and some help text. It's because each of the form widget lines is several hundred columns wide... the diff pads it out hugely.
Comment #3
z.stolar commentedThere's a similar patch for defaults here: http://drupal.org/node/300389
Can you break your patch into several of them, so each one treats a different problem?
Thanks for the efforts!
Comment #4
ilo commentedSome of the errors in this patch are already fixed in the CVS (6.x-1.x-dev). The Organic groups integration would better be reviewed and discussed here: #26941: Associate submitted e-mail to an organic group (Organic groups integration)..