Skip to content
Snippets Groups Projects
Commit 23d6fab4 authored by kpaxman's avatar kpaxman
Browse files

Create 1.16 from 1.15.3

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 1156 additions and 0 deletions
css/images/add-calendar-icon-33x20.png

1.59 KiB

css/images/ical-feed-icon-34x14.png

1.87 KiB

.view .event {border-bottom: solid 1px #ddd; margin-bottom: 1em;}
.view .event .event-title {border: none; font-size: 1.1em; font-weight: normal; margin-bottom: .2em;}
.view .event .event-title a {text-decoration: underline;}
.view .event .event-date {color: #555; margin-bottom: .5em;}
.view .event img {float: left; margin-right: 10px; margin-bottom: 1em;}
.page-events .view-footer {text-align: right;}
.event-content .field_event_date .field-data {font-size: 1.3em; color: #555; margin-bottom: 1em;}
.event-content .field_event_date .date-display-end {white-space: nowrap;}
.event-content .field_event_date .field-data.multiple {font-size: 1em;}
.event-content .field_event_location .address-content {margin-top: .5em; color: #333;}
.event-content .details {border-top: solid 1px #ddd; margin-top: .5em;}
.event-content .details .field {border-bottom: solid 1px #ddd; padding: .5em 0;}
.event-content .details .field .field-label {width: 8em; font-weight: normal; font-style: italic; color: #555;}
.event-content .details .field .field-data .location .adr {margin-left: 8em; margin-bottom: 0.5em;}
.front .block-events li {margin-bottom: 0;}
.front .block-events ol {margin-bottom: .5em; padding: 0;}
.front .event-date {display: inline-block; width: 110px; font-size: .85em; color: #444;}
.front .event-link-title {width: 380px; display: inline-block; vertical-align: top;}
.front .events-more-link {display: inline-block; margin-left: 110px; font-weight: bold;}
.block-events .feed-icon a {
background: url("images/ical-feed-icon-34x14.png") no-repeat scroll 0 0 transparent;
display: inline-block;
line-height: 16px;
margin-bottom: 10px;
padding-left: 40px;
}
.individual-event-ical a {
margin-left: 0.5em;
}
This diff is collapsed.
/** Adds the ability to select a pre-existing location, making an AJAX call to populate the data from a central location
*/
(function ($) {
Drupal.behaviors.uw_ct_event = {
attach: function (context, settings) {
if($("#autofill-location-data").length === 0){
$locations = $('<select>').addClass('form-select').attr('id', settings.uw_ct_event.selectId);
// create the list of locations
if (settings.uw_ct_event.data) {
// add first location placeholder
$locations.append($('<option>').text(settings.uw_ct_event.custom).attr('value', 'custom'));
// add location selections
$.each(settings.uw_ct_event.data, function(key, value) {
$locations.append($('<option>').text(value.name).attr('value', key));
});
//add the list to the page
$locations.insertBefore('#' + settings.uw_ct_event.containerId, context)
$locations.wrap($('<div>').addClass('form-item'));
$locations.before($('<label>').text(settings.uw_ct_event.label).attr('for', settings.uw_ct_event.selectId));
$locations.after($('<div>').text(settings.uw_ct_event.description).addClass('description'));
//set location data when the list changes
$locations.change(function() {
if ($locations.val() != 'custom') {
_populate_location_data(settings.uw_ct_event.data[$locations.val()])
}
else {
_populate_location_data(
{
name: '',
additional: '',
street: '',
city: '',
province: '',
postal_code: '',
country: 'ca',
latitude: '',
longitude: ''
}
);
}
});
}
}
}
};
// TODO: use a variable setting from Drupal for the field name / language id selector
function _populate_location_data(data) {
$('#edit-field-event-location-und-0-name').val(data.name);
$('#edit-field-event-location-und-0-additional').val(data.additional);
$('#edit-field-event-location-und-0-street').val(data.street);
$('#edit-field-event-location-und-0-city').val(data.city);
$('#edit-field-event-location-und-0-province').val(data.province);
$('#edit-field-event-location-und-0-postal-code').val(data.postal_code);
$('#edit-field-event-location-und-0-country').val(data.country);
$('#edit-field-event-location-und-0-locpick-user-latitude').val(data.latitude);
$('#edit-field-event-location-und-0-locpick-user-longitude').val(data.longitude);
}
}(jQuery));
<?php
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - $block->subject: Block title.
* - $content: Block content.
* - $block->module: Module that generated the block.
* - $block->delta: An ID for the block, unique within each module.
* - $block->region: The block region embedding the current block.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
* - block: The current template type, i.e., "theming hook".
* - block-[module]: The module generating the block. For example, the user module
* is responsible for handling the default user navigation block. In that case
* the class would be "block-user".
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* Helper variables:
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
* - $zebra: Same output as $block_zebra but independent of any block region.
* - $block_id: Counter dependent on each block region.
* - $id: Same output as $block_id but independent of any block region.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
* - $block_html_id: A valid HTML ID and guaranteed unique.
*
* @see template_preprocess()
* @see template_preprocess_block()
* @see template_process()
*/
?>
<div class="block-events block-list-archive"<?php print $attributes; ?>>
<?php if ($block->subject): ?>
<?php print render($title_prefix); ?>
<h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2>
<?php print render($title_suffix); ?>
<?php endif;?>
<?php print $content ?>
</div>
\ No newline at end of file
<?php
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - $block->subject: Block title.
* - $content: Block content.
* - $block->module: Module that generated the block.
* - $block->delta: An ID for the block, unique within each module.
* - $block->region: The block region embedding the current block.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
* - block: The current template type, i.e., "theming hook".
* - block-[module]: The module generating the block. For example, the user module
* is responsible for handling the default user navigation block. In that case
* the class would be "block-user".
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* Helper variables:
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
* - $zebra: Same output as $block_zebra but independent of any block region.
* - $block_id: Counter dependent on each block region.
* - $id: Same output as $block_id but independent of any block region.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
* - $block_html_id: A valid HTML ID and guaranteed unique.
*
* @see template_preprocess()
* @see template_preprocess_block()
* @see template_process()
*/
?>
<div class="block-list-audience"<?php print $attributes; ?>>
<?php if ($block->subject): ?>
<?php print render($title_prefix); ?>
<h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2>
<?php print render($title_suffix); ?>
<?php endif;?>
<?php print $content ?>
</div>
\ No newline at end of file
<?php
/**
* @file field.tpl.php
* Default template implementation to display the value of a field.
*
* This file is not used and is here as a starting point for customization only.
* @see theme_field()
*
* Possible override templates are:
*
* field.tpl.php
* field--field-type.tpl.php
* field--field-name.tpl.php
* field--content-type.tpl.php
* field--field-name--content-type.tpl.php
*
* Available variables:
* - $items: An array of field values. Use render() to output them.
* - $label: The item label.
* - $label_hidden: Whether the label display is set to 'hidden'.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the
* following:
* - field: The current template type, i.e., "theming hook".
* - field-name-[field_name]: The current field name. For example, if the
* field name is "field_description" it would result in
* "field-name-field-description".
* - field-type-[field_type]: The current field type. For example, if the
* field type is "text" it would result in "field-type-text".
* - field-label-[label_display]: The current label position. For example, if
* the label position is "above" it would result in "field-label-above".
*
* Other variables:
* - $element['#object']: The entity to which the field is attached.
* - $element['#view_mode']: View mode, e.g. 'full', 'teaser'...
* - $element['#field_name']: The field name.
* - $element['#field_type']: The field type.
* - $element['#field_language']: The field language.
* - $element['#field_translatable']: Whether the field is translatable or not.
* - $element['#label_display']: Position of label display, inline, above, or
* hidden.
* - $field_name_css: The css-compatible field name.
* - $field_type_css: The css-compatible field type.
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
*
* @see template_preprocess_field()
* @see theme_field()
*/
?>
<div class="field <?php print $element['#field_name'] ?> field-label-<?php print $element['#label_display']; ?> clearfix"<?php print $attributes; ?>>
<?php if (!$label_hidden): ?>
<div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>&nbsp;</div>
<?php endif; ?>
<div class="field-data <?php if (count($items)>1): print 'multiple'; endif; ?>"<?php print $content_attributes; ?>>
<?php foreach ($items as $delta => $item): ?>
<div<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div>
<?php endforeach; ?>
</div>
</div>
<?php
/**
* @file
* Default theme implementation to display a node.
*
* Available variables:
* - $title: the (sanitized) title of the node.
* - $content: An array of node items. Use render($content) to print them all,
* or print a subset such as render($content['field_example']). Use
* hide($content['field_example']) to temporarily suppress the printing of a
* given element.
* - $user_picture: The node author's picture from user-picture.tpl.php.
* - $date: Formatted creation date. Preprocess functions can reformat it by
* calling format_date() with the desired parameters on the $created variable.
* - $name: Themed username of node author output from theme_username().
* - $node_url: Direct url of the current node.
* - $display_submitted: Whether submission information should be displayed.
* - $submitted: Submission information created from $name and $date during
* template_preprocess_node().
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the
* following:
* - node: The current template type, i.e., "theming hook".
* - node-[type]: The current node type. For example, if the node is a
* "Blog entry" it would result in "node-blog". Note that the machine
* name will often be in a short form of the human readable label.
* - node-teaser: Nodes in teaser form.
* - node-preview: Nodes in preview mode.
* The following are controlled through the node publishing options.
* - node-promoted: Nodes promoted to the front page.
* - node-sticky: Nodes ordered above other non-sticky nodes in teaser
* listings.
* - node-unpublished: Unpublished nodes visible only to administrators.
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* Other variables:
* - $node: Full node object. Contains data that may not be safe.
* - $type: Node type, i.e. story, page, blog, etc.
* - $comment_count: Number of comments attached to the node.
* - $uid: User ID of the node author.
* - $created: Time the node was published formatted in Unix timestamp.
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
* - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
* teaser listings.
* - $id: Position of the node. Increments each time it's output.
*
* Node status variables:
* - $view_mode: View mode, e.g. 'full', 'teaser'...
* - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
* - $page: Flag for the full page state.
* - $promote: Flag for front page promotion state.
* - $sticky: Flags for sticky post setting.
* - $status: Flag for published status.
* - $comment: State of comment settings for the node.
* - $readmore: Flags true if the teaser content of the node cannot hold the
* main body content.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
*
* Field variables: for each field instance attached to the node a corresponding
* variable is defined, e.g. $node->body becomes $body. When needing to access
* a field's raw values, developers/themers are strongly encouraged to use these
* variables. Otherwise they will have to explicitly specify the desired field
* language, e.g. $node->body['en'], thus overriding any language negotiation
* rule that was previously applied.
*
* @see template_preprocess()
* @see template_preprocess_node()
* @see template_process()
*/
?>
<?php
$feed_url = "ical/" . $node->nid . "/calendar.ics";
$img_variables = array(
//'path' => path_to_theme() . '/images/add-calendar-icon-33x20.png',
'path' => drupal_get_path('module', 'uw_ct_event') . '/css/images/add-calendar-icon-33x20.png',
'alt' => 'Export this event to calendar',
'title' => 'Export this event to calendar',
'width' => '33',
'height' => '20',
);
?>
<h1<?php print $title_attributes; ?> class="individual-event-ical"><?php print $title; ?><a href="<?php print $feed_url; ?>"><?php print theme('image', $img_variables);?></a></h1>
<div class="clearfix"<?php print $attributes; ?>>
<div class="event-content"<?php print $content_attributes; ?>>
<?php if (!$page): ?>
<?php print render($title_prefix); ?>
<?php print render($title_suffix); ?>
<?php endif; ?>
<?php print render($content['field_event_date']); ?>
<?php print render($content['body']); ?>
<div class="details">
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
print render($content);
?>
</div>
</div>
<?php print render($content['links']); ?>
</div>
<div id="site" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<div id="skip">
<a href="#main" class="element-invisible element-focusable" accesskey="S"><?php print t('Skip to main'); ?></a>
<a href="#footer" class="element-invisible element-focusable"><?php print t('Skip to footer'); ?></a>
</div>
<div id="header">
<?php print render($page['global_header']); ?>
<div id="site-header"><a href="<?php print $front_page ?>" title="<?php print $site_name; ?>" rel="home"><img src="<?php print $logo; ?>" alt="<?php print $site_name; ?>"/></a></div>
<div id="site-navigation"><?php print render($page['sidebar_first']); ?></div>
</div><!--/header-->
<div id="main" class="clearfix">
<?php print render($page['banner']); ?>
<?php print $messages; ?>
<?php print render($page['help']); ?>
<?php print $breadcrumb; ?>
<?php if ($tabs): ?><div class="node-tabs"><?php print render($tabs); ?></div><?php endif; ?>
<div id="content">
<?php print render($page['content']); ?>
</div><!--/main-content-->
<div id="site-sidebar">
<?php print render($page['promo']); ?>
<?php print render($page['sidebar_second']); ?>
</div>
</div><!--/main-->
<div id="footer">
<div id ="watermark"></div>
<?php if (!empty($page['site_footer'])): ?><div id="site-footer" class="clearfix"><?php print render($page['site_footer']); ?></div><?php endif; ?>
<?php print render($page['global_footer']); ?>
<?php print render($page['login_link']); ?>
</div><!--/footer-->
</div><!--/site-->
<?php
/**
* @file views-view-rss.tpl.php
* Default template for feed displays that use the RSS style.
*
* @ingroup views_templates
*/
?>
<?php print "<?xml"; ?> version="1.0" encoding="utf-8" <?php print "?>"; ?>
<rss version="2.0" xml:base="<?php print $link; ?>"<?php print $namespaces; ?>>
<channel>
<title><?php print $title.' | Events Feed'; ?></title>
<link><?php print $link; ?></link>
<description><?php print $description; ?></description>
<language><?php print $langcode; ?></language>
<?php print $channel_elements; ?>
<?php print $items; ?>
</channel>
</rss>
<?php
/**
* @file views-view-unformatted.tpl.php
* Default simple view template to display a list of rows.
*
* @ingroup views_templates
*/
?>
<?php if (!empty($title)): ?>
<h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
<div class="event clearfix">
<?php print $row; ?>
</div>
<?php endforeach; ?>
\ No newline at end of file
<?php
/**
* @file views-view-unformatted.tpl.php
* Default simple view template to display a list of rows.
*
* @ingroup views_templates
*/
?>
<?php if (!empty($title)): ?>
<h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
<div class="event clearfix">
<?php print $row; ?>
</div>
<?php endforeach; ?>
\ No newline at end of file
<?php
/**
* @file
* uw_ct_event.context.inc
*/
/**
* Implements hook_context_default_contexts().
*/
function uw_ct_event_context_default_contexts() {
$export = array();
$context = new stdClass();
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'event-front_page';
$context->description = 'Displays event block on a site\'s front page.';
$context->tag = 'Content';
$context->conditions = array(
'path' => array(
'values' => array(
'<front>' => '<front>',
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'uw_ct_event-front_page' => array(
'module' => 'uw_ct_event',
'delta' => 'front_page',
'region' => 'content',
'weight' => '9',
),
),
),
);
$context->condition_mode = 0;
// Translatables
// Included for use with string extractors like potx.
t('Content');
t('Displays event block on a site\'s front page.');
$export['event-front_page'] = $context;
$context = new stdClass();
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'event_categories';
$context->description = 'Displays event categories (taxonomy) blocks.';
$context->tag = 'Content';
$context->conditions = array(
'path' => array(
'values' => array(
'events' => 'events',
'events/*' => 'events/*',
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'uw_ct_event-events_public_feed' => array(
'module' => 'uw_ct_event',
'delta' => 'events_public_feed',
'region' => 'sidebar_second',
'weight' => '-28',
),
'views-event_category_blocks-block' => array(
'module' => 'views',
'delta' => 'event_category_blocks-block',
'region' => 'sidebar_second',
'weight' => '-27',
),
'uw_ct_event-events_by_date' => array(
'module' => 'uw_ct_event',
'delta' => 'events_by_date',
'region' => 'sidebar_second',
'weight' => '-25',
),
'uw_ct_event-event-calendar-block-id' => array(
'module' => 'uw_ct_event',
'delta' => 'event-calendar-block-id',
'region' => 'sidebar_second',
'weight' => '-29',
),
),
),
);
$context->condition_mode = 0;
// Translatables
// Included for use with string extractors like potx.
t('Content');
t('Displays event categories (taxonomy) blocks.');
$export['event_categories'] = $context;
return $export;
}
This diff is collapsed.
<?php
/**
* @file
* uw_ct_event.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function uw_ct_event_ctools_plugin_api() {
list($module, $api) = func_get_args();
if ($module == "context" && $api == "context") {
return array("version" => "3");
}
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 uw_ct_event_views_api() {
return array("version" => "3.0");
}
/**
* Implements hook_node_info().
*/
function uw_ct_event_node_info() {
$items = array(
'uw_event' => array(
'name' => t('Event'),
'base' => 'node_content',
'description' => t('An event, which is automatically promoted to the front page and appears under the "Events" section of your site.'),
'has_title' => '1',
'title_label' => t('Event Title'),
'help' => '',
),
);
return $items;
}
/**
* Implements hook_rdf_default_mappings().
*/
function uw_ct_event_rdf_default_mappings() {
$schemaorg = array();
// Exported RDF mapping: uw_event
$schemaorg['node']['uw_event'] = array(
'rdftype' => array(
0 => 'schema:Event',
1 => 'sioc:Item',
2 => 'foaf:Document',
),
'title' => array(
'predicates' => array(
0 => 'schema:name',
1 => 'dc:title',
),
),
'created' => array(
'predicates' => array(
0 => 'dc:date',
1 => 'dc:created',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'changed' => array(
'predicates' => array(
0 => 'dc:modified',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'body' => array(
'predicates' => array(
0 => 'schema:description',
1 => 'schema:summary',
2 => 'content:encoded',
),
),
'uid' => array(
'predicates' => array(
0 => 'sioc:has_creator',
),
'type' => 'rel',
),
'name' => array(
'predicates' => array(
0 => 'foaf:name',
),
),
'comment_count' => array(
'predicates' => array(
0 => 'sioc:num_replies',
),
'datatype' => 'xsd:integer',
),
'last_activity' => array(
'predicates' => array(
0 => 'sioc:last_activity_date',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'field_event_location' => array(
'predicates' => array(
0 => 'schema:location',
),
),
'field_event_date' => array(
'predicates' => array(
0 => 'schema:startDate',
),
),
'field_event_moreinfo_link' => array(
'predicates' => array(),
),
'field_event_map_link' => array(
'predicates' => array(),
),
'field_event_host_link' => array(
'predicates' => array(),
),
'field_image' => array(
'predicates' => array(),
'type' => 'rel',
),
'field_file' => array(
'predicates' => array(),
'type' => 'rel',
),
'field_event_photo' => array(
'predicates' => array(),
'type' => 'rel',
),
'field_event_image' => array(
'predicates' => array(),
'type' => 'rel',
),
);
return $schemaorg;
}
<?php
/**
* @file
* uw_ct_event.features.user_permission.inc
*/
/**
* Implements hook_user_default_permissions().
*/
function uw_ct_event_user_default_permissions() {
$permissions = array();
// Exported permission: create uw_event content.
$permissions['create uw_event content'] = array(
'name' => 'create uw_event content',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'node',
);
// Exported permission: delete any uw_event content.
$permissions['delete any uw_event content'] = array(
'name' => 'delete any uw_event content',
'roles' => array(
0 => 'administrator',
1 => 'site manager',
),
'module' => 'node',
);
// Exported permission: delete own uw_event content.
$permissions['delete own uw_event content'] = array(
'name' => 'delete own uw_event content',
'roles' => array(
0 => 'administrator',
1 => 'site manager',
),
'module' => 'node',
);
// Exported permission: edit any uw_event content.
$permissions['edit any uw_event content'] = array(
'name' => 'edit any uw_event content',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'node',
);
// Exported permission: edit own uw_event content.
$permissions['edit own uw_event content'] = array(
'name' => 'edit own uw_event content',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'node',
);
// Exported permission: enter uw_event revision log entry.
$permissions['enter uw_event revision log entry'] = array(
'name' => 'enter uw_event revision log entry',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'override_node_options',
);
// Exported permission: override uw_event promote to front page option.
$permissions['override uw_event promote to front page option'] = array(
'name' => 'override uw_event promote to front page option',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'override_node_options',
);
// Exported permission: override uw_event published option.
$permissions['override uw_event published option'] = array(
'name' => 'override uw_event published option',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'override_node_options',
);
// Exported permission: override uw_event revision option.
$permissions['override uw_event revision option'] = array(
'name' => 'override uw_event revision option',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'override_node_options',
);
// Exported permission: override uw_event sticky option.
$permissions['override uw_event sticky option'] = array(
'name' => 'override uw_event sticky option',
'roles' => array(
0 => 'administrator',
1 => 'content author',
2 => 'content editor',
3 => 'site manager',
),
'module' => 'override_node_options',
);
return $permissions;
}
<?php
/**
* @file
* uw_ct_event.field_group.inc
*/
/**
* Implements hook_field_group_info().
*/
function uw_ct_event_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_links|node|uw_event|form';
$field_group->group_name = 'group_links';
$field_group->entity_type = 'node';
$field_group->bundle = 'uw_event';
$field_group->mode = 'form';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Additional information',
'weight' => '6',
'children' => array(
0 => 'field_event_host_link',
1 => 'field_event_moreinfo_link',
2 => 'field_event_cost',
),
'format_type' => 'fieldset',
'format_settings' => array(
'label' => 'Additional information',
'instance_settings' => array(
'required_fields' => 0,
'classes' => '',
'description' => '',
),
'formatter' => 'collapsible',
),
);
$export['group_links|node|uw_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|uw_event|form';
$field_group->group_name = 'group_location';
$field_group->entity_type = 'node';
$field_group->bundle = 'uw_event';
$field_group->mode = 'form';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Event location',
'weight' => '7',
'children' => array(
0 => 'field_event_location',
1 => 'field_event_map_link',
),
'format_type' => 'fieldset',
'format_settings' => array(
'label' => 'Event location',
'instance_settings' => array(
'required_fields' => 0,
'classes' => '',
'description' => '',
),
'formatter' => 'collapsible',
),
);
$export['group_location|node|uw_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_upload_file|node|uw_event|form';
$field_group->group_name = 'group_upload_file';
$field_group->entity_type = 'node';
$field_group->bundle = 'uw_event';
$field_group->mode = 'form';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Upload a file',
'weight' => '5',
'children' => array(
0 => 'field_file',
),
'format_type' => 'fieldset',
'format_settings' => array(
'label' => 'Upload a file',
'instance_settings' => array(
'required_fields' => 0,
'classes' => '',
'description' => '',
),
'formatter' => 'collapsed',
),
);
$export['group_upload_file|node|uw_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_upload|node|uw_event|form';
$field_group->group_name = 'group_upload';
$field_group->entity_type = 'node';
$field_group->bundle = 'uw_event';
$field_group->mode = 'form';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Upload an image',
'weight' => '4',
'children' => array(
0 => 'field_image',
),
'format_type' => 'fieldset',
'format_settings' => array(
'label' => 'Upload an image',
'instance_settings' => array(
'required_fields' => 0,
'classes' => '',
'description' => '',
),
'formatter' => 'collapsed',
),
);
$export['group_upload|node|uw_event|form'] = $field_group;
return $export;
}
name = Event
description = Adds events and event listing pages.
core = 7.x
package = uWaterloo Content Types
php = 5.2.4
version = 7.x-1.16
project = uw_ct_event
dependencies[] = calendar
dependencies[] = context
dependencies[] = date
dependencies[] = date_all_day
dependencies[] = date_api
dependencies[] = date_ical
dependencies[] = date_popup
dependencies[] = date_repeat
dependencies[] = date_repeat_field
dependencies[] = date_views
dependencies[] = features
dependencies[] = field_group
dependencies[] = image
dependencies[] = link
dependencies[] = location_cck
dependencies[] = override_node_options
dependencies[] = schemaorg
dependencies[] = strongarm
dependencies[] = term_reference_tree
dependencies[] = uw_gmap_config
dependencies[] = uw_roles_fdsu
dependencies[] = uw_vocab_audience
dependencies[] = uw_xml_sitemap_config
dependencies[] = views
features[context][] = event-front_page
features[context][] = event_categories
features[ctools][] = context:context:3
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-uw_event-body
features[field][] = node-uw_event-field_audience
features[field][] = node-uw_event-field_event_cost
features[field][] = node-uw_event-field_event_date
features[field][] = node-uw_event-field_event_host_link
features[field][] = node-uw_event-field_event_image
features[field][] = node-uw_event-field_event_location
features[field][] = node-uw_event-field_event_map_link
features[field][] = node-uw_event-field_event_moreinfo_link
features[field][] = node-uw_event-field_file
features[field][] = node-uw_event-field_image
features[field_group][] = group_links|node|uw_event|form
features[field_group][] = group_location|node|uw_event|form
features[field_group][] = group_upload_file|node|uw_event|form
features[field_group][] = group_upload|node|uw_event|form
features[node][] = uw_event
features[schemaorg][] = node-uw_event
features[user_permission][] = create uw_event content
features[user_permission][] = delete any uw_event content
features[user_permission][] = delete own uw_event content
features[user_permission][] = edit any uw_event content
features[user_permission][] = edit own uw_event content
features[user_permission][] = enter uw_event revision log entry
features[user_permission][] = override uw_event promote to front page option
features[user_permission][] = override uw_event published option
features[user_permission][] = override uw_event revision option
features[user_permission][] = override uw_event sticky option
features[variable][] = comment_anonymous_uw_event
features[variable][] = comment_default_mode_uw_event
features[variable][] = comment_default_per_page_uw_event
features[variable][] = comment_form_location_uw_event
features[variable][] = comment_preview_uw_event
features[variable][] = comment_subject_field_uw_event
features[variable][] = comment_uw_event
features[variable][] = enable_revisions_page_uw_event
features[variable][] = field_bundle_settings_node__uw_event
features[variable][] = location_defaultnum_uw_event
features[variable][] = location_maxnum_uw_event
features[variable][] = location_settings_node_uw_event
features[variable][] = menu_options_uw_event
features[variable][] = menu_parent_uw_event
features[variable][] = node_options_uw_event
features[variable][] = node_preview_uw_event
features[variable][] = node_submitted_uw_event
features[variable][] = pathauto_node_uw_event_pattern
features[variable][] = publishcontent_uw_event
features[variable][] = schemaorg_title_uw_event
features[variable][] = schemaorg_type_uw_event
features[variable][] = workbench_moderation_default_state_uw_event
features[variable][] = xmlsitemap_settings_node_uw_event
features[views_view][] = event_category_blocks
features[views_view][] = events
features[views_view][] = manage_events
features[views_view][] = uw_ct_event_calendar
stylesheets[all][] = css/uw_ct_event.css
<?php
/**
* @file
* Install, update and uninstall functions for the uw_ct_web_page module.
*/
/**
* Implements hook_install().
*/
function uw_ct_event_install() {
// Kris Notes: Sept. 1, 2011
// While this is set with strongarm, if the variable is not added to the database many errors are generated
// Issue occurs in workbench_moderation.module line 878
// if (in_array('revision', $options) && in_array('moderation', $options)) initially evaluates as false
// this prevents the workbench moderation array from being added to the node object, and everything falls apart
// Do one variable_set for every content type using workbench moderation
variable_set('node_options_uw_event', array(0 => 'moderation', 1 => 'revision'));
}
/**
* Adding RDF markup
*/
function uw_ct_event_update_7001() {
/** Removing this update - now being done with features **/
// Insert default pre-defined RDF mapping into the database.
/*
$rdf_mappings = array(
array(
'type' => 'node',
'bundle' => 'uw_event',
'mapping' => array(
'rdftype' => array('schema:Event'),
'title' => array(
'predicates' => array('schema:name'),
),
'body' => array(
'predicates' => array(
'0' => 'schema:summary',
'1' => 'schema:description',
),
),
'field_event_location' => array(
'predicates' => array('schema:location'),
),
'field_event_date' => array(
'predicates' => array('schema:startDate'),
),
),
),
);
foreach ($rdf_mappings as $rdf_mapping) {
rdf_mapping_save($rdf_mapping);
}
*/
}
/**
* Reverting event views
*/
function uw_ct_event_update_7002() {
features_revert(array('uw_ct_event' => array('views_view')));
}
/**
* Remove leftover field -- field_event_location_lookup (node reference field)
*/
function uw_ct_event_update_7003() {
$field_array = field_info_field('field_event_location_lookup');
if (isset($field_array)) {
field_delete_field('field_event_location_lookup');
field_purge_batch(10); // first time clears data
field_purge_batch(10); // second time clears field config
variable_del('uw_location_data_json_url'); // ensure we remove old variable, so we use the current default setting
}
}
/**
* Implements hook_uninstall().
*/
function uw_ct_event_uninstall() {
// Remove the RDF mapping from the database
rdf_mapping_delete('node', 'uw_event');
// Remove the variable that we set
variable_del('node_options_uw_event');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment