/[drupal]/contributions/modules/taxonomy_image/taxonomy_image.module
ViewVC logotype

Diff of /contributions/modules/taxonomy_image/taxonomy_image.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.12.4.13.2.45, Fri Apr 17 15:54:43 2009 UTC revision 1.12.4.13.2.46, Fri Apr 17 16:25:35 2009 UTC
# Line 1  Line 1 
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
# Line 69  function taxonomy_image_display($tid, $t Line 69  function taxonomy_image_display($tid, $t
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.
# Line 252  function taxonomy_image_get_object($tid, Line 253  function taxonomy_image_get_object($tid,
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);
# Line 263  function taxonomy_image_get_object($tid, Line 264  function taxonomy_image_get_object($tid,
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.

Legend:
Removed from v.1.12.4.13.2.45  
changed lines
  Added in v.1.12.4.13.2.46

  ViewVC Help
Powered by ViewVC 1.1.2