This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviews_photogallery.features.inc
101 lines (94 loc) · 2.71 KB
/
views_photogallery.features.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* @file
* views_photogallery.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function views_photogallery_ctools_plugin_api() {
list($module, $api) = func_get_args();
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
/**
* Implements hook_views_api().
*/
function views_photogallery_views_api() {
return array("version" => "3.0");
}
/**
* Implements hook_image_default_styles().
*/
function views_photogallery_image_default_styles() {
$styles = array();
// Exported image style: gallery_large.
$styles['gallery_large'] = array(
'name' => 'gallery_large',
'effects' => array(
1 => array(
'label' => 'Scale',
'help' => 'Scaling will maintain the aspect-ratio of the original image. If only a single dimension is specified, the other dimension will be calculated.',
'effect callback' => 'image_scale_effect',
'dimensions callback' => 'image_scale_dimensions',
'form callback' => 'image_scale_form',
'summary theme' => 'image_scale_summary',
'module' => 'image',
'name' => 'image_scale',
'data' => array(
'width' => '640',
'height' => '640',
'upscale' => 0,
),
'weight' => '1',
),
),
);
// Exported image style: gallery_thumb.
$styles['gallery_thumb'] = array(
'name' => 'gallery_thumb',
'effects' => array(
2 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => '200',
'height' => '200',
),
'weight' => '1',
),
),
);
return $styles;
}
/**
* Implements hook_node_info().
*/
function views_photogallery_node_info() {
$items = array(
'gallery' => array(
'name' => t('Gallery'),
'base' => 'node_content',
'description' => t('Create new photo galleries.'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
'gallery_photo' => array(
'name' => t('Gallery Photo'),
'base' => 'node_content',
'description' => t('Add new photos to a gallery.'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
);
return $items;
}