- "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: Associate Images with Taxonomy Terms
Submitted on Tue, 04/08/2008 - 18:20.
Description
The taxonomy image module allows siteA logically grouped set of content - also web site. administrators to associate images with taxonomy terms. Once defined, this association allows DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. themes or other PHPRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. code to display images with siteA logically grouped set of content - also web site. content. For example, the taxonomy_image moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. might be used to display a penguin with content about LinuxA Unix variant that has become very popular. It has itself spawned numerous variants, although not all of those enjoy open-source status., and a cheeseburger with content about junk food.
The moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. allows the administrator to create a one-to-one term-to-image relationship. With image display recursion, it is also possible to create a many-to-one relationship. This is useful if creating taxonomy hierarchies in which an entire tree of terms will use the same image. With recursion enabled, you only need to associate an image with the tree parent, and all children will automatically inherit the same image.
Features
- Image configuration happens within existing admin/taxonomy menu structure.
- Developers can add custom attributes to
<img>markup when displaying images. - Allows one-to-one term-to-image relationships.
- Allows many-to-one term-to-image relationships.
- Admin-permitted users can disable the images.
- Administrators can force images to be a standard size.
- Utilizes core file.inc API.
- Any kind of image that can be used with the
<img>tag is allowed, including animated gifs. - Provides the image to Views, if it is installed.
- Will use Imagecache to resize the image, if it is installed and configured.
Set Up
- Standard moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. installation applies.
- Requires the taxonomy moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. to be enabled.
- Properly configure Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world.'s built in file system support by following the directions atAdminister >> Site configuration >> File settings. Taxonomy Image will create another directory within the default file directory.
Settings
The overall moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. settings are found at Administer >> Site configuration >> Taxonomy Image.
- Picture image path - This is the subdirectory in your files directory (
Administer >> Site configuration >> File settings) where the category pictures will be stored. - User "Disable" box description - This allows you to describe the per-user ability to disable Taxonomy Image display in a manner that your users will understand.
- Resizing Options
- Picture resizing options - Imagecache - If the Imagecache moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. is installed, you will have a set of radios to choose the default preset for resizing the images. If you select one of these presets, or provide one in your call, then Taxonomy Image will use Imagecache to process the image.
- Picture resizing options - Taxonomy Image - this radio box selection determines how large the category images will be.
- Exact - pictures will be resized to exactly the specified dimension(s).
- Not less than - pictures smaller than the specified size will be scaled up.
- Not greater than - pictures larger than the specified size will be scaled down.
- Disabled - pictures will not be resized; they will be displayed exactly as they are uploaded.
- Picture height - Specify a height in pixels. See the "picture resize" option above.
- Picture width - Specify a width in pixels. See the "picture resize" option above.
- Add wrapper div tag - This option indicates whether to add a "<div>" tag to the image. This may be useful in lists where the images are not of the same width.
- Recursive image display - This functionality is only useful if you have defined a hierarchical taxonomy and multiple terms within a tree will share the same image. The taxonomy_image_display function will recursively search for an image to display, starting with the applicable term, then trying the term's parents.
If you don't understand what this means, then it's a good idea to not enable it.
The following will be ignored if an Imagecache preset is chosen (either by default or at run time). However, if the Imagecache preset provided is "ORIGINAL," Taxonomy Image will use these, so they should be set.
Permissions
The taxonomy_image.moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. provides three permissions:
- 'access taxonomy images': allow user to see taxonomy images.
- 'administer taxonomy images': allow user to configure taxonomy images.
- 'can disable taxonomy images': allow user to disable taxonomy images.
Note that you need to enable 'access taxonomy images' for users that should see the taxonomy images.
Setting Up the Vocabulary and Terms
Uploading images
With the taxonomy_image moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. enabled, images can be uploaded and associated with category terms at Administer >> Content management >> Categories >> Images (this is a tab called "Category images"). On that page you will find tables containing all your vocabularies and terms. Next to each term is a linkThe technique which points to another page, anywhere on the Internet, from the current page. titled "upload image," which you can click to upload an image for that term. After clicking that linkThe technique which points to another page, anywhere on the Internet, from the current page., you will be taken to another page with a small "Add images" form. Using the "browse" button you can select your image then click "Save."
Continue this process to upload appropriate images for your category terms. Note that by default, images will be displayed at the size they were uploaded. Alternatively, you can go to settings page (described above) to force the display height and/or width of all taxonomy images.
Recursive image display
Taxonomy is a very powerful tool. One of its features is providing the ability to create hierarchical vocabularies, with which you can build a tree of terms. It is possible that an entire tree of terms, or even just a branch of terms, are all about a similar subject and should all be associated with the same image. By going to Administer >> Site configuration >> taxonomy_image, you can enable "Recursive image display." With this option enabled, you only need to configure an image for the parent term, and all children will automatically inherit the same image (unless they are manually configured to display an alternative image).


Recent comments
6 days 22 hours ago
5 weeks 5 days ago
5 weeks 5 days ago
6 weeks 4 days ago
6 weeks 5 days ago
7 weeks 6 days ago
8 weeks 11 hours ago
8 weeks 3 days ago
8 weeks 5 days ago
8 weeks 5 days ago