Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38
  1. #31
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: JS/CSS thumbnail slider for additional images

    thats the slider on one of my new templates

    Quote Originally Posted by Feznizzle View Post
    I agree, digging it!

    But what is that screenshot?

    When I dl'ed the slick package, I saw a bunch of .exe type files, but I'm on a mac. Is there a software package for pc for generating the slider?

  2. #32
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: JS/CSS thumbnail slider for additional images

    Thank you so much for all your help. Seriously. No way I would have figured this thing out on my own.

    Did you miss post #29? Would you pretty please take a peak?

    https://www.zen-cart.com/showthread....80#post1307280

  3. #33
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: JS/CSS thumbnail slider for additional images

    Did you alter the additional_images.php modules file?

    /includes/modules/zca_responsive_classic/additional_images.php

    seems to be missing the stock class"class="additionalImages centeredContent back"

    Quote Originally Posted by Feznizzle View Post
    Awesomeness!!

    One last minor glitch. When no scroll is triggered, the additional images stack. Here is a link:
    http://0stage.justmedical***DOT***bi...roducts_id=159

    I'm pretty sure that goes back to this:
    https://www.zen-cart.com/showthread....60#post1307260

    Now that you have separated out the js, seems like the clear both needs to get put back into the group that does not receive js?

    I just can't figure where...

  4. #34
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: JS/CSS thumbnail slider for additional images

    I double, tripled checked. It in both the default and my_template:

    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' ' ' 'style="width:' $col_width '%;"'

  5. #35
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: JS/CSS thumbnail slider for additional images

    Your view source says otherwise
    PHP Code:
    <div id="productAdditionalImages"><div class="centeredContent">
          <
    script language="javascript" type="text/javascript"><!-- 
    Your looking in
    /includes/modules/premium6a/additional_images.php



    Quote Originally Posted by Feznizzle View Post
    I double, tripled checked. It in both the default and my_template:

    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' ' ' 'style="width:' $col_width '%;"'

  6. #36
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: JS/CSS thumbnail slider for additional images

    my fault

    in tpl_modules_additional_images.php

    find:
    PHP Code:
    echo '<div class="centeredContent">' $list_box_contents[$row][$col]['text'] .  '</div>'
    change to:
    PHP Code:
        echo '<div' $r_params '>' $list_box_contents[$row][$col]['text'] .  '</div>'
    Quote Originally Posted by Feznizzle View Post
    I double, tripled checked. It in both the default and my_template:

    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' ' ' 'style="width:' $col_width '%;"'

  7. #37
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: JS/CSS thumbnail slider for additional images

    Here is that entire file:
    PHP Code:
    <?php
    /**
     * additional_images module
     *
     * Prepares list of additional product images to be displayed in template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2011 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 18697 2011-05-04 14:35:20Z wilt $
     */
    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();

    // do not check for additional images when turned off
    if ($products_image != '' && $flag_show_product_info_additional_images != 0) {
      
    // 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('/\Q' $products_image_base '\E/i'$file) == 1) {
                if (
    $file != $products_image) {
                  if (
    $products_image_base str_replace($products_image_base''$file) == $file) {
                    
    // echo 'MIKEY ABOVE';
                    
    $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;
    //  Begin Image Handler changes 1 of 2
        
    if (function_exists('handle_image')) {
            
    $newimg handle_image($products_image_largeaddslashes($products_name), LARGE_IMAGE_WIDTHLARGE_IMAGE_HEIGHT'');
            list(
    $src$alt$width$height$parameters) = $newimg;
            
    $products_image_large zen_output_string($src);
        } 
        
    $flag_has_large file_exists($products_image_large);
    //  End Image Handler changes 1 of 2
        
    $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(addslashes($base_image), addslashes($products_name), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);
    //  Begin Image Handler changes 2 of 2
    //  remove additional single quotes from image attributes (important!)
        
    $thumb_slashes preg_replace("/([^\\\\])'/"'$1\\\''$thumb_slashes);
    //  End Image Handler changes 2 of 2
        
    $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 Colorbox 2012-04-30 niestudio
        
    if(function_exists('zen_colorbox')){
          include 
    'zen_colorbox.php';
        } else {
          
    $script_link '<script language="javascript" type="text/javascript"><!--' "\n" 'document.write(\'' . ($flag_display_large '<a href="javascript:popupWindow(\\\'' str_replace($products_image_largeurlencode(addslashes($products_image_large)), $large_link) . '\\\')">' $thumb_slashes '<br />' TEXT_CLICK_TO_ENLARGE '</a>' $thumb_slashes) . '\');' "\n" '//--></script>';
        }
        
    // eof Zen Colorbox 2012-04-30 niestudio

        
    $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"' ' ',
        
    'text' => "\n      " $link);
        
    $col ++;
        if (
    $col > (IMAGES_AUTO_ADDED -1)) {
          
    $col 0;
          
    $row ++;
        }
      } 
    // end for loop
    // endif

  8. #38
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: JS/CSS thumbnail slider for additional images

    Awesomeness! You da main man! ~~

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Additional images jquery mini-slider --- is it possible?
    By Invizix in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 17 Sep 2012, 12:48 PM
  2. Main Image Thumbnail Appear With Additional Images
    By cv733 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Jan 2011, 08:38 PM
  3. How do I show the main image as a thumbnail with the additional images?
    By rikahsdesign in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Jan 2011, 03:45 AM
  4. CSS & additional images
    By Paris in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 30 Aug 2007, 11:42 PM
  5. Define thumbnail for large product images?
    By shirster in forum General Questions
    Replies: 4
    Last Post: 29 Apr 2007, 06:19 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