Skip to content

Commit

Permalink
CAW-141: Added Image Insert field
Browse files Browse the repository at this point in the history
  • Loading branch information
cynmij committed Apr 20, 2015
1 parent 2e3988d commit b823ef6
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 35 deletions.
12 changes: 6 additions & 6 deletions stanford_news.ds.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ function stanford_news_ds_layout_settings_info() {
2 => 'group_s_postcard_content',
3 => 'group_descriptor_info',
4 => 'body',
5 => 'field_s_news_link',
6 => 'field_s_news_date',
5 => 'field_s_news_date',
6 => 'field_s_news_link',
7 => 'field_s_news_attachment',
8 => 'field_s_news_source',
9 => 'group_s_news_postedin',
10 => 'field_s_image_info',
9 => 'field_s_image_info',
10 => 'group_s_news_postedin',
11 => 'field_s_news_categories',
),
),
Expand All @@ -40,12 +40,12 @@ function stanford_news_ds_layout_settings_info() {
'group_s_postcard_content' => 'ds_content',
'group_descriptor_info' => 'ds_content',
'body' => 'ds_content',
'field_s_news_link' => 'ds_content',
'field_s_news_date' => 'ds_content',
'field_s_news_link' => 'ds_content',
'field_s_news_attachment' => 'ds_content',
'field_s_news_source' => 'ds_content',
'group_s_news_postedin' => 'ds_content',
'field_s_image_info' => 'ds_content',
'group_s_news_postedin' => 'ds_content',
'field_s_news_categories' => 'ds_content',
),
'classes' => array(),
Expand Down
42 changes: 22 additions & 20 deletions stanford_news.features.field_base.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ function stanford_news_field_default_field_bases() {
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_s_news_attachment',
'foreign keys' => array(
'fid' => array(
'columns' => array(
'fid' => 'fid',
),
'table' => 'file_managed',
),
),
'indexes' => array(
'fid' => array(
0 => 'fid',
Expand All @@ -48,14 +40,6 @@ function stanford_news_field_default_field_bases() {
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_s_news_categories',
'foreign keys' => array(
'tid' => array(
'columns' => array(
'tid' => 'tid',
),
'table' => 'taxonomy_term_data',
),
),
'indexes' => array(
'tid' => array(
0 => 'tid',
Expand All @@ -82,7 +66,6 @@ function stanford_news_field_default_field_bases() {
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_s_news_date',
'foreign keys' => array(),
'indexes' => array(),
'locked' => 0,
'module' => 'date',
Expand Down Expand Up @@ -112,7 +95,6 @@ function stanford_news_field_default_field_bases() {
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_s_news_featured',
'foreign keys' => array(),
'indexes' => array(
'value' => array(
0 => 'value',
Expand All @@ -131,14 +113,35 @@ function stanford_news_field_default_field_bases() {
'type' => 'list_boolean',
);

// Exported field_base: 'field_s_news_image_insert'
$field_bases['field_s_news_image_insert'] = array(
'active' => 1,
'cardinality' => -1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_s_news_image_insert',
'indexes' => array(
'fid' => array(
0 => 'fid',
),
),
'locked' => 0,
'module' => 'image',
'settings' => array(
'default_image' => 0,
'uri_scheme' => 'public',
),
'translatable' => 0,
'type' => 'image',
);

// Exported field_base: 'field_s_news_link'
$field_bases['field_s_news_link'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_s_news_link',
'foreign keys' => array(),
'indexes' => array(),
'locked' => 0,
'module' => 'link',
Expand Down Expand Up @@ -168,7 +171,6 @@ function stanford_news_field_default_field_bases() {
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_s_news_source',
'foreign keys' => array(),
'indexes' => array(),
'locked' => 0,
'module' => 'link',
Expand Down
113 changes: 112 additions & 1 deletion stanford_news.features.field_instance.inc
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function stanford_news_field_default_field_instances() {
'progress_indicator' => 'throbber',
),
'type' => 'file_generic',
'weight' => 6,
'weight' => 7,
),
);

Expand Down Expand Up @@ -430,6 +430,115 @@ them, and integrate them with the site architecture.',
),
);

// Exported field_instance: 'node-stanford_news_item-field_s_news_image_insert'
$field_instances['node-stanford_news_item-field_s_news_image_insert'] = array(
'bundle' => 'stanford_news_item',
'deleted' => 0,
'description' => 'Use this to Insert images into the text.',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'image',
'settings' => array(
'image_link' => '',
'image_style' => '',
),
'type' => 'image',
'weight' => 17,
),
'full' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'taxonomy' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_s_news_image_insert',
'label' => 'Image Insert',
'required' => 0,
'settings' => array(
'alt_field' => 1,
'default_image' => 0,
'file_directory' => '',
'file_extensions' => 'png gif jpg jpeg',
'max_filesize' => '',
'max_resolution' => '1200x1200',
'min_resolution' => '',
'title_field' => 1,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'image',
'settings' => array(
'insert' => 1,
'insert_absolute' => 0,
'insert_class' => '',
'insert_default' => 'image_large-scaled',
'insert_styles' => array(
'auto' => 'auto',
'icon_link' => 0,
'image' => 'image',
'image_3-col-header' => 0,
'image_4-col-header' => 0,
'image_6-col-banner' => 0,
'image_6-col-banner-short' => 0,
'image_6-col-banner-tall' => 0,
'image_6-col-photo-landscape' => 0,
'image_8-col-banner' => 0,
'image_8-col-banner-short' => 0,
'image_8-col-banner-tall' => 0,
'image_9-col-banner' => 0,
'image_9-col-banner-short' => 0,
'image_12-col-banner' => 0,
'image_12-col-banner-tall' => 0,
'image_icon-profile' => 0,
'image_icon-square' => 0,
'image_large' => 0,
'image_large-landscape' => 0,
'image_large-landscape-scaled' => 0,
'image_large-profile' => 0,
'image_large-profile-scaled' => 0,
'image_large-scaled' => 'image_large-scaled',
'image_large-square' => 'image_large-square',
'image_med-landscape' => 0,
'image_med-landscape-scaled' => 0,
'image_med-profile' => 0,
'image_med-profile-scaled' => 0,
'image_med-square' => 'image_med-square',
'image_medium' => 0,
'image_page-width' => 'image_page-width',
'image_sm-landscape' => 0,
'image_sm-profile' => 0,
'image_sm-square' => 'image_sm-square',
'image_thmb-landscape' => 0,
'image_thmb-profile' => 0,
'image_thmb-square' => 0,
'image_thumbnail' => 0,
'link' => 0,
),
'insert_width' => '',
'preview_image_style' => 'thumbnail',
'progress_indicator' => 'throbber',
),
'type' => 'image_image',
'weight' => 6,
),
);

// Exported field_instance: 'node-stanford_news_item-field_s_news_link'
$field_instances['node-stanford_news_item-field_s_news_link'] = array(
'bundle' => 'stanford_news_item',
Expand Down Expand Up @@ -573,13 +682,15 @@ them, and integrate them with the site architecture.');
t('External Link');
t('Featured');
t('File');
t('Image Insert');
t('Insert the article\'s source and URL link. (e.g. Stanford Report, http://news.stanford.edu/sr/)');
t('News Image');
t('Optional external link associated with this news item.');
t('Source');
t('This is a setting used to feature a news item in various places on the site (e.g., check "Featured" if you want to display this item, leave unchecked if you do not want to display this item).');
t('Upload file attachments associated with this news item.');
t('Use this Date field to indicate the date when a story appeared in an external publication.');
t('Use this to Insert images into the text.');

return $field_instances;
}
1 change: 1 addition & 0 deletions stanford_news.features.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ function stanford_news_node_info() {
'help' => '',
),
);
drupal_alter('node_info', $items);
return $items;
}
8 changes: 4 additions & 4 deletions stanford_news.field_group.inc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function stanford_news_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Advanced',
'weight' => '10',
'weight' => '11',
'children' => array(
0 => 'field_s_news_featured',
),
Expand Down Expand Up @@ -367,9 +367,9 @@ function stanford_news_field_group_info() {
'label' => 'Postcard Content',
'weight' => '2',
'children' => array(
0 => 'body',
1 => 'field_s_news_attachment',
2 => 'field_s_news_link',
0 => 'field_s_news_attachment',
1 => 'field_s_news_link',
2 => 'body',
3 => 'group_descriptor_info',
),
'format_type' => 'div',
Expand Down
4 changes: 3 additions & 1 deletion stanford_news.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = Stanford News
description = News Item content type, and list Views with an image and taxonomy terms
core = 7.x
package = Stanford
version = 7.x-3.0
version = 7.x-3.0-alpha3
project = stanford_news
dependencies[] = ctools
dependencies[] = date
Expand Down Expand Up @@ -32,6 +32,7 @@ features[field_base][] = field_s_news_attachment
features[field_base][] = field_s_news_categories
features[field_base][] = field_s_news_date
features[field_base][] = field_s_news_featured
features[field_base][] = field_s_news_image_insert
features[field_base][] = field_s_news_link
features[field_base][] = field_s_news_source
features[field_group][] = group_descriptor_info|node|stanford_news_item|default
Expand All @@ -58,6 +59,7 @@ features[field_instance][] = node-stanford_news_item-field_s_news_attachment
features[field_instance][] = node-stanford_news_item-field_s_news_categories
features[field_instance][] = node-stanford_news_item-field_s_news_date
features[field_instance][] = node-stanford_news_item-field_s_news_featured
features[field_instance][] = node-stanford_news_item-field_s_news_image_insert
features[field_instance][] = node-stanford_news_item-field_s_news_link
features[field_instance][] = node-stanford_news_item-field_s_news_source
features[node][] = stanford_news_item
Expand Down
6 changes: 3 additions & 3 deletions stanford_news.strongarm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ function stanford_news_strongarm() {
'weight' => '0',
),
'path' => array(
'weight' => '7',
'weight' => '8',
),
'metatags' => array(
'weight' => '9',
'weight' => '10',
),
'redirect' => array(
'weight' => '8',
'weight' => '9',
),
),
'display' => array(),
Expand Down

0 comments on commit b823ef6

Please sign in to comment.