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

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

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

revision 1.1.2.19, Fri Mar 13 17:27:27 2009 UTC revision 1.1.2.20, Fri Apr 17 17:09:30 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_image_blocks.module,v 1.1.2.18 2009/02/16 18:01:19 nancyw Exp $  // $Id: taxonomy_image_blocks.module,v 1.1.2.19 2009/03/13 17:27:27 nancyw Exp $
3  /**  /**
4   * @file   * @file
5   * Add a block to show the images attached to the terms of a node.   * Add a block to show the images attached to the terms of a node.
# Line 70  function taxonomy_image_block($op = 'lis Line 70  function taxonomy_image_block($op = 'lis
70                    $edit_link = NULL;                    $edit_link = NULL;
71                  }                  }
72    
73                  $rows[] = array(l($img, $term_path, array('html' => TRUE)) . $name_link . $edit_link);                  $rows[] = theme('taxonomy_image_block_rows', $img, $term_path, $name_link, $edit_link);
74                  ++$count;                  ++$count;
75                }                }
76                // Have we hit the limit?                // Have we hit the limit?
# Line 88  function taxonomy_image_block($op = 'lis Line 88  function taxonomy_image_block($op = 'lis
88                );                );
89              $block = array(              $block = array(
90                'subject' => strtr(variable_get('taxonomy_image_block_title', 'Term Images for "@title"'), $subs),                'subject' => strtr(variable_get('taxonomy_image_block_title', 'Term Images for "@title"'), $subs),
91                'content' => theme('table', array() , $rows, array('id' => 'taxonomy_image_terms')),                'content' => theme('taxonomy_image_block', $rows),
92                );                );
93            }            }
94            break;            break;
# Line 232  function taxonomy_image_blocks_form_alte Line 232  function taxonomy_image_blocks_form_alte
232      }      }
233    }    }
234  }  }
235    
236    function taxonomy_image_blocks_theme($existing, $type, $theme, $path) {
237      return array(
238        'taxonomy_image_block' => array(
239          'arguments' => array('rows' => NULL),
240        ),
241        'taxonomy_image_block_rows' => array(
242          'arguments' => array('img' => NULL, 'term_path' => NULL, 'name_link' => NULL, 'edit_link' => NULL, ),
243        ),
244      );
245    }
246    
247    function theme_taxonomy_image_block($rows) {
248      return theme('table', array() , $rows, array('id' => 'taxonomy-image-terms'));
249    }
250    
251    function theme_taxonomy_image_block_rows($img, $term_path, $name_link, $edit_link) {
252      return array(l($img, $term_path, array('html' => true)) . $name_link . $edit_link);
253    }

Legend:
Removed from v.1.1.2.19  
changed lines
  Added in v.1.1.2.20

  ViewVC Help
Powered by ViewVC 1.1.2