| 1 |
<?php |
<?php |
| 2 |
// $Id: image_exact.module,v 1.4 2007/05/27 20:19:50 joshk Exp $ |
// $Id: image_exact.module,v 1.5 2008/03/07 19:59:05 joshk Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 85 |
|
|
| 86 |
function image_exact_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { |
function image_exact_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { |
| 87 |
//Set thumbnail final dimensions here - use settings from image content type. |
//Set thumbnail final dimensions here - use settings from image content type. |
| 88 |
if ($node->type == 'image' && $op == 'validate' && variable_get('image_exact_thumbs', 1)) { |
if ($node->type == 'image' && in_array($op, array('submit', 'update')) && variable_get('image_exact_thumbs', 1)) { |
| 89 |
$sizes = _image_get_sizes(); |
$sizes = _image_get_sizes(); |
| 90 |
foreach(variable_get('image_exact_size', array(0)) as $i) { |
foreach(variable_get('image_exact_size', array(0)) as $i) { |
| 91 |
$source = file_create_path($node->images['_original']); |
$source = file_create_path($node->images['_original']); |