| 1 |
<?php |
<?php |
| 2 |
// $Id: taxonomy_image.module,v 1.12.4.13.2.44 2009/04/16 13:33:35 nancyw Exp $ |
// $Id: taxonomy_image.module,v 1.12.4.13.2.45 2009/04/17 15:54:43 nancyw Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 69 |
$my_attrs = array( |
$my_attrs = array( |
| 70 |
'width' => $current->width, |
'width' => $current->width, |
| 71 |
'height' => $current->height, |
'height' => $current->height, |
| 72 |
|
'class' => 'taxonomy-image-term-' . $current->tid .' taxonomy-image-vid-' . $current->vid |
| 73 |
); |
); |
| 74 |
// $tag was originally an HTML attribute string. It should now be a standard attributes array. |
// $tag was originally an HTML attribute string. It should now be a standard attributes array. |
| 75 |
// If the caller provided the same key, this will force me to use those. |
// If the caller provided the same key, this will force me to use those. |
| 253 |
} |
} |
| 254 |
|
|
| 255 |
// If there was no image, but there is a default, fake it. |
// If there was no image, but there is a default, fake it. |
| 256 |
|
$term = taxonomy_get_term($tid); |
| 257 |
if (!isset($image[$tid]->path) && ($default = variable_get('taxonomy_image_default', NULL))) { |
if (!isset($image[$tid]->path) && ($default = variable_get('taxonomy_image_default', NULL))) { |
| 258 |
$image[$tid]->path = $default; |
$image[$tid]->path = $default; |
|
$term = taxonomy_get_term($tid); |
|
| 259 |
$image[$tid]->name = $term->name; |
$image[$tid]->name = $term->name; |
| 260 |
$image[$tid]->description = $term->description; |
$image[$tid]->description = $term->description; |
| 261 |
// $image[$tid]->url = file_create_url($mypath . $image[$tid]->path); |
// $image[$tid]->url = file_create_url($mypath . $image[$tid]->path); |
| 264 |
// Get more properties if we had an image. |
// Get more properties if we had an image. |
| 265 |
if (!empty($image[$tid]->path)) { |
if (!empty($image[$tid]->path)) { |
| 266 |
$image[$tid]->tid = $tid; |
$image[$tid]->tid = $tid; |
| 267 |
|
$image[$tid]->vid = $term->vid; |
| 268 |
// $img = getimagesize($image[$tid]->path); |
// $img = getimagesize($image[$tid]->path); |
| 269 |
$img = getimagesize($image[$tid]->url); |
$img = getimagesize($image[$tid]->url); |
| 270 |
// Make sure it worked. |
// Make sure it worked. |