How can I set the audience automatically?
In my site the users can only belong to one group.
And I don't want public content (at least created by the users).
I would like to avoid them the annoying task to tick the checkbox everytime they add new content.
There is any way?

Many thanks

Comments

JohnnyBeGood-dupe2’s picture

Any Idea?

JohnnyBeGood-dupe2’s picture

I've already found a solution.

Thanks anyway

robin van emden’s picture

See that you already found a solution. Still, for the record, one way to make this work in D6 / Drupal Commons would be to add the following to your template.php (or, better, in a custom modules hook_form_alter):

function tplname_node_form($form)
{
  if (isset($form['og_nodeapi']['visible']) && $form['og_nodeapi']['visible']['og_groups']['#default_value']==null) drupal_goto( url($_GET['q'], array('absolute' => true)).'?gids[0]=453') ;
}

Where 453 is a in our case a default group that is selected in case no default group was found.