aboutsummaryrefslogtreecommitdiff
path: root/imagecache_auto.admin.inc
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2011-04-20 13:13:22 -0300
committerSilvio <silvio@devlet.com.br>2011-04-20 13:13:22 -0300
commitdf070a36a81a6ef897a83922f0915e70c2154b2f (patch)
tree6a78980a19dd188b2e61b7f55be1615705af14ef /imagecache_auto.admin.inc
parentfe89bd169c8c2e7bc585fa787e8037ee13901ce8 (diff)
downloadimagecache_auto-df070a36a81a6ef897a83922f0915e70c2154b2f.tar.gz
imagecache_auto-df070a36a81a6ef897a83922f0915e70c2154b2f.tar.bz2
Adding admin config page and preset validation
Diffstat (limited to 'imagecache_auto.admin.inc')
-rw-r--r--imagecache_auto.admin.inc36
1 files changed, 36 insertions, 0 deletions
diff --git a/imagecache_auto.admin.inc b/imagecache_auto.admin.inc
new file mode 100644
index 0000000..4d31bc5
--- /dev/null
+++ b/imagecache_auto.admin.inc
@@ -0,0 +1,36 @@
+<?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.'),
+ );
+
+ return system_settings_form($form);
+}