Zen Cart Logo
Forums / All Other Contributions/Addons / Jquery Lightbox [Support thread]

Jquery Lightbox [Support thread]

Views: 82,872

Results 61 to 80 of 258
22 Mar 2009, 6:54 PM
#61
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Jquery Lightbox [Support thread]

Thanks so much for the help...

24 Mar 2009, 5:37 PM
#62
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

Hi yellow1912,

For updating jqlightbox, which file(s) do we overwrite with a new version?

thanks!

Also, there is a new version of jqlightbox and jqzoom which address the issue of watermark not working for IH2 available for download.

24 Mar 2009, 5:41 PM
#63
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

gsdcypher:

Hi yellow1912,

For updating jqlightbox, which file(s) do we overwrite with a new version?

thanks!
If you have made no changes then you can overwrite all, otherwise you have to compare the files in the modules/ and the templates/ folder

25 Mar 2009, 3:36 PM
#64
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

I updated image handler jzoom and jquery lightbox but still no watermark shows up. Uninstalled ih and reinstalled via admin. Cleared image cache. What else can I check?

25 Mar 2009, 4:28 PM
#65
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

mydanilo:

I updated image handler jzoom and jquery lightbox but still no watermark shows up. Uninstalled ih and reinstalled via admin. Cleared image cache. What else can I check?
You will have to check if the image being used is really ih2 created image. Link should look like this bmz_cache/a/e.....

I cant tell unless I see your site.

Edit: I can confirm that this product is using ih2 image:
http://www.mydanilo.com/fish/fish-table-lamp-tropical-yellow

So if the watermark does not show here, you will have to recheck your ih2 settings. Because the reason is: in previous version, jqzom and lightbox did not use images created by ih2, they use the original images instead, so no wonder the watermark does not show. Now that they already use ih2 images, and if watermark still does not show that has nothing to do with the 2 javascript modules. You should recheck your ih2 setting perhaps?

25 Mar 2009, 6:18 PM
#66
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

Settings in IH for watermark are activated. What IH file was now modified that takes care of the watermark? I want to check if I use the right file online. Where would the watermark file need to be placed? Still like before like /images/large/watermark_LRG.png ? That's what I have...

25 Mar 2009, 6:48 PM
#67
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

mydanilo:

Settings in IH for watermark are activated. What IH file was now modified that takes care of the watermark? I want to check if I use the right file online. Where would the watermark file need to be placed? Still like before like /images/large/watermark_LRG.png ? That's what I have...
No IH2 file was modified in this package, if that is the question you want to ask.

Also, your site is loading the correct image that it should, I dont know why watermark is not there though, you may want to try clearing ih2 image cache via ih2 admin?

Also, turn of jqzoom and see if the normal image show with watermarks as well.

You can see on my demo page here:
working:
http://demo.rubikintegration.com/jqzoom/index.php?main_page=product_info&cPath=3_10&products_id=12

not working:
http://demo.rubikintegration.com/jqzoom/index.php?main_page=product_info&cPath=21&products_id=47

I believe there is some kind of rule IH2 requires us to follow, thich Im not exactly sure at the moment lol. Gotta run now but I will check back later.

6 Apr 2009, 2:00 AM
#68
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

looking at the files from the update and comparing them to my current files, i can only find two files changed.

  1. additional_images
    add
if(!defined('LARGE_IMAGE_MAX_WIDTH'))
    define('LARGE_IMAGE_MAX_WIDTH', MEDIUM_IMAGE_WIDTH);
    
if(!defined('LARGE_IMAGE_MAX_HEIGHT'))
    define('LARGE_IMAGE_MAX_HEIGHT', MEDIUM_IMAGE_HEIGHT);

change:

    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . '<a href="'. zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_MAX_WIDTH, LARGE_IMAGE_MAX_HEIGHT) . '" class="'.$css_class.'">' . $thumb_slashes . '</a>\')'. "\n" . '//--></script>';
  1. tpl_modules_main_product_image
    change:
document.write('<a href="<?php echo zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_MAX_WIDTH, LARGE_IMAGE_MAX_HEIGHT);?>" id="jqzoomMain"<?php if (JQLIGHTBOX_STATUS == 'true') echo ' class="jqlightbox"';?>><?php echo zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);?></a>');

and change:

  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>';

but when i make that addition and those changes, it breaks the page...???

6 Apr 2009, 2:19 AM
#69
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

Exactly how does it break the page?

6 Apr 2009, 2:53 AM
#70
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

it's weird.... the entire page disappears (images, attributes, etc) and i can't figure out why. everything looks correct. unless i missed a change in one of the other files...

6 Apr 2009, 4:15 AM
#71
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

gsdcypher:

it's weird.... the entire page disappears (images, attributes, etc) and i can't figure out why. everything looks correct. unless i missed a change in one of the other files...
If entire page disappears, you got some syntax error somewhere

In that case this will help

https://www.zen-cart.com/tutorials/index.php?article=82

6 Apr 2009, 5:10 AM
#72
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

thanks. hmmm tried the utility but it didn't log any errors...

6 Apr 2009, 5:09 PM
#73
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

gsdcypher:

thanks. hmmm tried the utility but it didn't log any errors...

that is weird, but on some server the error setting is set so that no error is ever displayed, and in such cases i believe I did have to set something else to make the errors appear

http://us2.php.net/error-reporting

Anyhow, it would be very hard to know without seeing the site/page.

8 Apr 2009, 11:57 PM
#74
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

hi yellow1912,

you can see on my test site the ih2 watermark loads on images (except those images controlled by jquery lightbox)... :huh:

**http://tinyurl.com/5fbh7b

**thanks.

9 Apr 2009, 12:21 AM
#75
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

gsdcypher:

hi yellow1912,

you can see on my test site the ih2 watermark loads on images (except those images controlled by jquery lightbox)... :huh:

**http://tinyurl.com/5fbh7b

**thanks.
My ZoneAlarm doesnt like tinyurl :d, pm me. Also, fastest way is for you to send me the ftp info of your site so I fix it for you

10 Apr 2009, 1:29 AM
#76
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

i recoded two files and everything "seems" to work with the lightbox and the ih2 watermarks.

additional_images

<?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_image, strrpos($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_image, strrpos($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_image, strrpos($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($file, strrpos($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 == 0 ) {
    $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_IMAGES, DIR_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_image, addslashes($products_name), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
    // remove additional single quotes from image attributes (important!)
    $thumb_slashes = preg_replace("/([^\\\\])'/", '$1\\\'', $thumb_slashes);
    $thumb_regular = zen_image($base_image, $products_name, SMALL_IMAGE_WIDTH, SMALL_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 jqzoom + jqlightbox
    if(JQZOOM_STATUS == 'true' || JQLIGHTBOX_STATUS == 'true'){
        $css_class = '';
        if(JQZOOM_STATUS == 'true')
            $css_class = 'jqzoomAdditional';
        if(JQLIGHTBOX_STATUS == 'true')
            $css_class .= ' jqlightbox';
        $css_class = trim($css_class);
    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . '<a href="'. zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_MAX_WIDTH, LARGE_IMAGE_MAX_HEIGHT) . '" class="'.$css_class.'">' . $thumb_slashes . '</a>\')'. "\n" . '//--></script>';
    }
    else 
    $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>';
    // eof jqzoom + jqlightbox
    
    $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:' . $col_width . '%;"',
    'text' => "\n      " . $link);
    $col ++;
    if ($col > (IMAGES_AUTO_ADDED -1)) {
      $col = 0;
      $row ++;
    }
  } // end for loop
} // endif

main_product_image

<?php
/**
 * main_product_image module
 *
 * @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: main_product_image.php 4663 2006-10-02 04:08:32Z drbyte $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = ereg_replace($products_image_extension . '$', '', $products_image);
$products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
$products_image_large  = DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE .  $products_image_extension;

  /*
    echo
    'Base ' . $products_image_base . ' - ' . $products_image_extension . '<br>' .
    'Medium ' . $products_image_medium . '<br><br>' .
    'Large ' . $products_image_large . '<br><br>';
  */
// to be built into a single variable string

:bigups:

10 Apr 2009, 2:46 AM
#77
itguru avatar

itguru

New Zenner

Join Date:
Aug 2006
Posts:
32
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

gsdcypher:

you can see jquery lightbox in action here:
http://tiny.cc/VMMxN

thanks.

what did you use for image rotator? looks very nice.

10 Apr 2009, 3:14 PM
#78
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

thank you, but since this is OT for this thread i'll be brief - slide show.

13 Apr 2009, 5:44 PM
#79
bgallot avatar

bgallot

New Zenner

Join Date:
Mar 2005
Location:
Uzerche, France
Posts:
9
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

Hi All
I spent my Easter sunday to correct a bug in my test site !
It concern either the fisrt or last jqlightbox :

  • Click on the left side of the 1st image has to close the lightbox
  • Click on the right side of the last image too.

And it works on your sites, not on mine ! In mine, you click and go to the site index... Really good to loose a customer

The great difference : my element.style has not the display:none
<a id="lightbox-nav-btnPrev" href="#" style="background: transparent url(images/lightbox-blank.gif) no-repeat scroll 0% 0%; height: 295px;
and

<div id="lightbox-nav" style=""> has no style. Normally display: block; V138a, <http://www.meublus.com/eshop/index.php?main_page=product_info&cPath=74&products_id=206> Hope to be clear and wait for response !
13 Apr 2009, 9:35 PM
#80
stylepile avatar

stylepile

New Zenner

Join Date:
Feb 2009
Posts:
3
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

Love this module. Works Perfectly!

In my current out-of-the-box configuration the lightbox function is only called on the image on the individual product page.
Is there a way to add a lightbox link to the thumbnail images that show in the product listing pages as well? I am running ZC v1.3.8