Can't get this module to work, I'm afraid - if I put taxonomy_image_display into a PHP field in my view, I just get errors.
I have a page view that lists all items in a given taxonomy in a grid, but I want to make the image a link to a Node form and carry through fields from a previous view. I have added an image field to the taxonomy and I can get the images to display just fine - so I know the taxonomy data retrieval is working. If I play with the "available variables" I can get it to show the taxonomy term ID and/or image ID, but a call to taxonomy_image_display($row->tid); just causes a 500 error.
Incidentally, if you want to see how I'm currently extracting the image:
if (isset($data->_field_data['tid']['entity'])) {
$entity=$data->_field_data['tid']['entity'];
if (isset($entity->field_photo['und'][0])) {
$field_photo=$entity->field_photo['und'][0];
$imageFilename=$field_photo['filename'];
echo "<img src=\"sites/default/files/styles/medium/public/".$imageFilename."\" title=\"choose\" />";
} else {
# no image for this taxonomy entry
echo "<img src=\"sites/default/files/select.png\" title=\"choose\" />";
}
} else {
echo "ERROR: missing entity!"; # unlikely
}
Unfortunately this method only returns the actual filename so I'm having to assume the path.
Versions:
- Drupal core - 7.19
- Entity Reference - 7.x-1.0
- Taxonomy Image - 7.x-1.x-dev
- Views - 7.x-3.5
- Views Calc - 7.x-1.0
- Views PHP - 7.x-1.x-dev
Comments
Comment #1
GStegemann CreditAttribution: GStegemann commentedFrom what I have seen this error occurs because the function does not exist anymore in the D7 version of this module.
I'm also looking for a replacement of taxonomy_image_display or an alternate method. The Web Links modules uses this function as well which is also broken due to this change.