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

Jquery Lightbox [Support thread]

Views: 82,872

Results 81 to 100 of 258
15 Apr 2009, 6:13 PM
#81
bgallot avatar

bgallot

New Zenner

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

Jquery Lightbox [Support thread]

I have an answer to my previous message !
The bug is due to the lightbox js when fixedNavigation is true.
An OK when fixedNavigation is false (you close correctly the image and stay on the product page).
I'm not abble to correct. If someone !
Script original (jquery.lightbox-0.5.js) is from line 261 for 1st image :
// Show the prev button, if not the first image in set
if ( settings.activeImage != 0 ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons (in fact prev button AND fixedNavigation:false)
$('#lightbox-nav-btnPrev').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
}
Between I encouraged to fix the Fixed Navigation to FALSE

15 Apr 2009, 10:53 PM
#82
guitarslinger avatar

guitarslinger

New Zenner

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

Re: Jquery Lightbox [Support thread]

Would just like to add that this Modification to the contribution has been VERY VERY good for me. The out of the box config seemed to break the water marks - now it is pulling them through nicely.

Works pretty well!

Here's an example.

http://www.richtonemusic.co.uk/guitars-1/electric-guitars-2/gretsch-g6128tcg-duo-jet-cadillac-green-435.html

gsdcypher:

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:
16 Apr 2009, 8:03 PM
#83
gsdcypher avatar

gsdcypher

Totally Zenned

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

Re: Jquery Lightbox [Support thread]

excellent! thanks for letting me know it worked. nice site...
:cheers:

20 Apr 2009, 3:10 AM
#84
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

ok, so i must be having an idiot kinda day... lol too much time in the sun playing disc golf this morning, musta fried a few brain cells!!

anyways, i have been going round and round on trying to find the image enhancer/viewer that was "right" for my site... and i really like yours! i must be doing something stupidly wrong though because i have it installed... uploaded the files.. YES, changed the template_default folder to match my own... it shows in my zen cart admin, i can change settings etc... but doesnt actually show on my site? images continue to open in a new window.

it should look something like what is on this page right? which is the original version of the product that you packaged for zencart, if i am understanding correctly?
http://leandrovieira.com/projects/jquery/lightbox/

any suggestions would be much appreciated!

link to product page example:
http://customk9design.com/catalogzen/index.php?main_page=product_info&cPath=1_10&products_id=2

20 Apr 2009, 6:45 AM
#85
bgallot avatar

bgallot

New Zenner

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

Re: Jquery Lightbox [Support thread]

customk1:

ok, so i must be having an idiot kinda day... lol too much time in the sun playing disc golf this morning, musta fried a few brain cells!!

anyways, i have been going round and round on trying to find the image enhancer/viewer that was "right" for my site... and i really like yours! i must be doing something stupidly wrong though because i have it installed... uploaded the files.. YES, changed the template_default folder to match my own... it shows in my zen cart admin, i can change settings etc... but doesnt actually show on my site? images continue to open in a new window.

it should look something like what is on this page right? which is the original version of the product that you packaged for zencart, if i am understanding correctly?
http://leandrovieira.com/projects/jquery/lightbox/

any suggestions would be much appreciated!

link to product page example:
http://customk9design.com/catalogzen/index.php?main_page=product_info&cPath=1_10&products_id=2

Hi customk1
The specific javascripts (jquery-1.2.6.min.js, jquery.lightbox-0.5.min.js, jquery.ondemand.js) are not present in your <head></head>.
Verify in your dir includes/template/darkness/jscript if you have all the jscripts include in the Yellow1912 addon...
May help

20 Apr 2009, 3:16 PM
#86
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

bg, thanks for your post... i do see those jscripts, but they are in a subfolder "jquery" of the "templates/darkness/jscripts" folder...

i will try moving them up a folder?

also, the names do not seem to be formatted correctly to zencart, where it is required that they be jscript_ondemand.js, instead they have "." or "-"...

i will try renaming them 1st, then try moving them...

any information/advice you can send my way would be appreciated!!!

thanks.

20 Apr 2009, 3:23 PM
#87
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

ok, i tried adding jscript_ to the files, for example:
jscript_jquery.ondemand.js

and also tried copying them out of the jscript subfolder, and into templates/darkness/jscript directly.. but still no luck...

any follow up would be appreciated! thanks.

20 Apr 2009, 3:24 PM
#88
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Jquery Lightbox [Support thread]

customk1:

bg, thanks for your post... i do see those jscripts, but they are in a subfolder "jquery" of the "templates/darkness/jscripts" folder...

i will try moving them up a folder?

also, the names do not seem to be formatted correctly to zencart, where it is required that they be jscript_ondemand.js, instead they have "." or "-"...

i will try renaming them 1st, then try moving them...

any information/advice you can send my way would be appreciated!!!

thanks.Noooooooo

They are where they should be, with the names they should have. This module does not use the regular zencart jscript loader, it is much more smarter than that, it loads only when needed, not sitewide.
Do not move the files, do not rename them.

You must have missed some other files, such as some files in the auto_loaders folder etc...

20 Apr 2009, 4:52 PM
#89
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

hahahaha.. ok, so i feel like a kid that just got caught with the hand in the cookie jar! i promise yellow, i put everything back just the way i found it!! :)

i went back and re-uploaded all the files thru filezilla.. i did them folder by folder this time, not sure what was missed last time, but it is working now! thanks for a great mod.. it is much appreciated!! :)

im sure i'll have some more questions down the road, but thanks again for savin the day!

:clap:

20 Apr 2009, 5:04 PM
#90
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

quick question... how can i change the color of the border from white to black? i see several references in the CSS to #666 and #fff but these are blue colors that i dont see in use anywhere?

i would like to change the border to black, and the text (image 1 of 4) to white.... i can edit the buttons myself in photoshop, just make those white on black also.

thanks!

20 Apr 2009, 5:09 PM
#91
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Jquery Lightbox [Support thread]

customk1:

quick question... how can i change the color of the border from white to black? i see several references in the CSS to #666 and #fff but these are blue colors that i dont see in use anywhere?

i would like to change the border to black, and the text (image 1 of 4) to white.... i can edit the buttons myself in photoshop, just make those white on black also.

thanks!
Check #lightbox-container-image-box

And #lightbox-container-image-data-box

20 Apr 2009, 5:20 PM
#92
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

yellow, thanks a bunch! i dont know why they were showing fff and 666, which i thought were blue colors... but when i changed them to #000000, it is perfect! thanks a bunch.

you have a great product here, and great support, thanks for all you do!

28 Apr 2009, 3:48 PM
#93
momof2 avatar

momof2

New Zenner

Join Date:
Oct 2008
Posts:
25
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

I have successfully installed IH2 and would now like to install Jquery LightBox. Will this also help with an issue I am facing? Right now I have an image, that is cut off in the popup window. See here http://paperazzidesigns.com/index.php?main_page=product_info&cPath=4_38&products_id=453
Click the additional image below the description. I am hoping the pop up will resize to the correct image size. This particular image has a height of 2416, but there is no way around it. If this mod will address this, then I can just install that. I was unable to find a fix that would add a scroll to the pop up window. Thanks in advance.

28 Apr 2009, 6:11 PM
#94
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Jquery Lightbox [Support thread]

momof2:

I have successfully installed IH2 and would now like to install Jquery LightBox. Will this also help with an issue I am facing? Right now I have an image, that is cut off in the popup window. See here http://paperazzidesigns.com/index.php?main_page=product_info&cPath=4_38&products_id=453
Click the additional image below the description. I am hoping the pop up will resize to the correct image size. This particular image has a height of 2416, but there is no way around it. If this mod will address this, then I can just install that. I was unable to find a fix that would add a scroll to the pop up window. Thanks in advance.
The module will resize your image and/or allow scrolling. But if you want to, you can also edit the current popup window code to allow scrolling if you are familiar with javascript, it's not a big job.

28 Apr 2009, 7:23 PM
#95
momof2 avatar

momof2

New Zenner

Join Date:
Oct 2008
Posts:
25
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

yellow1912:

The module will resize your image and/or allow scrolling. But if you want to, you can also edit the current popup window code to allow scrolling if you are familiar with javascript, it's not a big job.

Well I was planning on using this one as well...Could you point me where to find the code for the javascript?

1 May 2009, 8:52 AM
#96
jerry5763837 avatar

jerry5763837

Zen Follower

Join Date:
May 2008
Posts:
261
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

hi, gsdcypher,

Appreciated for your perfect work.

After pasted your code, it really has watermarks for addtional pictures.
but one more problem occured. that is that all the addtional pictures werw enlarged by IH2, not Lightbox

any further comments? thanks in advance.

1 May 2009, 10:47 AM
#97
jerry5763837 avatar

jerry5763837

Zen Follower

Join Date:
May 2008
Posts:
261
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

yellow1912:

The module will resize your image and/or allow scrolling. But if you want to, you can also edit the current popup window code to allow scrolling if you are familiar with javascript, it's not a big job.

hi, Yellow,

could you please check for us to see why can not see previous/next button in zen_lightbox? but when hover on it, it can shows the ALT attribute.

we are using zenlightbox 1.50, many thanks for your suggestion.

18 May 2009, 10:57 AM
#98
littlehawk avatar

littlehawk

New Zenner

Join Date:
Jan 2009
Posts:
85
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

Cannot insert configuration_key "" because it already exists
i tried to run the sql, but it showed this and i can't see it in admin, configuration as well.
Can anyone help? Thank you

25 May 2009, 4:26 AM
#99
emrico1 avatar

emrico1

New Zenner

Join Date:
Mar 2009
Posts:
55
Plugin Contributions:
0

Re: Jquery Lightbox [Support thread]

Love this mod, amazing work!

I do have a little issue that is troubling me.

I'm too silly to figure out how to change the positioning of the window that opens relative to the top of the page!
I have edited the .css but I can not seem to figure out where the setting is... :blush:

Any help is appreciated as always.

25 May 2009, 10:08 AM
#100
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Jquery Lightbox [Support thread]

Emrico1:

Love this mod, amazing work!

I do have a little issue that is troubling me.

I'm too silly to figure out how to change the positioning of the window that opens relative to the top of the page!
I have edited the .css but I can not seem to figure out where the setting is... :blush:

Any help is appreciated as always.
not sure what you are talking about, but you may want to change "top" of element #jquery-lightbox and make sure you use !important