| 1 |
<?php |
<?php |
| 2 |
// $Id: imagefield.inc,v 1.1.2.1 2008/10/28 22:11:03 yangyicn Exp $ |
// $Id: imagefield.inc,v 1.1.2.2 2008/10/28 22:31:46 yangyicn Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 29 |
|
|
| 30 |
// Implementation of _jcarousel_block_PLUGIN_preprocess_images |
// Implementation of _jcarousel_block_PLUGIN_preprocess_images |
| 31 |
function _jcarousel_block_imagefield_preprocess_images(&$variables) { |
function _jcarousel_block_imagefield_preprocess_images(&$variables) { |
| 32 |
|
global $base_url; |
| 33 |
$variables['imagefield_type'] = 'imagefield'; |
$variables['imagefield_type'] = 'imagefield'; |
| 34 |
|
|
| 35 |
$node = $variables['node']; |
$node = $variables['node']; |
| 38 |
$thumb_path = imagefield_file_admin_thumb_path($image); |
$thumb_path = imagefield_file_admin_thumb_path($image); |
| 39 |
list($width, $height, $type, $image_attributes) = @getimagesize($thumb_path); |
list($width, $height, $type, $image_attributes) = @getimagesize($thumb_path); |
| 40 |
$formatted_image = array(); |
$formatted_image = array(); |
| 41 |
$formatted_image['path'] = '/'. $image['filepath']; |
$formatted_image['path'] = $base_url . $image['filepath']; |
| 42 |
$formatted_image['thumb_path'] = '/'. $thumb_path; |
$formatted_image['thumb_path'] = $base_url . $thumb_path; |
| 43 |
$formatted_image['rel'] = $variables['image_rel']; |
$formatted_image['rel'] = $variables['image_rel']; |
| 44 |
$formatted_image['width'] = $width; |
$formatted_image['width'] = $width; |
| 45 |
$formatted_image['height'] = $height; |
$formatted_image['height'] = $height; |