I wrote a small ogm submodule today for a client which helps og_mailinglist work with og_forum. I'll include it below in case anyone is interested but this raises the question of what to do with these various submodules which will need to written for og_mailinglist to work for various use cases? Add them to the OG Mailinglist project or push them out into their own projects?

name = OG Mailinglist OG Forum
description = "Modifies incoming emails so they'll be placed in the default group forum."
dependencies[] = og_mailinglist
package = "Organic groups"
core = "6.x"

/**
 * Implementation of hook_og_mailinglist_save_node_alter().
 */
function og_mailinglist_og_forum_og_mailinglist_save_node_alter(&$node) {
  dd($node, 'node in og_forum_alter');
  dd(current($node->og_groups), 'og_groups value');
  $forum_id = db_result(db_query("SELECT tid
                                  FROM {og_term}
                                  WHERE nid = %d", current($node->og_groups)));
  $node->tid = $forum_id;
}

Comments

kyle_mathews’s picture

Ooops, and if you use the above code, you'll want to remove the two lines starting w/ dd as they're debugging code.

nigelcunningham’s picture

I'd suggest including them in og_mailinglist itself, especially when they're as small as this one.

That's what I've done for submodules I've made for Mailfix that provide views integration and such like.

kyle_mathews’s picture

Status: Active » Fixed
tobias’s picture

I support this approach as well - any functionality like this that makes OGM useful for more use cases is welcome as long as it doesn't move away from the "main mission" that OGM has as list manager and change the functionality/UI for regular users or affect performance etc. If the admin config page gets long with lots of options that's ok too.

Interesting to see forums being supported - I have never really fully understood the benefit of drupal's forum modules and would be interested in seeing a good example of one, esp with OGM.

Cheers,

Tobias

kyle_mathews’s picture

I think some people just like the forum look and feel. I think it looks outdated now and would rather just create a custom node type w/ views + theming. But to each their own.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.