Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27
  1. #11
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    i dont have the lightbox mod installed, so I'm guessing that adds something to additional_images.php..???
    ~Steve~

  2. #12
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    Well, it must :-)

    Here's the line in question:

    BEFORE YOUR CHANGE:
    PHP Code:
        // List Box array generation:
        
    $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' ' ' 'style="width:' $col_width '%;"',
        
    'text' => "\n      " $link);
        
    $col ++;
        if (
    $col > (IMAGES_AUTO_ADDED -1)) {
          
    $col 0;
          
    $row ++;
        }
      } 
    // end for loop
    // endif 
    AFTER:
    PHP Code:
        // List Box array generation:
        
    $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' ' ' 'style="width:130px;' $col_width '%;"',
        
    'text' => "\n      " $link);
        
    $col ++;
        if (
    $col > (IMAGES_AUTO_ADDED -1)) {
          
    $col 0;
          
    $row ++;
        }
      } 
    // end for loop
    // endif 
    As you can see, the little . $col_width . '%;"', part is the only difference in that line.... here is a copy of the entire file though:

    PHP Code:
    <?php
    /**
     * additional_images module
     *
     * Prepares list of additional product images to be displayed in template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: additional_images.php 5369 2006-12-23 10:55:52Z drbyte $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }
    if (!
    defined('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE')) define('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE','Yes');
    $images_array = array();

    if (
    $products_image != '') {
      
    // prepare image name
      
    $products_image_extension substr($products_imagestrrpos($products_image'.'));
      
    $products_image_base str_replace($products_image_extension''$products_image);

      
    // if in a subdirectory
      
    if (strrpos($products_image'/')) {
        
    $products_image_match substr($products_imagestrrpos($products_image'/')+1);
        
    //echo 'TEST 1: I match ' . $products_image_match . ' - ' . $file . ' -  base ' . $products_image_base . '<br>';
        
    $products_image_match str_replace($products_image_extension''$products_image_match) . '_';
        
    $products_image_base $products_image_match;
      }

      
    $products_image_directory str_replace($products_image''substr($products_imagestrrpos($products_image'/')));
      if (
    $products_image_directory != '') {
        
    $products_image_directory DIR_WS_IMAGES str_replace($products_image_directory''$products_image) . "/";
      } else {
        
    $products_image_directory DIR_WS_IMAGES;
      }

      
    // Check for additional matching images
      
    $file_extension $products_image_extension;
      
    $products_image_match_array = array();
      if (
    $dir = @dir($products_image_directory)) {
        while (
    $file $dir->read()) {
          if (!
    is_dir($products_image_directory $file)) {
            if (
    substr($filestrrpos($file'.')) == $file_extension) {
              
    //          if(preg_match("/" . $products_image_match . "/i", $file) == '1') {
              
    if(preg_match("/" $products_image_base "/i"$file) == '1') {
                if (
    $file != $products_image) {
                  if (
    $products_image_base str_replace($products_image_base''$file) == $file) {
                    
    //  echo 'I AM A MATCH ' . $file . '<br>';
                    
    $images_array[] = $file;
                  } else {
                    
    //  echo 'I AM NOT A MATCH ' . $file . '<br>';
                  
    }
                }
              }
            }
          }
        }
        if (
    sizeof($images_array)) {
          
    sort($images_array);
        }
        
    $dir->close();
      }
    }

    // Build output based on images found
    $num_images sizeof($images_array);
    $list_box_contents '';
    $title '';

    if (
    $num_images) {
      
    $row 0;
      
    $col 0;
      if (
    $num_images IMAGES_AUTO_ADDED || IMAGES_AUTO_ADDED == ) {
        
    $col_width floor(100/$num_images);
      } else {
        
    $col_width floor(100/IMAGES_AUTO_ADDED);
      }

      for (
    $i=0$n=$num_images$i<$n$i++) {
        
    $file $images_array[$i];
        
    $products_image_large str_replace(DIR_WS_IMAGESDIR_WS_IMAGES 'large/'$products_image_directory) . str_replace($products_image_extension''$file) . IMAGE_SUFFIX_LARGE $products_image_extension;
        
    $flag_has_large true;//file_exists($products_image_large);
        
    $products_image_large = ($flag_has_large $products_image_large $products_image_directory $file);
        
    $flag_display_large = (IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE == 'Yes' || $flag_has_large);
        
    $base_image $products_image_directory $file;
        
    $thumb_slashes zen_image($base_imageaddslashes($products_name), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);
        
    // remove additional single quotes from image attributes (important!)
        
    $thumb_slashes preg_replace("/([^\\\\])'/"'$1\\\''$thumb_slashes);
        
    $thumb_regular zen_image($base_image$products_nameSMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);
        
    $large_link zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL'pID=' $_GET['products_id'] . '&pic=' $i '&products_image_large_additional=' $products_image_large);

        
    // Link Preparation:
        
    $script_link '<script language="javascript" type="text/javascript"><!--' "\n" 'document.write(\'' . ($flag_display_large '<a href="javascript:popupWindow(\\\'' $large_link '\\\')">' $thumb_slashes '<br />' TEXT_CLICK_TO_ENLARGE '</a>' $thumb_slashes) . '\');' "\n" '//--></script>';

        
    $noscript_link '<noscript>' . ($flag_display_large '<a href="' zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL'pID=' $_GET['products_id'] . '&pic=' $i '&products_image_large_additional=' $products_image_large) . '" target="_blank">' $thumb_regular '<br /><span class="imgLinkAdditional">' TEXT_CLICK_TO_ENLARGE '</span></a>' $thumb_regular ) . '</noscript>';

        
    //      $alternate_link = '<a href="' . $products_image_large . '" onclick="javascript:popupWindow(\''. $large_link . '\') return false;" title="' . $products_name . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>';

        
    $link $script_link "\n      " $noscript_link;
        
    //      $link = $alternate_link;





        // List Box array generation:
        
    $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' ' ' 'style="width:130px;' $col_width '%;"',
        
    'text' => "\n      " $link);
        
    $col ++;
        if (
    $col > (IMAGES_AUTO_ADDED -1)) {
          
    $col 0;
          
    $row ++;
        }
      } 
    // end for loop
    // endif



    ?>

  3. #13
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    You have the following PHP;

    . 'style="width:130px;' . $col_width . '%;"',

    try

    . 'style="width:130px;" ',

    If you leave that code in your page, I'll go take a look...
    ~Steve~

  4. #14
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    I believe you may be editing the wrong file. I downloaded the lightbox module, and the additional_images.php file is different from the one you have posted...
    ~Steve~

  5. #15
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    OK, I've left that in, but still Zen Lightbox disabled.... Maybe you can pick up on the problem from the page code?

  6. #16
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    Definately the wrong file, there is a whole lot of "Zen Lightbox" code missing from the php file you posted... or maybe I should say, the right file, but the wrong code inside it.... check that you have not overwritten the customised additional_images.php file that comes with the lightbox module.
    ~Steve~

  7. #17
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    That's odd... I downloaded mines from here:

    http://www.zen-cart.com/index.php?ma...roducts_id=273

    Is this the same one you got?

    I just downloaded it again, uploaded the newly downloaded version with your width changes at the bottom, just to see if it was that.. Still the same though..

    Take another look and see if it's the same file.

  8. #18
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    Maybe you can post the code from your file and I'll upload that?

  9. #19
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    This is the new file I just downloaded, changed and put on the site:

    PHP Code:
    <?php
    /**
     * additional_images module
     *
     * Prepares list of additional product images to be displayed in template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: additional_images.php 6132 2007-04-08 06:58:40Z drbyte $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }
    if (!
    defined('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE')) define('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE','Yes');
    $images_array = array();

    if (
    $products_image != '') {
      
    // prepare image name
      
    $products_image_extension substr($products_imagestrrpos($products_image'.'));
      
    $products_image_base str_replace($products_image_extension''$products_image);

      
    // if in a subdirectory
      
    if (strrpos($products_image'/')) {
        
    $products_image_match substr($products_imagestrrpos($products_image'/')+1);
        
    //echo 'TEST 1: I match ' . $products_image_match . ' - ' . $file . ' -  base ' . $products_image_base . '<br>';
        
    $products_image_match str_replace($products_image_extension''$products_image_match) . '_';
        
    $products_image_base $products_image_match;
      }

      
    $products_image_directory str_replace($products_image''substr($products_imagestrrpos($products_image'/')));
      if (
    $products_image_directory != '') {
        
    $products_image_directory DIR_WS_IMAGES str_replace($products_image_directory''$products_image) . "/";
      } else {
        
    $products_image_directory DIR_WS_IMAGES;
      }

      
    // Check for additional matching images
      
    $file_extension $products_image_extension;
      
    $products_image_match_array = array();
      if (
    $dir = @dir($products_image_directory)) {
        while (
    $file $dir->read()) {
          if (!
    is_dir($products_image_directory $file)) {
            if (
    substr($filestrrpos($file'.')) == $file_extension) {
              
    //          if(preg_match("/" . $products_image_match . "/i", $file) == '1') {
              
    if(preg_match("/" $products_image_base "/i"$file) == 1) {
                if (
    $file != $products_image) {
                  if (
    $products_image_base str_replace($products_image_base''$file) == $file) {
                    
    //  echo 'I AM A MATCH ' . $file . '<br>';
                    
    $images_array[] = $file;
                  } else {
                    
    //  echo 'I AM NOT A MATCH ' . $file . '<br>';
                  
    }
                }
              }
            }
          }
        }
        if (
    sizeof($images_array)) {
          
    sort($images_array);
        }
        
    $dir->close();
      }
    }

    // Build output based on images found
    $num_images sizeof($images_array);
    $list_box_contents '';
    $title '';

    if (
    $num_images) {
      
    $row 0;
      
    $col 0;
      if (
    $num_images IMAGES_AUTO_ADDED || IMAGES_AUTO_ADDED == ) {
        
    $col_width floor(100/$num_images);
      } else {
        
    $col_width floor(100/IMAGES_AUTO_ADDED);
      }

      for (
    $i=0$n=$num_images$i<$n$i++) {
        
    $file $images_array[$i];
        
    $products_image_large str_replace(DIR_WS_IMAGESDIR_WS_IMAGES 'large/'$products_image_directory) . str_replace($products_image_extension''$file) . IMAGE_SUFFIX_LARGE $products_image_extension;
        
    // bof Zen Lightbox 2008-12-11 aclarke
        
    if (function_exists('handle_image')) {
          
    $flag_has_large true;
        } else {
        
    // eof Zen Lightbox 2008-12-11 aclarke
        
    $flag_has_large file_exists($products_image_large);
        
    // bof Zen Lightbox 2008-12-11 aclarke
        
    }
        
    // eof Zen Lightbox 2008-12-11 aclarke
        
    $products_image_large = ($flag_has_large $products_image_large $products_image_directory $file);
        
    $flag_display_large = (IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE == 'Yes' || $flag_has_large);
        
    $base_image $products_image_directory $file;
        
    $thumb_slashes zen_image($base_imageaddslashes($products_name), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);
        
    // bof Zen Lightbox 2008-12-11 aclarke
        
    if (function_exists('handle_image')) {
        
    // remove additional single quotes from image attributes (important!)
        
    $thumb_slashes preg_replace("/([^\\\\])'/"'$1\\\''$thumb_slashes);
        }
        
    // eof Zen Lightbox 2008-12-11 aclarke
        
    $thumb_regular zen_image($base_image$products_nameSMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);
        
    $large_link zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL'pID=' $_GET['products_id'] . '&pic=' $i '&products_image_large_additional=' $products_image_large);

        
    // Link Preparation:
        // bof Zen Lightbox 2008-12-11 aclarke
        
    if (ZEN_LIGHTBOX_STATUS == 'true') {
          if (
    ZEN_LIGHTBOX_GALLERY_MODE == 'true') {
            
    $rel 'lightbox-g';
          } else {
            
    $rel 'lightbox';
          }
        
    $script_link '<script language="javascript" type="text/javascript"><!--' "\n" 'document.write(\'' . ($flag_display_large '<a href="' zen_lightbox($products_image_largeaddslashes($products_name), LARGE_IMAGE_WIDTHLARGE_IMAGE_HEIGHT) . '" rel="' $rel '" title="' addslashes($products_name) . '">' $thumb_slashes '<br />' TEXT_CLICK_TO_ENLARGE '</a>' $thumb_slashes) . '\');' "\n" '//--></script>';
        } else {
        
    // eof Zen Lightbox 2008-12-11 aclarke
        
    $script_link '<script language="javascript" type="text/javascript"><!--' "\n" 'document.write(\'' . ($flag_display_large '<a href="javascript:popupWindow(\\\'' $large_link '\\\')">' $thumb_slashes '<br />' TEXT_CLICK_TO_ENLARGE '</a>' $thumb_slashes) . '\');' "\n" '//--></script>';
        
    // bof Zen Lightbox 2008-12-11 aclarke
        
    }
        
    // eof Zen Lightbox 2008-12-11 aclarke

        
    $noscript_link '<noscript>' . ($flag_display_large '<a href="' zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL'pID=' $_GET['products_id'] . '&pic=' $i '&products_image_large_additional=' $products_image_large) . '" target="_blank">' $thumb_regular '<br /><span class="imgLinkAdditional">' TEXT_CLICK_TO_ENLARGE '</span></a>' $thumb_regular ) . '</noscript>';

        
    //      $alternate_link = '<a href="' . $products_image_large . '" onclick="javascript:popupWindow(\''. $large_link . '\') return false;" title="' . $products_name . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>';

        
    $link $script_link "\n      " $noscript_link;
        
    //      $link = $alternate_link;

        // List Box array generation:
        
    $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' ' ' 'style="width:130px;" ',
        
    'text' => "\n      " $link);
        
    $col ++;
        if (
    $col > (IMAGES_AUTO_ADDED -1)) {
          
    $col 0;
          
    $row ++;
        }
      } 
    // end for loop
    // endif

    ?>

  10. #20
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Problem with OPERA Additional Images Display

    OK! now that is the same file that I am looking at.... and I do not see any reason why the change of code for the in line style is breaking this...
    ~Steve~

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Problem with additional images layout
    By webmiss in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Nov 2011, 11:00 PM
  2. Problem with additional images
    By Craftystash in forum Customization from the Admin
    Replies: 3
    Last Post: 14 Jul 2009, 10:51 AM
  3. problem with additional images box in IE
    By koenvandamme in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Mar 2009, 10:31 AM
  4. Bug Opera with categories image display
    By cshart in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Dec 2007, 06:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg