Page 7 of 373 FirstFirst ... 567891757107 ... LastLast
Results 61 to 70 of 3721
  1. #61
    Join Date
    Sep 2006
    Location
    Gillette, NJ, USA
    Posts
    35
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    OK, I've looked into it further and it happens even with the main image sometimes. Code where no image displays at all:
    Code:
    <script language="javascript" type="text/javascript"><!--
    document.write('<a href="images/oldimages/DeploymentBracelet.jpg" rel="lightbox[gallery]" title="Soldier's Deployment Bracelet"><img src="bmz_cache/6/605d2413255761b23cdf2bdbe3dfe68f.image.150x75.jpg" alt="Soldier\'s Deployment Bracelet" title=" Soldier\'s Deployment Bracelet " width="150" height="75" /><br /><span class="imgLink">larger image</span></a>');
    //--></script>
    Code where image displays:
    Code:
    <script language="javascript" type="text/javascript"><!--
    document.write('<a href="images/oldimages/SG-T45a.jpg" rel="lightbox[gallery]" title="18th Airborne  Corps Distressed"><img src="bmz_cache/3/3810be10660b1f4fc121fa1424eb0987.image.97x120.jpg" alt="18th Airborne Corps Distressed" title=" 18th Airborne Corps Distressed " width="97" height="120" /><br /><span class="imgLink">larger image</span></a>');
    //--></script>
    I'm guessing the first code's problem could be the
    Code:
    title="Soldier's Deployment Bracelet"
    - the apostrophe could throw off the document.write, correct?

  2. #62
    Join Date
    Sep 2006
    Location
    Gillette, NJ, USA
    Posts
    35
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    I escaped it:
    Code:
    ... rel="lightbox[gallery]" title="Soldier\'s Deployment Bracelet" ...
    and the image showed up. So apparently the title tag, which is the product name, needs to be escaped for apostrophes.

  3. #63
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Zen Lightbox...

    Ok, I'm a bit lost now.

    Got a link to your site so I can have a peek??

  4. #64
    Join Date
    Sep 2006
    Location
    Gillette, NJ, USA
    Posts
    35
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    I can't post the link here, Alex, but I PM'd you instructions.

    I'll try to explain better:

    There are two different problems here and I've fixed them both:

    1. If there is an apostrophe in the Product Name (i.e. Peter's Shirt), the code that zen_lightbox puts inside document.write() breaks it. The string to be written starts with a - (' - and continues until it sees the next - ' - which should be at the end. However, if the product name has an apostrophe, it views that as the end of the string - I think.

    this is fixed by changing line 16 of tpl_modules_main_product_image.php
    from
    Code:
    document.write('<?php echo '<a href="' . $products_image_large . '" rel="lightbox[gallery]" title="' .  $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>'; ?>');
    to
    Code:
    document.write('<?php echo '<a href="' . $products_image_large . '" 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>'; ?>');
    Just add "addslashes()" to the first instance of $products_name in the title tag.

    2. It did not work on additional images at all, for reasons similar to the above problem. I have installed Image Handler 2, which puts a function in the onmouseover event - the code for which is hard written into the Image link. This causes a medium image to hover when you mouse over the small image.

    The HTML output is below:
    Code:
          <script language="javascript" type="text/javascript"><!--
    document.write('<a href="images/oldimages/OldArmy-Wine_03.jpg" rel="lightbox[gallery]" title="Old Army Tee Shirt-Wine"><img src="bmz_cache/8/8b90f65bad6260af9512af05aecf2ffc.image.64x80.jpg" alt="Old Army Tee Shirt-Wine" title=" Old Army Tee Shirt-Wine " width="64" height="80" style="position:relative" onmouseover="showtrail('bmz_cache/5/574e7d0af96a8d0fa73f529d8b58a04a.image.96x120.jpg','Old Army Tee Shirt-Wine',64,80,96,120,this,0,0,64,80);" onmouseout="hidetrail();"  /><br />larger image</a>');
    //--></script>
    Putting addslashes() in additional_images.php solves the problem here too - line 93 should now be:
    Code:
        $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="' . $products_image_large . '" rel="lightbox[gallery]" title="' . $products_name . '">' . addslashes($thumb_slashes) . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
    So, I don't have a problem anymore, you should probably just add these two fixes to your next release. Reply back with any questions - I'll keep monitoring the thread.

  5. #65
    Join Date
    Jan 2005
    Posts
    43
    Plugin Contributions
    0

    Idea or Suggestion Re: Zen Lightbox...

    Hello Alex,

    Did you ever have time to look at the site at http://www.airsofttoday.com/v135? Sure would like to get it working properly with your contribution. Hopefully it isn't something too weird! Thanks

  6. #66
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Zen Lightbox...

    Boylan - That makes perfect sense. Thanks for explaining it. I'll add the fixes to the next release and credit you for it!

    Goldwingers - I did look at your site and Boylan (who has posted above in this thread) has found a solutions to the problem!

    I'll apply these fixes now and release 1.3 asap (probably by the end of the week - with or without full IH2 support).

  7. #67
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Re: Zen Lightbox...

    Did you get it to work with image handler?

  8. #68
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Zen Lightbox...

    Quote Originally Posted by bigjoed
    Did you get it to work with image handler?
    Not yet.

    I've been tied up with work and other stuff at the moment.

    When I've got IH2 support sorted I'll post here. :)

  9. #69
    Join Date
    Mar 2005
    Location
    Bogotá, Colombia
    Posts
    32
    Plugin Contributions
    2

    Re: Zen Lightbox...

    It looks very nice, i want to know as soon as you can have it to work with IH2.
    Thanks a lot.
    again this looks VERY NICE!!!
    I love it.
    Visit www.colombianhandcrafts.org, we are in the fair trade move!

  10. #70
    Join Date
    Sep 2006
    Posts
    1
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    very cool mod!

    but is it possible to make it compatible with zencart 1.26 or 1.27?

    thanks,
    rogart

 

 
Page 7 of 373 FirstFirst ... 567891757107 ... LastLast

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR