- "Ask the Expert" or Advice Column
- "Must Have" Modules
- A Challenge
- Books Overview
- Changing Garland - A Practical Example
- Comparison of Links and Web Links modules
- Create Simple Tables
- Creating a "Biographies" page
- Developing a Module on a Windows System
- Generic Table Display
- How to page a custom DB query
- List Users From a Single Role in a Block
- My Modules
- Announcements: Special Notices for Your Site
- Attendance Matrix
- Content Type Template
- FAQ_Ask
- Get Content Type
- Glossary
- Gotcha - Contact Spam Catcher
- Helpers
- Indexpage: summary of node type information
- Longer Node Titles
- Node Type Filter
- Quotes
- RealName: Using Profile fields to set a user's displayed name
- Register_Country
- Site Documentation Module
- Site Notes: Hidden Design or How To notes in Your Database
- Spam Tokens
- Spam Tune
- Taxonomy Browser
- Taxonomy Delegate
- Taxonomy Image: Associate Images with Taxonomy Terms
- Taxonomy List: Displaying Lists of Terms
- SBS Web Site Notes
- Searching for a New Hosting Company
- Taxonomy Tidbits
- Theming a Specific Content Type
Taxonomy Image APIs
Submitted on Tue, 04/08/2008 - 18:23.
Taxonomy Image APIs
taxonomy_image_display($tid, $tags = null, $profile = null, $overrides = array())
Display the image associated with the given term id.
- Parameters:
- $tid
- The taxonomy term identifier.
- $tags
- Optional. Additional attributes, in standard Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. attributes array format ('attribute_name' => 'attribute_value'). - $profile
- Optional. An Imagecache preset name.
- $overrides
- Optional. An array of overrides to the configured settings that will be applied for this one call. Use this with great care.
- wrapper -> Adds a wrapper division to the generated URL.
- imagecache_preset -> Specifies the Imagecache preset to use. Note: the "profile" parameter is better for this.
- recursive -> Use recursive image search to find the image to use.
- resize -> Which type of Taxonomy Image resizing to use.
- width -> The width to use for Taxonomy Image resizing.
- height -> The height to use for Taxonomy Image resizing.
- Returns:
- An HTMLHyperText Markup Language - the coding standard for a web page. string containing a themed ('image' or 'imagecache') "<img>" element.
- Note:
- If you want to call both "taxonomy_image_display" and "taxonomy_image_get_object," call for the object first. The object is statically cached so it will already be available when you get the image.
taxonomy_image_get_url($tid)
Get a URL for an image, for use in CSSCascading Style Sheet - a hierarchical means of specifying how to format HTML elements on the page, HTMLHyperText Markup Language - the coding standard for a web page., or other client-side code.
- Parameters:
- $tid
- The taxonomy term identifier.
- Returns:
- A URL for the image.
taxonomy_image_get_object($tid, $recursive = null)
Get an image object with more useful data for custom formatting.
- Parameters:
- $tid
- The taxonomy term identifier.
- $recursive
- Override the configured setting for recursive display. The default is to use the configuration.
- Returns:
- An object containing:
- path -> The file path for the image.
- name -> The term name.
- description -> The description of the term, as entered by the admin.
- url -> The URL for the image.
- width -> The width for the image.
- height -> The height for the image.
- type -> The image type value (see http://us2.php.net/manual/en/function.getimagesize.php).
- tags -> The width and height formatted for inclusion within HTMLHyperText Markup Language - the coding standard for a web page..
- bits -> As returned from "getimagesize."
- channels -> As returned from "getimagesize."
- mime -> As returned from "getimagesize."
- term -> A formatted URL (or URL alias if available) for use as a "taxonomy/term/xxx" linkThe technique which points to another page, anywhere on the Internet, from the current page..
- image -> An "<img>" element containing the width and height (but without using any resizing options).



Recent comments
1 week 5 days ago
6 weeks 4 days ago
6 weeks 4 days ago
7 weeks 3 days ago
7 weeks 4 days ago
8 weeks 5 days ago
8 weeks 6 days ago
9 weeks 2 days ago
9 weeks 3 days ago
9 weeks 3 days ago