Forums / Templates, Stylesheets, Page Layout / problem with transparent gif images

problem with transparent gif images

Locked

Views: 2,405

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
23 Apr 2008, 10:10 PM
#1
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

problem with transparent gif images

I have my site set up so that all images have a 1px black border. This works great for me except when I view a category page since the list of subcategories contains a number of transparent gifs. Is there a way to remove that border with the stylesheet?

23 Apr 2008, 10:13 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: problem with transparent gif images

The stock program and template shouldn't have any transparent gifs on the catalog side. Please post a URL to your example.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

23 Apr 2008, 11:30 PM
#3
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: problem with transparent gif images

Hi, One example is here: http://vinylfrontier.com/cart/index.php?main_page=index&cPath=85

The subcategories of artists under the category "B" are spaced vertically with a transparent gif called pixel_trans.gif.

Also, if there is a way to get the artist names to line up in columns instead of rows, that would be great. But that's a preference not a necessity.

25 Apr 2008, 5:47 PM
#5
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: problem with transparent gif images

http://vinylfrontier.com/shop/index.php?main_page=index&cPath=85

I can't seem to get rid of the subcategory images completely, When I set the admin values to turn them off they are replaced by a tiny transparent gif. I have also tried setting their dimensions to 0 in the admin and they just default to their normal size.
I don't really wouldn't mind the transparent gif if it was not visible, but it adopts the border attributes that I assigned to all other images.

Can someone take a look, please? I searched the forums and been all through the admin area trying to find a solution, but nothing seems to be working.

25 Apr 2008, 5:54 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: problem with transparent gif images

I am terribly sorry for leading you astray. You are correct there is stil a tranparent gif used as a replacement for a full size image in that section of legacy code.

To fix the problem you will need to change the Category Row module to not substitute the .gif for a missing image.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

25 Apr 2008, 6:31 PM
#7
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: problem with transparent gif images

Kim:

I am terribly sorry for leading you astray. You are correct there is stil a tranparent gif used as a replacement for a full size image in that section of legacy code.

To fix the problem you will need to change the Category Row module to not substitute the .gif for a missing image.

Thank you. I'm really a non-programmer, but at least I know in which direction to look.
I did a search for pixel_trans.gif in the admin Developers Tool Kit and it points to three locations:
/includes/classes/boxes.php
/includes/languages/english/other_images_names.php
/includes/modules/category_row.php

But from that point I'm pretty lost. How do I tell it not to substitute the gif image?

26 Apr 2008, 1:05 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: problem with transparent gif images

Try editing the file located at /includes/modules/category_row.php when done create a folder "CUSTOM" in /includes/modules/ so you have
/includes/modules/CUSTOM

upload to /includes/modules/CUSTOM/category_row.php

Find this section:

while (!$categories->EOF) {

    if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif';

    $cPath_new = zen_get_path($categories->fields['categories_id']);

Edit/delete red highlight so that you end up with:

while (!$categories->EOF) {

    if (!$categories->fields['categories_image']);

    $cPath_new = zen_get_path($categories->fields['categories_id']);

Now because you are overriding the core file this one will be used and you can check to see if it worked or breaks something and if so, just delete it and the default file will be used

Zen-Venom Get Bitten

26 Apr 2008, 1:20 AM
#9
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: problem with transparent gif images

Thanks kobra,

Unfortunately that one didn't work. But it didn't appear to break anything either. And I appreciate your taking a shot at it.

I've also considered another approach of only bordering the images only in the sections in which I want them bordered. But it appears that image bordering is determined only globally. When trying to make image borders in other parts of the style sheet, I get borders around the description too, not just the image.

26 Apr 2008, 1:22 AM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: problem with transparent gif images

So did the trans image still appear?
And now you have the border issue?
And which images are you referring to?

Zen-Venom Get Bitten

26 Apr 2008, 1:30 AM
#11
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: problem with transparent gif images

Yes, the transparent gif still came up.
You can see an example here: http://vinylfrontier.com/shop/index.php?main_page=index&cPath=85
or on any page with subcategories.
The gifs just get bordered with everything else since I call for bordered images in the stylesheet.

26 Apr 2008, 1:38 AM
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: problem with transparent gif images

try this

if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = '';

Zen-Venom Get Bitten

26 Apr 2008, 1:52 AM
#13
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: problem with transparent gif images

I gave that try earlier with no luck. Checked again after your suggestion just to be sure too.
I also tried just deleting the image from the server. But apparently when the image is not found the script just defaults to a standard image size (maybe determined in the admin area). I even tried setting the dimensions to zero in the admin area, but no success with that either.

26 Apr 2008, 2:02 AM
#14
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: problem with transparent gif images

Okay, I just got a perfect workaround for this without touching the category_row.php file.

in the style sheet:
.categoryListBoxContents img {display:none;}

Thank you for taking the time to help out, kobra. And a big thanks to haredo for the solution:
http://www.zen-cart.com/forum/showthread.php?p=547264