-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaintings.features.inc
115 lines (107 loc) · 3.09 KB
/
paintings.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
/**
* @file
* paintings.features.inc
*/
/**
* Implements hook_block_class_features_default_class().
*/
function paintings_block_class_features_default_class() {
return array(
'views:tableaux_20_20-block' => array(
'module' => 'views',
'delta' => 'tableaux_20_20-block',
'css_classes' => 'mosaic20',
),
'views:tableaux_20_20-block_1' => array(
'module' => 'views',
'delta' => 'tableaux_20_20-block_1',
'css_classes' => 'mosaic30',
),
);
}
/**
* Implements hook_ctools_plugin_api().
*/
function paintings_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "context" && $api == "context") {
return array("version" => "3");
}
if ($module == "page_manager" && $api == "pages_default") {
return array("version" => "1");
}
}
/**
* Implements hook_views_api().
*/
function paintings_views_api($module = NULL, $api = NULL) {
return array("api" => "3.0");
}
/**
* Implements hook_image_default_styles().
*/
function paintings_image_default_styles() {
$styles = array();
// Exported image style: tableau.
$styles['tableau'] = array(
'name' => 'tableau',
'label' => 'tableau',
'effects' => array(
3 => array(
'label' => 'Redimensionner',
'help' => 'Le redimensionnement ne respecte pas les proportions de l\'image. Ce qui peut se traduire par des images étirées ou compressées.',
'effect callback' => 'image_resize_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_resize',
'data' => array(
'width' => 800,
'height' => 800,
),
'weight' => 1,
),
),
);
// Exported image style: zoom_thumb.
$styles['zoom_thumb'] = array(
'name' => 'zoom_thumb',
'label' => 'zoom_thumb',
'effects' => array(
2 => array(
'label' => 'Échelle',
'help' => 'La mise à l\'échelle maintiendra les proportions originales de l\'image. Si une seule dimension est précisée, l\'autre dimension sera calculée automatiquement.',
'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' => 150,
'height' => '',
'upscale' => 0,
),
'weight' => 1,
),
),
);
return $styles;
}
/**
* Implements hook_node_info().
*/
function paintings_node_info() {
$items = array(
'tableau' => array(
'name' => t('tableau'),
'base' => 'node_content',
'description' => t('Tableau'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => t('Les images de tableaux doivent toutes être téléchargées en jpeg 72ppp 400x400pixels pour un bon fonctionnement de la mosaïque, quel que soit le format du tableau.'),
),
);
return $items;
}