Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image Tags


sinbad

Recommended Posts

Posted

Hi I need some help here. How can I remove the alt tags for the product pages? I've looked through the forum and can't find anything. Found a reference to html_output.php and looked at that page and found

  // alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }

   if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
     if ($image_size = @getimagesize($src)) {
       if (empty($width) && tep_not_null($height)) {
         $ratio = $height / $image_size[1];
         $width = $image_size[0] * $ratio;
       } elseif (tep_not_null($width) && empty($height)) {
         $ratio = $width / $image_size[0];
         $height = $image_size[1] * $ratio;
       } elseif (empty($width) && empty($height)) {
         $width = $image_size[0];
         $height = $image_size[1];
       }
     } elseif (IMAGE_REQUIRED == 'false') {
       return false;
     }
   }

   if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
   }

   if (tep_not_null($parameters)) $image .= ' ' . $parameters;

   $image .= '>';

   return $image;
 }

 

But don't know what to change tried commenting out a few things here and there but just got errors. I don't even know If I'm looking in the right spot. Was up til 4am last night it's 11:pm now and I still haven't been able to remove these tags. Someone please help

Sinbad

"Mine is not the only way, mine is just another way

Posted

you should look in the section dealing on legal, as i believe you are now required to have the alt tags and they have to be usable, think it is because of some of the disabled

Posted

Removing alt tags will cause you more problems than it is worth. Use of alt tags is good practice, it is valid HTML and it is good for accessibility, or those people who surf with images off.

Posted

I know it is good practice and validates the html. For those that use screen readers I have placed screen tips. It takes more than a alt tag for a search engine to locate you.

you should look in the section dealing on legal
I've seen a few of the MAJOR on-line retail sites who do not have these tags. I do know that in Europe it has become law and is punishable with fines. Now if it is part of the licensing agreement to use oscommerce then ok.

Sinbad

"Mine is not the only way, mine is just another way

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...