Results 1 to 10 of 3727

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Location
    Philadelphia, PA, USA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    In regards to my last post. Storing an image in the 'large' folder has no effect.

  2. #2
    Join Date
    Aug 2005
    Location
    Philadelphia, PA, USA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    Well, I identified one part of the problem. ZenCart 1.3.7.1 made some good changes. Zen now catches when medium and large image versions don't exist and will use the standard image by default. The file adversely affecting lightbox (and IH2) is /includes/modules/main_product_image.php.

    When the 1.3.7.1 code is removed lightbox operates correctly but the product image is missing.

    When the 1.3.7.1 code is added the product image is correct but 'some' lightbox images won't pull up. Keep in mind that my /images/medium & /images/large
    folders are empty. IH2 handles the resizing.

    Hopefully this info will help someone.

  3. #3
    Join Date
    Aug 2005
    Location
    Philadelphia, PA, USA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    Alright. Everything I wrote previously was correct... but moot.

    Now how about a solution, huh? (for those having a problem.)

    Replace /includes/templates/YOUR-TEMPLATE/templates/tpl_modules_main_product_image.php with the following:
    Code:
    <?php
    /**
     * Module Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 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: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $
     */
    ?>
    <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
    
    <div id="productMainImage" class="centeredContent back">
      <!-- begin zen lightbox v1.3 aclarke 2006-10-20 -->
      <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="' . zen_image_lightbox_IH2_url($products_image_large, addslashes($products_name), '800', '600') . '" rel="lightbox[gallery]" title="' . addslashes($products_name) . '">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
    //--></script>
      <!-- end zen lightbox v1.3 aclarke 2006-10-20 -->
      <noscript>
      <?php
      echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
    ?>
      </noscript> 
    </div>
    Basically, the problem was with LARGE_IMAGE_WIDTH and LARGE_IMAGE_HEIGHT so I hard coded them with '800' and '600'.

    Bada Bing. Not an elegant solution... but it works!

  4. #4
    Join Date
    Nov 2006
    Location
    Toronto, Ontario
    Posts
    65
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    Is there any way i can get this to open up in an absolute position? Like always 60px from the top of the page? Right now it opens up relative to how far you are scrolled down on the page.

  5. #5
    Join Date
    Aug 2005
    Location
    Philadelphia, PA, USA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    /includes/templates/template_default/lightbox.js

    Edit line 352
    Code:
    var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 15);
    • Replace the '/15' with a greater number to reduce the space above your images.
    • Erase '+ (arrayPageSize[3] / 15)' to remove the top spacing altogether
    • Erase 'arrayPageScroll[1] + ' to remove it's 'adjust to scroll' features (though I don't know why you would want to do that)
    I discovered these on my own so the experts can offer a cleaner solution if they know of it.

    BTW. Edit Line 65 to adjust lightbox's resize speed.

  6. #6
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Zen Lightbox...

    I use Lightbox with Zen 1.3.7 + IH2 and have no problem with image not showing, no code needed to be modified.

    Anyway, 1 tip for all: since lightbox is used only when the customers view the product in product_info page, there is no reason to load it on every page and slow down your site, you can rename stylesheet_lightbox.css to product_info.css
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  7. #7
    Join Date
    Feb 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    Does any one know a way to use lightbox in an ezpage?
    I need to make a page of thumbnails that when clicked, open in to large images using lightbox.

 

 

Similar Threads

  1. Free Shipping Rules addon [Support Thread]
    By numinix in forum Addon Shipping Modules
    Replies: 36
    Last Post: 2 Dec 2016, 01:56 PM
  2. v151 Reviews Reply addon [Support Thread]
    By mikestaps in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 17 Oct 2014, 01:29 AM
  3. Jquery Lightbox [Support thread]
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 257
    Last Post: 2 Aug 2012, 10:57 PM
  4. File Upload Required addon [Support Thread]
    By 1100101 in forum All Other Contributions/Addons
    Replies: 21
    Last Post: 10 Dec 2011, 03:00 AM
  5. [Support Thread] IE only JavaScripts and Stylesheets Addon
    By Meshach in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 31 May 2011, 08:18 PM

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