function _drupal_commons_default_group_node in Drupal Commons 6.2
Provide a default group during installation
1 call to _drupal_commons_default_group_node()
- drupal_commons_create_group in ./
drupal_commons.profile - Create an initial group with a discussion
File
- includes/
node.inc, line 11 - Contains node definitions
Code
function _drupal_commons_default_group_node() {
module_load_include('inc', 'node', 'node.pages');
$group = new stdClass();
$group->type = 'group';
node_object_prepare($group);
$group->uid = 1;
$group->status = 1;
$group->format = 1;
$group->revision = 0;
$group->title = st('Our Community');
$group->body = st('Commons provides the software; but we the people need to work out the human aspects of helping this community to succeed. Let's collaborate on that using this group.');
$group->teaser = node_teaser($group->body);
$group->created = time();
$group->field_featured_group = array(
0 => array(
'value' => 'Featured',
),
);
$group->og_description = st('A group for collaborating to make this community site successful');
$group->taxonomy['tags'][2] = st('community');
$group->og_private = 0;
$group->og_directory = 1;
$group->og_register = 0;
$group->og_selective = 0;
return $group;
}