| 1 |
<?php
|
| 2 |
// $Id: texy_image.admin.inc,v 1.1.2.2 2008/02/17 18:01:55 havran Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Admin page callbacks for the Texy Image.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Form builder; Configure Image settings for Texy!.
|
| 11 |
*
|
| 12 |
* @ingroup forms
|
| 13 |
* @see system_settings_form().
|
| 14 |
*/
|
| 15 |
function texy_form_image_settings() {
|
| 16 |
$form['imageset'] = array(
|
| 17 |
'#type' => 'fieldset',
|
| 18 |
'#title' => t('Image settings'),
|
| 19 |
'#collapsible' => TRUE,
|
| 20 |
'#collapsed' => FALSE,
|
| 21 |
'#weight' => -1,
|
| 22 |
);
|
| 23 |
$form['imageset']['texy_image_dir'] = array(
|
| 24 |
'#type' => 'textfield',
|
| 25 |
'#size' => '12',
|
| 26 |
'#title' => t('Directory'),
|
| 27 |
'#description' => t('Subdirectory of the <code>%dir</code> directory where the pictures are stored. Do not include trailing slash.', array('%dir' => base_path().variable_get('file_directory_path', 'files'))),
|
| 28 |
'#default_value' => variable_get('texy_image_dir', 'images'),
|
| 29 |
'#field_prefix' => base_path() . file_directory_path() .'/',
|
| 30 |
);
|
| 31 |
$form['imageset']['texy_image_class_left'] = array(
|
| 32 |
'#type' => 'textfield',
|
| 33 |
'#size' => '12',
|
| 34 |
'#title' => t('Class for images aligned to the left'),
|
| 35 |
'#description' => t('Name for a class which will be assigned to all images aligned to the left.'),
|
| 36 |
'#default_value' => variable_get('texy_image_class_left', 'left'),
|
| 37 |
);
|
| 38 |
$form['imageset']['texy_image_class_right'] = array(
|
| 39 |
'#type' => 'textfield',
|
| 40 |
'#size' => '12',
|
| 41 |
'#title' => t('Class for images aligned to the right'),
|
| 42 |
'#description' => t('Name for a class which will be assigned to all images aligned to the right.'),
|
| 43 |
'#default_value' => variable_get('texy_image_class_right', 'right'),
|
| 44 |
);
|
| 45 |
$form['imageset']['texy_image_alt_text'] = array(
|
| 46 |
'#type' => 'textfield',
|
| 47 |
'#size' => '12',
|
| 48 |
'#title' => t('Default alternate text'),
|
| 49 |
'#description' => t('Default value for the <i>alt</i> attribute. Leave this field blank to specify no alternate text for images.'),
|
| 50 |
'#default_value' => variable_get('texy_image_alt_text', ''),
|
| 51 |
);
|
| 52 |
|
| 53 |
$form['imagedescset'] = array(
|
| 54 |
'#type' => 'fieldset',
|
| 55 |
'#title' => t('Images with descriptions'),
|
| 56 |
'#description' => t('Texy!\'s built-in module allows user to easily insert images along with their descriptions. Example: <code>[* image.png *] *** This is a short description of the image</code>.'),
|
| 57 |
'#collapsible' => TRUE,
|
| 58 |
);
|
| 59 |
$form['imagedescset']['texy_image_desc_deflist'] = array(
|
| 60 |
'#type' => 'checkbox',
|
| 61 |
'#title' => t('Images as definition list terms'),
|
| 62 |
'#description' => t('By selecting this option you can use definition list term and description elements as containers and output the content in a more semantic way.'),
|
| 63 |
'#default_value' => variable_get('texy_image_desc_deflist', FALSE),
|
| 64 |
);
|
| 65 |
$form['imagedescset']['texy_image_desc_class'] = array(
|
| 66 |
'#type' => 'textfield',
|
| 67 |
'#size' => '20',
|
| 68 |
'#title' => t('Class for images with descriptions'),
|
| 69 |
'#description' => t('Name for a class which will be assigned to all images with accompanying descriptions.'),
|
| 70 |
'#default_value' => variable_get('texy_image_desc_class', 'image-desc'),
|
| 71 |
);
|
| 72 |
$form['imagedescset']['texy_image_desc_class_left'] = array(
|
| 73 |
'#type' => 'textfield',
|
| 74 |
'#size' => '20',
|
| 75 |
'#title' => t('Class for images with descriptions aligned to the left'),
|
| 76 |
'#description' => t('Name for a class which will be assigned to image containers aligned to the left.'),
|
| 77 |
'#default_value' => variable_get('texy_image_desc_class_left', 'image-desc-left'),
|
| 78 |
);
|
| 79 |
$form['imagedescset']['texy_image_desc_class_right'] = array(
|
| 80 |
'#type' => 'textfield',
|
| 81 |
'#size' => '20',
|
| 82 |
'#title' => t('Class for images with descriptions aligned to the right'),
|
| 83 |
'#description' => t('Name for a class which will be assigned to image containers aligned to the right.'),
|
| 84 |
'#default_value' => variable_get('texy_image_desc_class_right', 'image-desc-right'),
|
| 85 |
);
|
| 86 |
|
| 87 |
return system_settings_form($form);
|
| 88 |
}
|