diff options
author | Silvio <silvio@devlet.com.br> | 2011-04-20 12:44:41 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2011-04-20 12:44:41 -0300 |
commit | fe89bd169c8c2e7bc585fa787e8037ee13901ce8 (patch) | |
tree | 650934ce73fbc1356a376bd1be6e4efd392eaf67 /imagecache_auto.module | |
parent | aa2bc99f8f2b5251500ac7dc26544bcb97daa21c (diff) | |
download | imagecache_auto-fe89bd169c8c2e7bc585fa787e8037ee13901ce8.tar.gz imagecache_auto-fe89bd169c8c2e7bc585fa787e8037ee13901ce8.tar.bz2 |
Starting admin interface
Diffstat (limited to 'imagecache_auto.module')
-rw-r--r-- | imagecache_auto.module | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/imagecache_auto.module b/imagecache_auto.module index 22e077f..f55fcd5 100644 --- a/imagecache_auto.module +++ b/imagecache_auto.module @@ -3,9 +3,9 @@ /** * @file - * Imagecache Auto. + * ImageCache Auto. * - * Creates imagecache presets on the fly. + * Create ImageCache presets on the fly. */ /** @@ -14,6 +14,16 @@ function imagecache_auto_menu() { $items = array(); + $items['admin/settings/imagecache/auto'] = array( + 'title' => 'ImageCache Auto Configuration', + 'description' => 'Adjust ImageCache Auto settings.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('imagecache_auto_admin_settings'), + 'access arguments' => array('administer site configuration'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'imagecache_auto.admin.inc', + ); + $items[file_directory_path() .'/imagecache_auto'] = array( 'page callback' => 'imagecache_auto', 'access callback' => TRUE, @@ -24,10 +34,9 @@ function imagecache_auto_menu() { } /** - * Automatically create imagecache presets. + * Automatically create ImageCache presets. * * @todo - * Check if width and heigh are integers. * Specify maximum and minimum dimensions. */ function imagecache_auto() { @@ -35,8 +44,8 @@ function imagecache_auto() { $args = func_get_args(); $options = array( - 'width' => check_plain(array_shift($args)), - 'height' => check_plain(array_shift($args)), + 'width' => (int) check_plain(array_shift($args)), + 'height' => (int) check_plain(array_shift($args)), 'path' => implode('/', $args), ); |