Skip to content

Commit

Permalink
Issue #85: Add events feature for Community component
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldonrampton committed Mar 18, 2013
1 parent 29e3587 commit 154f0a7
Show file tree
Hide file tree
Showing 9 changed files with 1,691 additions and 0 deletions.
832 changes: 832 additions & 0 deletions modules/features/occomm_events/occomm_events.features.field.inc

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions modules/features/occomm_events/occomm_events.features.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* @file
* occomm_events.features.inc
*/

/**
* Implements hook_ctools_plugin_api().
*/
function occomm_events_ctools_plugin_api() {
list($module, $api) = func_get_args();
if ($module == "field_group" && $api == "field_group") {
return array("version" => "1");
}
list($module, $api) = func_get_args();
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}

/**
* Implements hook_views_api().
*/
function occomm_events_views_api() {
return array("api" => "3.0");
}

/**
* Implements hook_node_info().
*/
function occomm_events_node_info() {
$items = array(
'event' => array(
'name' => t('Event'),
'base' => 'node_content',
'description' => t('An <b>Event</b> could be a local hackathon or any other event with a time, place and date where people meet.'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
);
return $items;
}
36 changes: 36 additions & 0 deletions modules/features/occomm_events/occomm_events.features.taxonomy.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* @file
* occomm_events.features.taxonomy.inc
*/

/**
* Implements hook_taxonomy_default_vocabularies().
*/
function occomm_events_taxonomy_default_vocabularies() {
return array(
'event_type' => array(
'name' => 'Event type',
'machine_name' => 'event_type',
'description' => 'For use in classifying events.',
'hierarchy' => '0',
'module' => 'taxonomy',
'weight' => '0',
'rdf_mapping' => array(
'rdftype' => array(
0 => 'skos:ConceptScheme',
),
'name' => array(
'predicates' => array(
0 => 'dc:title',
),
),
'description' => array(
'predicates' => array(
0 => 'rdfs:comment',
),
),
),
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* @file
* occomm_events.features.uuid_term.inc
*/

/**
* Implements hook_uuid_features_default_terms().
*/
function occomm_events_uuid_features_default_terms() {
$terms = array();

$terms[] = array(
'name' => 'Workshop',
'description' => '',
'format' => 'filtered_html',
'weight' => '0',
'uuid' => '00bfc981-7e49-4948-9552-30e3d99bdca3',
'vocabulary_machine_name' => 'event_type',
);
$terms[] = array(
'name' => 'Conference',
'description' => '',
'format' => 'filtered_html',
'weight' => '0',
'uuid' => 'ac08ace2-f9d0-4acd-8ea2-869a6e6af847',
'vocabulary_machine_name' => 'event_type',
);
$terms[] = array(
'name' => 'Meeting',
'description' => '',
'format' => 'filtered_html',
'weight' => '0',
'uuid' => 'fcdf6524-076c-4146-a7f7-9a48df2ceae1',
'vocabulary_machine_name' => 'event_type',
);
return $terms;
}
100 changes: 100 additions & 0 deletions modules/features/occomm_events/occomm_events.field_group.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php
/**
* @file
* occomm_events.field_group.inc
*/

/**
* Implements hook_field_group_info().
*/
function occomm_events_field_group_info() {
$export = array();

$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_basic_info|node|event|form';
$field_group->group_name = 'group_basic_info';
$field_group->entity_type = 'node';
$field_group->bundle = 'event';
$field_group->mode = 'form';
$field_group->parent_name = 'group_main';
$field_group->data = array(
'label' => 'Basic info',
'weight' => '52',
'children' => array(
0 => 'body',
1 => 'field_event_type',
2 => 'field_start_date',
3 => 'title',
),
'format_type' => 'tab',
'format_settings' => array(
'formatter' => 'closed',
'instance_settings' => array(
'description' => '',
'classes' => '',
'required_fields' => 1,
),
),
);
$export['group_basic_info|node|event|form'] = $field_group;

$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_location|node|event|form';
$field_group->group_name = 'group_location';
$field_group->entity_type = 'node';
$field_group->bundle = 'event';
$field_group->mode = 'form';
$field_group->parent_name = 'group_main';
$field_group->data = array(
'label' => 'Location',
'weight' => '53',
'children' => array(
0 => 'field_telephone',
1 => 'field_url',
2 => 'field_location',
3 => 'field_coordinates',
),
'format_type' => 'tab',
'format_settings' => array(
'formatter' => 'closed',
'instance_settings' => array(
'description' => '',
'classes' => '',
'required_fields' => 1,
),
),
);
$export['group_location|node|event|form'] = $field_group;

$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_main|node|event|form';
$field_group->group_name = 'group_main';
$field_group->entity_type = 'node';
$field_group->bundle = 'event';
$field_group->mode = 'form';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Main',
'weight' => '0',
'children' => array(
0 => 'group_basic_info',
1 => 'group_location',
),
'format_type' => 'tabs',
'format_settings' => array(
'formatter' => '',
'instance_settings' => array(
'classes' => '',
),
),
);
$export['group_main|node|event|form'] = $field_group;

return $export;
}
63 changes: 63 additions & 0 deletions modules/features/occomm_events/occomm_events.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name = OCComm Events
description = Provides the event type and a calendar of events.
core = 7.x
package = Community
php = 5.2.4
version = 7.x-1.0-beta1
project = occomm_events
dependencies[] = addressfield
dependencies[] = better_exposed_filters
dependencies[] = calendar
dependencies[] = cck_phone
dependencies[] = date
dependencies[] = date_ical
dependencies[] = date_views
dependencies[] = field_group
dependencies[] = geocoder
dependencies[] = geofield
dependencies[] = link
dependencies[] = rdfx
dependencies[] = schemaorg
dependencies[] = strongarm
dependencies[] = taxonomy
dependencies[] = text
dependencies[] = uuid_features
dependencies[] = views
features[ctools][] = field_group:field_group:1
features[ctools][] = strongarm:strongarm:1
features[ctools][] = views:views_default:3.0
features[features_api][] = api:1
features[field][] = node-event-body
features[field][] = node-event-field_coordinates
features[field][] = node-event-field_event_type
features[field][] = node-event-field_location
features[field][] = node-event-field_start_date
features[field][] = node-event-field_telephone
features[field][] = node-event-field_url
features[field_group][] = group_basic_info|node|event|form
features[field_group][] = group_location|node|event|form
features[field_group][] = group_main|node|event|form
features[node][] = event
features[taxonomy][] = event_type
features[uuid_term][] = 00bfc981-7e49-4948-9552-30e3d99bdca3
features[uuid_term][] = ac08ace2-f9d0-4acd-8ea2-869a6e6af847
features[uuid_term][] = fcdf6524-076c-4146-a7f7-9a48df2ceae1
features[variable][] = comment_anonymous_event
features[variable][] = comment_default_mode_event
features[variable][] = comment_default_per_page_event
features[variable][] = comment_event
features[variable][] = comment_form_location_event
features[variable][] = comment_preview_event
features[variable][] = comment_subject_field_event
features[variable][] = field_bundle_settings_node__event
features[variable][] = menu_options_event
features[variable][] = menu_parent_event
features[variable][] = node_options_event
features[variable][] = node_preview_event
features[variable][] = node_submitted_event
features[views_view][] = event_calendar
features_exclude[dependencies][ctools] = ctools
features_exclude[dependencies][features] = features
features_exclude[dependencies][options] = options
features_exclude[dependencies][rdf] = rdf
features_exclude[dependencies][uuid] = uuid
7 changes: 7 additions & 0 deletions modules/features/occomm_events/occomm_events.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
/**
* @file
* Code for the OCComm Events feature.
*/

include_once 'occomm_events.features.inc';
Loading

0 comments on commit 154f0a7

Please sign in to comment.