Closed (fixed)
Project:
OG Mailinglist
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2010 at 21:27 UTC
Updated:
1 Oct 2010 at 06:20 UTC
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
Comment #1
kyle_mathews commentedOoops, and if you use the above code, you'll want to remove the two lines starting w/ dd as they're debugging code.
Comment #2
nigelcunningham commentedI'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.
Comment #3
kyle_mathews commentedOK, done.
http://github.com/KyleAMathews/og_mailinglist/commit/726608d734e66870f2b...
Comment #4
kyle_mathews commentedComment #5
tobias commentedI 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
Comment #6
kyle_mathews commentedI 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.