aboutsummaryrefslogtreecommitdiff
path: root/imagecache_auto.admin.inc
blob: 9b8efcb510e520a5868e5f9683b0388476653088 (plain)
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
<?php
// $Id$

/**
 * @file
 *
 * Administration page callbacks.
 */

/**
 * Form builder. Configure ImageCache Auto.
 *
 * @ingroup forms
 * @see system_settings_form()
 */
function imagecache_auto_admin_settings() {
  $form['imagecache_auto_max_width'] = array(
    '#type'          => 'textfield',
    '#title'         => t('Maximum preset width (pixels)'),
    '#default_value' => variable_get('imagecache_auto_max_width', '10000'),
    '#size'          => 10,
    '#maxlength'     => 64,    
    '#description'   => t('The maximum width an automatically created ImageCache preset can have.'),
  );

  $form['imagecache_auto_max_height'] = array(
    '#type'          => 'textfield',
    '#title'         => t('Maximum preset height (pixels)'),
    '#default_value' => variable_get('imagecache_auto_max_height', '10000'),
    '#size'          => 10,
    '#maxlength'     => 64,    
    '#description'   => t('The maximum height an automatically created ImageCache preset can have.'),
  );

  $form['imagecache_auto_max_presets'] = array(
    '#type'          => 'textfield',
    '#title'         => t('Maximum number of presets'),
    '#default_value' => variable_get('imagecache_auto_max_presets', '250'),
    '#size'          => 10,
    '#maxlength'     => 64,    
    '#description'   => t('The maximum number of total imagecache presets before ImageCache auto refuses to create additional presets. This might prevent abuses from malicious clients.'),
  );

  return system_settings_form($form);
}