1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Generate form elments for the Image styles settings.
|
6 |
|
|
*/
|
7 |
74f6bef0
|
Assos Assos
|
function at_core_images_form(&$form) {
|
8 |
|
|
$form['at']['images'] = array(
|
9 |
|
|
'#type' => 'fieldset',
|
10 |
|
|
'#title' => t('Image Settings'),
|
11 |
|
|
'#description' => '<h3>Image Settings</h3><p>Set alignment for image-field images on full and teaser view, and enable captions.',
|
12 |
|
|
'#weight' => 0,
|
13 |
|
|
);
|
14 |
85ad3d82
|
Assos Assos
|
|
15 |
74f6bef0
|
Assos Assos
|
// Alignment
|
16 |
|
|
$form['at']['images']['alignment'] = array(
|
17 |
|
|
'#type' => 'fieldset',
|
18 |
|
|
'#title' => t('Image Alignment'),
|
19 |
|
|
);
|
20 |
85ad3d82
|
Assos Assos
|
|
21 |
74f6bef0
|
Assos Assos
|
// Full
|
22 |
|
|
$form['at']['images']['alignment']['image_alignment'] = array(
|
23 |
|
|
'#type' => 'radios',
|
24 |
|
|
'#title' => t('<strong>Alignment - full view</strong>'),
|
25 |
|
|
'#default_value' => at_get_setting('image_alignment'),
|
26 |
|
|
'#options' => array(
|
27 |
|
|
'ia-n' => t('None'),
|
28 |
|
|
'ia-l' => t('Left'),
|
29 |
|
|
'ia-c' => t('Center'),
|
30 |
|
|
'ia-r' => t('Right'),
|
31 |
|
|
),
|
32 |
|
|
);
|
33 |
85ad3d82
|
Assos Assos
|
|
34 |
74f6bef0
|
Assos Assos
|
// Teaser
|
35 |
|
|
$form['at']['images']['alignment']['image_alignment_teaser'] = array(
|
36 |
|
|
'#type' => 'radios',
|
37 |
|
|
'#title' => t('<strong>Alignment - teaser view</strong>'),
|
38 |
|
|
'#default_value' => at_get_setting('image_alignment_teaser'),
|
39 |
|
|
'#description' => t('This will only affect images added using an image-field. If you use another method such as embedding images directly into text areas this will not affect those images.'),
|
40 |
|
|
'#options' => array(
|
41 |
|
|
'iat-n' => t('None'),
|
42 |
|
|
'iat-l' => t('Left'),
|
43 |
|
|
'iat-c' => t('Center'),
|
44 |
|
|
'iat-r' => t('Right'),
|
45 |
|
|
),
|
46 |
|
|
);
|
47 |
85ad3d82
|
Assos Assos
|
|
48 |
74f6bef0
|
Assos Assos
|
// Captions
|
49 |
|
|
$form['at']['images']['captions'] = array(
|
50 |
|
|
'#type' => 'fieldset',
|
51 |
|
|
'#title' => t('Image Captions'),
|
52 |
|
|
'#description' => t('<strong>Display the image title as a caption</strong>'),
|
53 |
|
|
);
|
54 |
|
|
$form['at']['images']['captions']['image_caption_teaser'] = array(
|
55 |
|
|
'#type' => 'checkbox',
|
56 |
|
|
'#title' => t('Show captions on teaser view'),
|
57 |
|
|
'#default_value' => at_get_setting('image_caption_teaser'),
|
58 |
|
|
);
|
59 |
|
|
$form['at']['images']['captions']['image_caption_full'] = array(
|
60 |
|
|
'#type' => 'checkbox',
|
61 |
|
|
'#title' => t('Show captions on full view'),
|
62 |
|
|
'#description' => t('Captions use the title attribute text. You must enable tiles in the field management options for your image fields.'),
|
63 |
|
|
'#default_value' => at_get_setting('image_caption_full'),
|
64 |
|
|
);
|
65 |
85ad3d82
|
Assos Assos
|
|
66 |
74f6bef0
|
Assos Assos
|
// Teaser
|
67 |
|
|
$form['at']['images']['teaser'] = array(
|
68 |
|
|
'#type' => 'fieldset',
|
69 |
|
|
'#title' => t('Teaser Image Fields'),
|
70 |
|
|
'#description' => t('<strong>Show only one image field image on teasers</strong>'),
|
71 |
|
|
);
|
72 |
|
|
$form['at']['images']['teaser']['image_teaser'] = array(
|
73 |
|
|
'#type' => 'checkbox',
|
74 |
|
|
'#title' => t('Show the first image only on teasers'),
|
75 |
|
|
'#description' => t('Useful for when you have a multivalue image field and you only want the first image to show on teasers.'),
|
76 |
|
|
'#default_value' => at_get_setting('image_teaser'),
|
77 |
|
|
);
|
78 |
|
|
} |