commons_poll.module in Drupal Commons 6.2
File
modules/features/commons_poll/commons_poll.module
View source
<?php
include_once 'commons_poll.features.inc';
function commons_poll_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'view':
$node->content['body']['#weight'] = -100;
break;
}
}
function commons_poll_og_features_registry() {
$registry = array();
$feature = new stdClass();
$feature->id = 'commons_poll';
$feature->name = t('Topic polls');
$feature->description = t('Enable your group members to create multiple-choice polls that other group members can vote on.');
$feature->components = array(
'views' => array(
'group_tab_polls',
),
'node' => array(
'poll',
),
'context' => array(
'group-home-poll',
'group-tab-polls',
'group-poll-node',
),
);
$registry[$feature->id] = $feature;
return $registry;
}