Closed (fixed)
Project:
Amazon associate tools
Version:
5.x-1.5
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2007 at 04:34 UTC
Updated:
30 Mar 2007 at 19:03 UTC
Hi,
I'm using the 'views' module to display amazon products in a table view. However, some of the amazon entries don't have images, which can mess up tables depending on the browser. For example, IE6 displays the entire alt/title on one line, in replace of the missing image, messing up the entire column which results in extending the width of the table cell where the images reside.
Is there any way to hack the display code (which I guess is within amazon_views.inc) to insert a placeholder image whenever there is not one associated with the entry?
Brad
Comments
Comment #1
BradM commentedI think I've answered this for myself.
Edit amazon_views.inc
Before the line:
$image = theme('image', $value, $alt, $title, $attributes, FALSE);
Add this:
if ($value == '') { $value = 'placeholder.gif'; }
Put this placeholder.gif (or whatever you call it) in the root of your drupal installation.
Probably need to do this for other views too.
Comment #2
BradM commentedSorry to bug you guys.
However, I now see that the medium placeholder image (missingm.gif) doesn't display correctly.
For some reason, the script is putting "node" within the image path.
So instead of /drupal/modules/amazontools/images/missingm.gif it is /drupal/node/modules/amazontools/images/missingm.gif
Maybe this explains why I had to do the hack above. For those images, the image url just shows up as the root of the installation (ie. /drupal) but with no image information at all.
Comment #3
Timotheos commentedPossibly
http://drupal.org/node/119475
Comment #4
BradM commentedThanks for pointing that out, it fixed the missingm.gif graphic problem for me.
Comment #5
Prometheus6 commented