-
Re: Zen Lightbox addon [Support Thread]
Yup I purposely removed the code so they cant get into the individual product pages, there was no need for them in my situation and it only made the buy experience longer. I could have also just listed them all as attributes but I chose this way over that for some important reasons I cant quite remember right now :P
I think for lightbox to work on those pictures I need to include the source on that code I pasted. Thats the only thing I cant figure out.
Daniel
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DannyVarley
Yup I purposely removed the code so they cant get into the individual product pages, there was no need for them in my situation and it only made the buy experience longer. I could have also just listed them all as attributes but I chose this way over that for some important reasons I cant quite remember right now :P
I think for lightbox to work on those pictures I need to include the source on that code I pasted. Thats the only thing I cant figure out.
Daniel
So, I thought that there was a single file that when copied into the applicable modules/pages/XXXX folder (and seems in your case product listing if that exists) that would activate the lightbox functionality on that page. No code modification necessary. At least that was my understanding from a few pages back and recollection of the readme for this plug-in.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
**nods in agreement** :yes:
Thank you very much both for the help and suggestions.
OK, I went back to the backup where I only had IH4 installed. I currently have neither Slimbox, nor Lightbox installed. Before I try to install Lightbox again I have to fix another issue I found - in the Internet Explore clicking on an image does trigger the default popup window BUT the window would not open up and would not show the image. This issue is not present in Firefox.
Do I need to go to the backup where I had no IH4 installed and re-install IH4? I really do not want to do that. Installing IH4 again is a task I would like to avoid, if possible.
Thank you.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
EHSI
Thank you very much both for the help and suggestions.
OK, I went back to the backup where I only had IH4 installed. I currently have neither Slimbox, nor Lightbox installed. Before I try to install Lightbox again I have to fix another issue I found - in the Internet Explore clicking on an image does trigger the default popup window BUT the window would not open up and would not show the image. This issue is not present in Firefox.
Do I need to go to the backup where I had no IH4 installed and re-install IH4? I really do not want to do that. Installing IH4 again is a task I would like to avoid, if possible.
Thank you.
So, somewhat of a cross post issue; however, if not mistaken this is being discussed/addressed in IH(4 at least) there have been some findings. Supposedly and if I understand correctly, if you install zen lightbox and activate it, the problem may go away? Again, be sure you clear your cache and other cleanup or try another computer that has IE on it. May have some "history" in place preventing the full operation.
-
Re: Zen Lightbox addon [Support Thread]
The IH4 issue being discussed has to do with the additional images popup.. The issue does not appear to be an issue when Zen Lightbox is installed.. (probably because of the modifications Zen Lightbox makes to the additional_images.php)
That said although EHSI is having issues in particular browsers they are likely local issues for him otherwise the issue would be more widely reported and repeatable... of course since he has not posted a lnk to his site without seeing the actual site this is a guessing game.. I won't lob guesses at an issue I cannot see.. especially since none of us responding can repeat the issue..
Quote:
Originally Posted by
mc12345678
So, somewhat of a cross post issue; however, if not mistaken this is being discussed/addressed in IH(4 at least) there have been some findings. Supposedly and if I understand correctly, if you install zen lightbox and activate it, the problem may go away? Again, be sure you clear your cache and other cleanup or try another computer that has IE on it. May have some "history" in place preventing the full operation.
-
Re: Zen Lightbox addon [Support Thread]
Thank you for your suggestions.
Not to chaise my own tail for many hours to come, I installed zen cart and IH4 again afresh. The installation went as expected, and I do not see at the moment any problems. Currently, I do not have Lightbox installed but I will install it tomorrow after I see that the IH4 operates in all browsers as expected.
The only issue I currently have, which I have not experienced in my first installation of IH4, is that IH4 does not re-size the image when I am inserting it for a new product. Since I am inserting the largest image I have (about 180K) as my smallest/default image, IH4 inserts small, medium, and large images making them of the same size - 180K. This issue would not be a problem because I do not want to activate hover function, but this issue lets me know that something is wrong and has to be fixed before I go ahead and install Lightbox.
Could you please let me know what I am missing this time.
Thank you.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
EHSI
Thank you for your suggestions.
Not to chaise my own tail for many hours to come, I installed zen cart and IH4 again afresh. The installation went as expected, and I do not see at the moment any problems. Currently, I do not have Lightbox installed but I will install it tomorrow after I see that the IH4 operates in all browsers as expected.
The only issue I currently have, which I have not experienced in my first installation of IH4, is that IH4 does not re-size the image when I am inserting it for a new product. Since I am inserting the largest image I have (about 180K) as my smallest/default image, IH4 inserts small, medium, and large images making them of the same size - 180K. This issue would not be a problem because I do not want to activate hover function, but this issue lets me know that something is wrong and has to be fixed before I go ahead and install Lightbox.
Could you please let me know what I am missing this time.
Thank you.
Please carry this over to the correct thread http://www.zen-cart.com/showthread.p...read&p=1215719. This is not a Zen Lightbox discussion.
-
Re: Zen Lightbox addon [Support Thread]
Daniel, I think this is the link you had us look at before: http://kitchenwarehouseltd.com/compl...gh-gloss/cream
If I understand right you want those lower images to come up in the lightbox also?
If right and they are in the actual description of the main product then you will most likely need to include the call for it when you insert the link for the image -- I think the naming of the images would probably not be an issue since they are not additional images but just added to description..
Have you tried this info from the readme:
===============================================
EZ-Pages
By default the lightbox effect will be applied to all links that point to images on your EZ-Pages. This functionality can easily be modified via the admin.
The gallery mode will automatically be used when more than one link to an image (on an EZ-Page) are located within the same parent element.
The only manual bit of coding required is the addition of captions (if you need them). You can add captions by including the rel="" attribute in your href tag. An example of this can be found below.
<a href="myimage.jpg" rel="here is my caption">My Image</a>
Any page
The above EZ-Pages functionality can be added to any page of your website.
To enable this, simple copy the jscript_zen_lightbox.php file (found at the root of the distribution) to the relevant modules/pages folder.
For example, if you wanted to apply this functionality to the contact_us page you would copy the above file to: includes/modules/pages/contact_us
===============================================
Quote:
Originally Posted by
DannyVarley
Yup I purposely removed the code so they cant get into the individual product pages, there was no need for them in my situation and it only made the buy experience longer. I could have also just listed them all as attributes but I chose this way over that for some important reasons I cant quite remember right now :P
I think for lightbox to work on those pictures I need to include the source on that code I pasted. Thats the only thing I cant figure out.
Daniel
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
niestudio
finally got around to a workaround for this issue.
Not sure if it should be part of the ZCB or ZLB install by default, but maybe in the FAQ of this and of the tabbed plugin.
try adding this line to [includes/classes/zen_lightbox/autoload_default.php]
I added it as the first line inside of the document ready function
Code:
$('#productMainImageReview, #productAdditionalImages_tab').find("a").removeAttr("rel");
this should re-write the image links inside the tabbed sections to remove the rel="colorbox" attribute so that the images do not get linked/loaded into colorbox or lightbox (same code will work for either)
d
and here is the corrected class code.. Tested this and it works perfectly..
Code:
<?php
/**
* Zen Lightbox
*
* @author Alex Clarke ([email protected])
* @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: autoload_default.php 2008-12-09 aclarke $
*/
?>
jQuery(function($) {
$("a[rel^='lightbox']").slimbox({<?php require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'zen_lightbox/options.php'); ?>}, function(el)
{
return [el.href, el.title /* + '<br /><a href="' + el.href + '">Download this image</a>'*/];
}, function(el) {
$("#productMainImageReview a").removeAttr("rel");
return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
});
<?php if (ZEN_LIGHTBOX_CLOSE_IMAGE == 'true' || ZEN_LIGHTBOX_PREV_NEXT == 'true') { echo ("$('#lbPrevLink').addClass('prevNoHover'); $('#lbNextLink').addClass('nextNoHover');");}?>
});
//--></script>
What this change does:
IF you are using TPP and have the reviews tab turned on, this will prevent the reviews page default image from treated like an additional product image and being grouped in with the rest of your product images in the lightbox.
The issue is MUCH MORE obvious when you have a main product image and no additional images.. Because the reviews page image is being treated as an additional image, the net effect is that the lightbox will show 1 of 2 images. (the "second" image being the product reviews page image)
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
So I am back with more issue regarding product images and product reviews.. I think the issue I reported previously regarding the images and reviews may not be related to TPP at all.. I think the issues with having reviews on the tabs in TPP is caused because of an overall issue with how Colorbox (and Zen Lightbox) display/deal with reviews and product images together in general.
I reported this new find in the Zen Lightbox thread, but I'm reporting here too since I am seeing the SAME issue with both Colorbox and Zen Lightbox.
Not sure why, but the Lightbox and Colorbox add-ons are generating some weird/invalid HTML on the product reviews pages. You will see the model number appear in what appears to be some weird link to the left of the product image. Using Zen Lightbox, you can see what I am speaking of on this page:
http://clientlaserdiscvault(dot)overthehillweb
(dot)com/index.php?main_page=product_reviews&products_id=8909
I found the EXACT same issue with the beta version of the Colorbox add-on as well. You can see the same issue using the Colorbox add-on on this page:
http://clienthairisle(dot)overthehillweb
(dot)com/Hair-Extensions/Economy-Collection/Economy-Unprocessed/Indian-Remy-Micro-Thin-Machine-Weft-Virgin-Curly-Texture-3-Oz/reviews?number_of_uploads=0&
This weird link goes away when I turn off Lightbox or Colorbox.
Without Lightbox turned on this is the HTML created:
Code:
<div id="productReviewsDefaultProductImage" class="centeredContent back">
<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript">
<!-- document.write('<a href="javascript:popupWindow(\'http://myclient.com/index.php?main_page=popup_image&pID=8909\')"><img src="images/dasPic_24141.jpg" alt="National Geographic - Secrets of the Titanic [G52000]" title=" National Geographic - Secrets of the Titanic [G52000] " width="349" height="350" />
<br /><span class="imgLink">larger image</span></a>'); //-->
</script>
<noscript>
<a href="http://myclient.com/index.php?main_page=popup_image&pID=8909" target="_blank"><img src="images/dasPic_24141.jpg" alt="National Geographic - Secrets of the Titanic [G52000]" title=" National Geographic - Secrets of the Titanic [G52000] " width="349" height="350" /><br /><span class="imgLink">larger image</span></a>
</noscript>
</div></div>
With Lightbox turned off this is the HTML created (note the mis-behaving HTML created is in red):
Code:
<div id="productReviewsDefaultProductImage" class="centeredContent back">
<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript">
<!-- document.write('<a href="images/dasPic_24141.jpg" rel="lightbox-g" title="National Geographic - Secrets of the Titanic<br /><span class=\"smallText\">[G52000]</span>"><img src="images/dasPic_24141.jpg" alt="National Geographic - Secrets of the Titanic [G52000]" title=" National Geographic - Secrets of the Titanic [G52000] " width="349" height="350" /><br /><span class="imgLink">larger image</span></a>'); //-->
</script>
<a href="images/dasPic_24141.jpg" rel="lightbox-g" title="National Geographic - Secrets of the Titanic<br /><span class=" smalltext"="">[G52000]"><img src="images/dasPic_24141.jpg" alt="National Geographic - Secrets of the Titanic [G52000]" title=" National Geographic - Secrets of the Titanic [G52000] " height="350" width="349"><br><span class="imgLink">larger image</span></a>
<noscript>
<a href="http://myclient.com/index.php?main_page=popup_image&pID=8909" target="_blank"><img src="images/dasPic_24141.jpg" alt="National Geographic - Secrets of the Titanic [G52000]" title=" National Geographic - Secrets of the Titanic [G52000] " width="349" height="350" /><br /><span class="imgLink">larger image</span></a>
</noscript>
</div></div>
Using either Colorbox or Zen Lightbox, the issue goes away when I turn off these add-ons. It seems clear that there is something with how both of these add-ons deal with product images and reviews that goes awry.
Any thoughts??
Found a better solution to this issue than what I posted previously..
Issue:
If you have both Tabbed Products Pro, and Zen Lightbox installed AND your products have model numbers defined, the problem outlined above will manifest itself.
To fix this in the includes/modules/pages/product_reviews/header_php.php file replace this:
Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
with this:
Code:
if (TPP_GLOBAL_ENABLE_TABS == '1') {
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'];
}
} else {
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
}
What this change does:
If you have Tabbed Products Pro and Zen Lightbox installed, the model number field will NOT display on the product reviews page.
I realize this is pretty much a bandaid solution, but coming up with a solution that allows the product model field to display when both TPP and Zen Lightbox are installed and active is over my paygrade to execute. I don't know if the issue is in the TPP code, or the ZenLight box code or if a change needs to be made in both. Again, someone smarter than me will need to figure this out. So I am sharing a down and dirty solution that works.
-
Re: Zen Lightbox addon [Support Thread]
Diva, I was so excited to see this because I have such a thing happening when writing reviews and then being redirected to that page when done---I am trying to get a confirmation placed within the body and not the header.
I do not have TPP installed at all.
sadness---it did not work for me:(
so I added a bandage to your bandage...LOL I removed
<span class="smallText">[' . $review->fields['products_model'] . ']</span>
Attachment 12967
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DarkAngel
Diva, I was so excited to see this because I have such a thing happening when writing reviews and then being redirected to that page when done---I am trying to get a confirmation placed within the body and not the header.
I do not have TPP installed at all.
sadness---it did not work for me:(
so I added a bandage to your bandage...LOL I removed
<span class="smallText">[' . $review->fields['products_model'] . ']</span>
Attachment 12967
Do I understand this correctly then, you don't have TPP installed, but you do have what, Zen Lightbox installed? And with Zen Lightbox active or inactive are you getting the extra model info as a result of $reviews->fields['products_model'] having data in it? Is the show products_model option off in the associated template's product type description? I can't say that I've used the review option, so not sure what settings are offered by default for control of what is passed on.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DarkAngel
Diva, I was so excited to see this because I have such a thing happening when writing reviews and then being redirected to that page when done---I am trying to get a confirmation placed within the body and not the header.
I do not have TPP installed at all.
sadness---it did not work for me:(
so I added a bandage to your bandage...LOL I removed
<span class="smallText">[' . $review->fields['products_model'] . ']</span>
Attachment 12967
I'm not sure I understand what you are saying here.. I dunno what you mean by "being redirected to that page when done---I am trying to get a confirmation placed within the body and not the header."
The code I have will not remove the product model number unless you have TPP installed. IF you are saying that the issue with the model number exists EVEN when you DO NOT have TPP installed, then the code I posted won't work, and your "bandage" is not the right fix. (You'll need to look at the code I posted to see why.. hint: the code I posted says If TPP is installed do this, else do this)
In any case please confirm that the model number display issue IS an issue if you have Zen Lightbox installed and DO NOT have TPP installed..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
mc12345678
Do I understand this correctly then, you don't have TPP installed, but you do have what, Zen Lightbox installed? And with Zen Lightbox active or inactive are you getting the extra model info as a result of $reviews->fields['products_model'] having data in it? Is the show products_model option off in the associated template's product type description? I can't say that I've used the review option, so not sure what settings are offered by default for control of what is passed on.
Here's the deal.. Reviews are a built in Zen Cart feature.. You "turn on" the reviews features by either activating the reviews sidebox or by showing the reviews buttons on the product information page by turning them on in the admin (Catalog > Product Types > [Product Type])
The Show Model Number option On/Off from the Catalog > Product Types > [Product Type] applies to whether or not the the model number will be displayed in the product details section of the product info page.
Code:
<!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
<br class="clearBoth" />
<?php
}
?>
<!--eof Product details list -->
The issue I was reporting was that on the products review pages the model number was not displaying correctly.. It's not extra information and there is no option to turn the model number off/on on the product reviews pages. The reviews pages will display the model number based on whether or not the model number field is NOT null.. I always thought that the issue with the model number display was cause by a combination of TPP and Zen Lightbox being installed.. Based on Dark Angel's post, it sounds like this issue occurs even when TPP is not installed.. (I need her to confirm this)
-
Re: Zen Lightbox addon [Support Thread]
No TPP installed
Lightbox is installed
model is set to show in product page
I did chck your code Diva and saw the difference --- it was like what mine has so i just remved the bit about the model and then tried to write a review again.... code to right of image was gone
when I click write a review button, write a review, submit I then I click submit button and it takes me to index.php?main_page=product_reviews&products_id=followed by the number that is where it showed the code in the image I put into my post. That is why i said I was trying to get a confirmation of the review being successfully submitted. The code I got for it was a header code and I need the Thanks to show up in the body not header.
I thought it was due to installing the plugin called dgreviews but then I saw Diva's post and thought it must be something to do with lightbox.
I have just recently started using the reviews again but have LB installed in other shops I have set up also without TPP and tested it there and yes the code showed up there too.
I forgot to say that when I removd the code I checked the product pages and the model was still visible there just not when writing the review and submitting it. Also on the reviews page it appears right below the title just like to the right of the image I posted. It only removed the bit that was to the left.
-
Re: Zen Lightbox addon [Support Thread]
also noticed that the code--in part--is in 2 places so I just edited the part you posted about.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Based on Dark Angel's post, it sounds like this issue occurs even when TPP is not installed.. (I need her to confirm this)
It is not TPP but in fact Zen Lightbox and the issue has been their since I can remember :smile:
-
Re: Zen Lightbox addon [Support Thread]
Well, I certainly feel at a loss at the moment, not being in front of a device that would allow me to look up code. So, sounds like the Zen Lightbox installation adds the ability to show additional information based on the model number of the reviewed product being filled in; however, doesn't offer any additional flag(s) to prevent display of that additional information. (Thought the additional info was model number data, but I think I was corrected on that above by Diva Vocals). Other than allowing ZLB to work on the reviews page, I am not sure why there would be a need for everyone to have code that would show this "errant" data. It may have been something that just got slipped in when packaging the update.
As I said I'm not in front of a device that works with code, but was wondering how that header compared to the default header. It may be that the header just needs to have that logic check undone and restored to the default version.
It may also be that an option should be added to the ZLB configuration area to allow showing the model info when it is present for the product. I say that because if the option isn't in the default files, and only appears in ZLB, then it should be controlled by ZLB, otherwise a similar option could be added to the template style, but then that would have to be carried over with ZC upgrades.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DarkAngel
No TPP installed
Lightbox is installed
model is set to show in product page
I did chck your code Diva and saw the difference --- it was like what mine has so i just remved the bit about the model and then tried to write a review again.... code to right of image was gone
If you used the code snippet I posted to fix the errant model number display, and made the change you made, this is not the RIGHT way to do it.. That's why I asked.. You could have simply NOT used my recent code and commented out lines 43-44 in the original header_php.php file.. (which is the fix I posted originally)
However, that said, mc12345678 got me to thinking that I need to look closer at all the page header module files for the reviews.. I noticed that the issue appears on the "reviews" page (index.php?main_page=product_review), but not the write reviews page (index.php?main_page=product_reviews_write).. This gave me a clue that the key to the RIGHT answer is in the "write reviews" page header_php.php file regardless as to whether or not you have TPP or Zen Lightbox or Zen Colorbox installed..
In other words, the issue is not really a Zen Lightbox , Zen Colorbox or TPP issue, but an issue in the default Zen Cart files that is "aggravated" by Zen Lightbox, and Zen Colorbox (and possibly Fual Slimbox, though I have not tested that module specifically)
So undo the change I posted earlier and your hack to it and standby.. I am testing something that should work. But I need to test it on a store that is ONLY running Zen Colorbox without TPP.. and I also need to make sure that when Zen Colorbox is turned off or not installed that the code doesn't break anything because if this is right, I am going to suggest it as core code change to the Zen Cart admins..
Quote:
Originally Posted by
DarkAngel
when I click write a review button, write a review, submit I then I click submit button and it takes me to index.php?main_page=product_reviews&products_id=followed by the number that is where it showed the code in the image I put into my post. That is why i said I was trying to get a confirmation of the review being successfully submitted. The code I got for it was a header code and I need the Thanks to show up in the body not header.
I thought it was due to installing the plugin called dgreviews but then I saw Diva's post and thought it must be something to do with lightbox.
I have just recently started using the reviews again but have LB installed in other shops I have set up also without TPP and tested it there and yes the code showed up there too.
I forgot to say that when I removd the code I checked the product pages and the model was still visible there just not when writing the review and submitting it.
Nothing to do with this or the Zen Colorbox module, and not even close to being part of the issue I am trying to fix/address.. I am simply trying to fix the way that the product model number is called for and displayed on the reviews page.. This has NOTHING to do with how the reviews confirmations are displayed, and it's unlikely that the lightbox module is affecting this either..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
rbarbour
It is not TPP but in fact Zen Lightbox and the issue has been their since I can remember :smile:
Quote:
Originally Posted by
mc12345678
Well, I certainly feel at a loss at the moment, not being in front of a device that would allow me to look up code. So, sounds like the Zen Lightbox installation adds the ability to show additional information based on the model number of the reviewed product being filled in; however, doesn't offer any additional flag(s) to prevent display of that additional information. (Thought the additional info was model number data, but I think I was corrected on that above by Diva Vocals). Other than allowing ZLB to work on the reviews page, I am not sure why there would be a need for everyone to have code that would show this "errant" data. It may have been something that just got slipped in when packaging the update.
As I said I'm not in front of a device that works with code, but was wondering how that header compared to the default header. It may be that the header just needs to have that logic check undone and restored to the default version.
It may also be that an option should be added to the ZLB configuration area to allow showing the model info when it is present for the product. I say that because if the option isn't in the default files, and only appears in ZLB, then it should be controlled by ZLB, otherwise a similar option could be added to the template style, but then that would have to be carried over with ZC upgrades.
Quote:
Originally Posted by
DarkAngel
also noticed that the code--in part--is in 2 places so I just edited the part you posted about.
My code was meant to go in a very specific location and nowhere else.. You need to undo everything you did.. your hack to my code is not right or even needed.. (see my post just above this one..)
Quote:
Originally Posted by
rbarbour
It is not TPP but in fact Zen Lightbox and the issue has been their since I can remember :smile:
Not a ZLB issue or TPP issue.. See my post above this.. It's a Zen Cart core code issue which is "aggravated" by ZLB..
Quote:
Originally Posted by
mc12345678
Well, I certainly feel at a loss at the moment, not being in front of a device that would allow me to look up code. So, sounds like the Zen Lightbox installation adds the ability to show additional information based on the model number of the reviewed product being filled in; however, doesn't offer any additional flag(s) to prevent display of that additional information. (Thought the additional info was model number data, but I think I was corrected on that above by Diva Vocals). Other than allowing ZLB to work on the reviews page, I am not sure why there would be a need for everyone to have code that would show this "errant" data. It may have been something that just got slipped in when packaging the update.
As I said I'm not in front of a device that works with code, but was wondering how that header compared to the default header. It may be that the header just needs to have that logic check undone and restored to the default version.
It may also be that an option should be added to the ZLB configuration area to allow showing the model info when it is present for the product. I say that because if the option isn't in the default files, and only appears in ZLB, then it should be controlled by ZLB, otherwise a similar option could be added to the template style, but then that would have to be carried over with ZC upgrades.
Zen Lightbox doesn't add any additional anything to the model number on the reviews page. The ONLY thing that Zen Lightbox does on the reviews page is to display the product image inside a lightbox.. Zen Lightbox MANGLES the model number, and that's the ONLY issue I am trying to address..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Found a better solution to this issue than what I posted previously..
Issue:
If you have both Tabbed Products Pro, and Zen Lightbox installed AND your products have model numbers defined, the problem outlined above will manifest itself.
To fix this in the
includes/modules/pages/product_reviews/header_php.php file replace this:
Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
with this:
Code:
if (TPP_GLOBAL_ENABLE_TABS == '1') {
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'];
}
} else {
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
}
What this change does:
If you have Tabbed Products Pro and Zen Lightbox installed, the model number field will NOT display on the product reviews page.
I realize this is pretty much a bandaid solution, but coming up with a solution that allows the product model field to display when both TPP and Zen Lightbox are installed and active is over my paygrade to execute. I don't know if the issue is in the TPP code, or the ZenLight box code or if a change needs to be made in both. Again, someone smarter than me will need to figure this out. So I am sharing a down and dirty solution that works.
Okay.. I think I found it.. the key to the answer was in the includes/modules/pages/product_reviews_write/header_php.php file..
The includes/modules/pages/product_reviews/header_php.php file was using different code to display the model number. And this code would display the model number incorrectly when Zen Lightbox (or Zen Colorbox) was installed and active..
Here's the correct fix:
To fix this in the includes/modules/pages/product_reviews/header_php.php file replace this:
Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
with this:
Code:
$products_name = $review->fields['products_name'];
if ($review->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_model = '';
}
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Okay.. I think I found it.. the key to the answer was in the
includes/modules/pages/product_reviews_write/header_php.php file..
The
includes/modules/pages/product_reviews/header_php.php file was using different code to display the model number. And this code would display the model number incorrectly when Zen Lightbox (or Zen Colorbox) was installed and active..
Here's the correct fix:
To fix this in the
includes/modules/pages/product_reviews/header_php.php file replace this:
Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
with this:
Code:
$products_name = $review->fields['products_name'];
if ($review->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_model = '';
}
Regarding the location that this was installed, and with consideration of default database settings of a new install, would the products_model value be set to NULL as a default or blank as the new code suggests? (Ie. Was this field in the tested database one that automatically fills with a blank when no model number is provided or as a Null as the original/core code suggests?) Perhaps the logic shold be switched such that it tests if null || == "" to show without the model_number info else show with the model_number. That way the database could have either setting independent of version history and the fix would still work.
Or I guess could keep the same logic sequence and use an AND (&&) for both tests because I didn't think that NULL evaluated to "".
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
mc12345678
Regarding the location that this was installed, and with consideration of default database settings of a new install, would the products_model value be set to NULL as a default or blank as the new code suggests? (Ie. Was this field in the tested database one that automatically fills with a blank when no model number is provided or as a Null as the original/core code suggests?) Perhaps the logic shold be switched such that it tests if null || == "" to show without the model_number info else show with the model_number. That way the database could have either setting independent of version history and the fix would still work.
Blank not null.. and this code isn't new, I simply ported over the same code that is used on the "write reviews" page so that "write reviews" and "read reviews" handle the display of the product name and model number the exact same way. Trust me.. what I posted IS the right answer..:smile: The "write reviews" page worked correctly, the "read reviews" page did not.. So porting over the "write reviews" code solves the issue on the "read reviews" page..
Now is a better method for both pages to display the product name and model number?? Dunno.. there very well might be.. But the issue here is that the code being used by "write reviews" is not problematic, and the code on the "read reviews" is. My solution addresses that much..
Are improvements to this code on both pages possible?? Maybe.. I'll let someone smarter than I figure that out.. it not the issue I was trying to solve..:smile:
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Blank not null.. and this code isn't new, I simply ported over the same code that is used on the "write reviews" page so that "write reviews" and "read reviews" handle the display of the product name and model number the exact same way. Trust me.. what I posted IS the right answer..:smile: The "write reviews" page worked correctly, the "read reviews" page did not.. So porting over the "write reviews" code solves the issue on the "read reviews" page..
Now is a better method for both pages to display the product name and model number?? Dunno.. there very well might be.. But the issue here is that the code being used by "write reviews" is not problematic, and the code on the "read reviews" is. My solution addresses that much..
Are improvements to this code on both pages possible?? Maybe.. I'll let someone smarter than I figure that out.. it not the issue I was trying to solve..:smile:
Gotcha. There is LOTS of code involved to give us this highly useful, functional, open source product. Bound to be something minor somewhere that could be different/incorrectly present something. Being a questioning type individual, still wonder if there is something in ZLB that should be modified to allow capturing of that change to the core/default code.
I guess though, with the above fix, the problem that many have lived with will go away, and if someone really wants the model info to show up adjacent to the product name in ZLB while on the review page or elsewhere, then they can add that variable if they so desire.
Good catch everyone, good code review, and glad to see the community pitch in.
-
Re: Zen Lightbox addon [Support Thread]
change the code:
/includes/modules/pages/product_reviews/header_php.php
find:
PHP Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
change to:
PHP Code:
$products_name = $review->fields['products_name'];
if ($review->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_model = '';
}
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
mc12345678
Gotcha. There is LOTS of code involved to give us this highly useful, functional, open source product. Bound to be something minor somewhere that could be different/incorrectly present something. Being a questioning type individual, still wonder if there is something in ZLB that should be modified to allow capturing of that change to the core/default code.
I guess though, with the above fix, the problem that many have lived with will go away, and if someone really wants the model info to show up adjacent to the product name in ZLB while on the review page or elsewhere, then they can add that variable if they so desire.
Good catch everyone, good code review, and glad to see the community pitch in.
Why??? This issue REALLY ISN'T a ZLB issue.. Activating ZLB simply reveals an issue in Zen Cart's core code. The core code used to manage the display of the product name and model number on the "read reviews" page SHOULD match the code used for the "write reviews" page. If it does, then ZLB won't behave incorrectly on the "read reviews" page. The ONLY thing ZLB should do on ANY of the reviews pages (and does do) is to display the product image inside a lightbox. There's no change to ZLB required.. a change to the Zen Cart core code IS needed, and the only change to ZLB should be an instruction in the ZLB readme that this change needs to be made ONLY if the shopowners uses reviews and model numbers on their products..
The code change I posted SHOULD be included in the Zen Cart core, and I will report my findings on this to the admin to that effect.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Not a ZLB issue or TPP issue.. See my post above this.. It's a Zen Cart core code issue which is "aggravated" by ZLB..
Ultimately ZLB code messed with Zen Stock Code :P
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
rbarbour
change the code:
/includes/modules/pages/product_reviews/header_php.php
find:
PHP Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
change to:
PHP Code:
$products_name = $review->fields['products_name'];
if ($review->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_model = '';
}
You apparently missed where I already posted this EXACT same change..:smile: (see a few posts above yours on this page: http://www.zen-cart.com/showthread.p...69#post1216069)
I also included a detailed explanation for the change..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
You apparently missed where I already posted this EXACT same change..:smile: I also included a detailed explanation for the change..
Yep sure did, back to the Jack and tables for me!
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
rbarbour
Ultimately ZLB code messed with Zen Stock Code :P
Because the stock code is incorrect to begin with..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
and here is the corrected class code.. Tested this and it works perfectly..
Code:
<?php
/**
* Zen Lightbox
*
* @author Alex Clarke ([email protected])
* @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: autoload_default.php 2008-12-09 aclarke $
*/
?>
jQuery(function($) {
$("a[rel^='lightbox']").slimbox({<?php require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'zen_lightbox/options.php'); ?>}, function(el)
{
return [el.href, el.title /* + '<br /><a href="' + el.href + '">Download this image</a>'*/];
}, function(el) {
$("#productMainImageReview a").removeAttr("rel");
return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
});
<?php if (ZEN_LIGHTBOX_CLOSE_IMAGE == 'true' || ZEN_LIGHTBOX_PREV_NEXT == 'true') { echo ("$('#lbPrevLink').addClass('prevNoHover'); $('#lbNextLink').addClass('nextNoHover');");}?>
});
//--></script>
What this change does:
IF you are using TPP and have the reviews tab turned on, this will prevent the reviews page default image from treated like an additional product image and being grouped in with the rest of your product images in the lightbox.
The issue is MUCH MORE obvious when you have a main product image and no additional images.. Because the reviews page image is being treated as an additional image, the net effect is that the lightbox will show 1 of 2 images. (the "second" image being the product reviews page image)
Sadly there's an addendum to this... so while YES this code stops ZLB from treating the image on the "read reviews" and "write reviews" pages as an additional images so they are no longer in the lightbox on the product info page, it appear to BREAK the lightbox function on the "read reviews" and "write reviews" pages. In fact with this code in place the image on the "read reviews" and "write reviews" pages doesn't even open up in a standard Zen Cart popup window. Will need to do a bit more testing..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Sadly there's an addendum to this... so while YES this code stops ZLB from treating the image on the "read reviews" and "write reviews" pages as an additional images so they are no longer in the lightbox on the product info page, it appear to BREAK the lightbox function on the "read reviews" and "write reviews" pages. In fact with this code in place the image on the "read reviews" and "write reviews" pages doesn't even open up in a standard Zen Cart popup window. Will need to do a bit more testing..
Sample link to demonstrate the behavior I am describing: https://www(dot)laserdiscvault(dot)c...384-80/Reviews
Click the "larger image" link.. Note that the image doesn't open in a lightbox effect or even in a default image popup either.. Instead, it opens the actual image file. The product info pages work just fine.. the issue is only on the "read reviews" and "write reviews" pages..
Because I posted a similar class file fix to the Zen Colorbox support thread (to fix the SAME issue), it should be noted that the Zen Colorbox module doesn't have the same issue with the class file fix in place.
Here's the difference on a site using Zen Colorbox: http://eitestsite(dot)eyeitalia(dot)...roducts_id=331
Click the "larger image" link, and note that the image opens with the lightbox effect working as expected.
Unless a solution for this is found, I will probably swap Zen Lightbox for Zen Colorbox on this site..
Wanted to share my findings with the community though..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Sample link to demonstrate the behavior I am describing:
https://www(dot)laserdiscvault(dot)c...384-80/Reviews
Click the "larger image" link.. Note that the image doesn't open in a lightbox effect or even in a default image popup either.. Instead, it opens the actual image file. The product info pages work just fine.. the issue is only on the "read reviews" and "write reviews" pages..
Because I posted a similar class file fix to the Zen Colorbox support thread (to fix the SAME issue), it should be noted that the Zen Colorbox module doesn't have the same issue with the class file fix in place.
Here's the difference on a site using Zen Colorbox:
http://eitestsite(dot)eyeitalia(dot)...roducts_id=331
Click the "larger image" link, and note that the image opens with the lightbox effect working as expected.
Unless a solution for this is found, I will probably swap Zen Lightbox for Zen Colorbox on this site..
Wanted to share my findings with the community though..
Have you changed something since posting this? Appears that both show up in a different "holder", I don't see any additional images attached to the main image(s), and I can't tell if there is something "added" to the name or not. I will say that the shape of the corners is different than what I have and I haven't looked yet to see what would "cause" or "allow" the beveled corners instead of the actual box shape. But once again, don't see the problem... :)
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
mc12345678
Have you changed something since posting this? Appears that both show up in a different "holder", I don't see any additional images attached to the main image(s), and I can't tell if there is something "added" to the name or not. I will say that the shape of the corners is different than what I have and I haven't looked yet to see what would "cause" or "allow" the beveled corners instead of the actual box shape. But once again, don't see the problem... :)
Not sure what you mean.. The second example I posted (http://eitestsite(dot)eyeitalia(dot)...roducts_id=331) was to show the difference between how Zen Colorbox works CORRECTLY after the class file change when you click the "larger image" link on the review pages. I've made no changes to that site since posting the link, let alone a change which would be relevant to the issue I speak of. The rounded corners on the images is not an issue it is a stylesheet change which is "allowed" via CSS. The lightbox effect was always rounded on this site (it is also a stylesheet change - which is "allowed" via CSS).
The first site demonstrates the issue: https://www(dot)laserdiscvault(dot)c...384-80/Reviews
After making the change to the class file as previously posted (http://www.zen-cart.com/showthread.p...27#post1215927) when you click the "larger image" link the image it self is displayed.. when you click the "larger image" link it SHOULD result in the image appearing inside the lightbox effect or AT LEAST the default image popup. However, neither is the case.
Again here is a summary of the issue:
IF you are using TPP AND have the reviews tab turned on AND you have ZLB install, the reviews page default image is treated like an additional product image when you view the images on the product info page. So when you view the images on the product info page it appears as if the main image is counted twice.
The issue is MUCH MORE obvious when you have a main product image and NO additional images.. Because the reviews page image is being treated as an additional image, the net effect is that the lightbox will show 1 of 2 images. (the "second" image being the product reviews page image)
Making the change to the ZLB class file as previously posted (http://www.zen-cart.com/showthread.p...27#post1215927) DOES fix this issue (stops ZLB from counting the reviews image when viewing the images on the product info page), but it creates another with the "larger image" link on the review pages ("read reviews" and "write reviews" pages). (Again as described above and is demonstrated here: https://www(dot)laserdiscvault(dot)c...384-80/Reviews)
Not sure what is not clear here.. please re-read this post: http://www.zen-cart.com/showthread.p...96#post1216096
I'll see if I can find my original posts describing the issue the class file change I posted was supposed to solve, but I think this is covered here.. Let me know what is not clear.. but the rounded corners on the lightbox or the images aren't the issue or even a cause of the issue.. and you WON'T see additional images when you click the "larger image" link on the REVIEWS page... (you're not supposed to.. and that is also not the issue I am describing here) additional images only show on the product info page..
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
DivaVocals
Not sure what you mean.. The second example I posted (
http://eitestsite(dot)eyeitalia(dot)...roducts_id=331) was to show the difference between how Zen Colorbox works CORRECTLY after the class file change when you click the "larger image" link on the review pages. I've made no changes to that site since posting the link, let alone a change which would be relevant to the issue I speak of. The rounded corners on the images is not an issue it is a stylesheet change which is "allowed" via CSS. The lightbox effect was always rounded on this site (it is also a stylesheet change - which is "allowed" via CSS).
The first site demonstrates the issue:
https://www(dot)laserdiscvault(dot)c...384-80/Reviews
After making the change to the class file as previously posted (
http://www.zen-cart.com/showthread.p...27#post1215927) when you click the "larger image" link the image it self is displayed.. when you click the "larger image" link it SHOULD result in the image appearing inside the lightbox effect or AT LEAST the default image popup. However, neither is the case.
Again here is a summary of the issue:
IF you are using TPP AND have the reviews tab turned on AND you have ZLB install, the reviews page default image is treated like an additional product image when you view the images on the product info page. So when you view the images on the product info page it appears as if the main image is counted twice.
The issue is MUCH MORE obvious when you have a main product image and NO additional images.. Because the reviews page image is being treated as an additional image, the net effect is that the lightbox will show 1 of 2 images. (the "second" image being the product reviews page image)
Making the change to the ZLB class file as previously posted (
http://www.zen-cart.com/showthread.p...27#post1215927) DOES fix this issue (stops ZLB from counting the reviews image when viewing the images on the product info page), but it creates another with the "larger image" link on the review pages ("read reviews" and "write reviews" pages). (Again as described above and is demonstrated here:
https://www(dot)laserdiscvault(dot)c...384-80/Reviews)
Not sure what is not clear here.. please re-read this post:
http://www.zen-cart.com/showthread.p...96#post1216096
I'll see if I can find my original posts describing the issue the class file change I posted was supposed to solve, but I think this is covered here.. Let me know what is not clear.. but the rounded corners on the lightbox or the images aren't the issue or even a cause of the issue.. and you WON'T see additional images when you click the "larger image" link on the REVIEWS page... (you're not supposed to.. and that is also not the issue I am describing here) additional images only show on the product info page..
Welp, what's not clear here, is why aren't you seeing a lightbox when I am. So, I went to the site location (https://www(dot)laserdiscvault(dot)c...384-80/Reviews), I see the laserdisc image, just below that a clickable link to show a larger image. When I click on either of those, the background darkens, a white window expands with a "circle-of-thought" while it processes, then the image of the laserdisc appears towards the "top" part of the new light colored area, leaving just enogh room to have some info at the bottom. This info appears to be the title/name of the laserdisc. In the lower right corner is a close button.
So again, the part that is confusing me is why do I see that (and I consider what I described a light box), but you don't? I've tried it on both desktop and mobile, and while desktop is far faster (like instant almost), they both have provided the same result.
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
mc12345678
Welp, what's not clear here, is why aren't you seeing a lightbox when I am. So, I went to the site location (
https://www(dot)laserdiscvault(dot)c...384-80/Reviews), I see the laserdisc image, just below that a clickable link to show a larger image. When I click on either of those, the background darkens, a white window expands with a "circle-of-thought" while it processes, then the image of the laserdisc appears towards the "top" part of the new light colored area, leaving just enogh room to have some info at the bottom. This info appears to be the title/name of the laserdisc. In the lower right corner is a close button.
So again, the part that is confusing me is why do I see that (and I consider what I described a light box), but you don't? I've tried it on both desktop and mobile, and while desktop is far faster (like instant almost), they both have provided the same result.
Well how about that..:laugh:
Well then NEVERMIND.. Dunno what happened.. but d@mned if this ain't working..
Need coffee..
NOW...
Carry-on..:smile:
-
Re: Zen Lightbox addon [Support Thread]
Hi all,
First time posting, long time reading :blush:
I've slowly done my own site over the last couple of years and managed to figure out most things ( thanks to you guys here) but I'm out of my depth with this one.
I've installed the lightbox but having an issue with displaying the images.
When an image on the products page/s is clicked, it enlarges and displays part of the image at the bottom of the screen
Link http://evorc.com.au/index.php?main_p...&products_id=2
Any help on this would be greatly appreciated :cool:
-
Re: Zen Lightbox addon [Support Thread]
Looks rather interesting doesn't it...sorry have to joke at times to stay semi-sane.
Have you made sure that all your lightbox files are in their correct locations. I notice that none of them open into a light box.
What do you have your setting at in the admin section.
I also noticed that your header image is duplicating itself too.
open the zip and compare the contents to the server files to make sure they are in the right folders ---then as a safe measure reupload them to each respective folder.
sometimes the files get caught up in some ftp vortex that we do not see and appear to upload correctly but really get corrupted a bit.
see if that helps
-
Re: Zen Lightbox addon [Support Thread]
Quote:
Originally Posted by
Jason Cox
Hi all,
First time posting, long time reading :blush:
I've slowly done my own site over the last couple of years and managed to figure out most things ( thanks to you guys here) but I'm out of my depth with this one.
I've installed the lightbox but having an issue with displaying the images.
When an image on the products page/s is clicked, it enlarges and displays part of the image at the bottom of the screen
Link
http://evorc.com.au/index.php?main_p...&products_id=2
Any help on this would be greatly appreciated :cool:
Quote:
Originally Posted by
DarkAngel
Looks rather interesting doesn't it...sorry have to joke at times to stay semi-sane.
Have you made sure that all your lightbox files are in their correct locations. I notice that none of them open into a light box.
What do you have your setting at in the admin section.
I also noticed that your header image is duplicating itself too.
open the zip and compare the contents to the server files to make sure they are in the right folders ---then as a safe measure reupload them to each respective folder.
sometimes the files get caught up in some ftp vortex that we do not see and appear to upload correctly but really get corrupted a bit.
see if that helps
Looking over the page coe, I would agree with DarkAngel that there may be some issue with the file(s) uploaded. The effect is rather unusual and appears to be that the image(s) load to the full screen/full height.
Forgot to mention, don't let that be your last post! :)
-
Image Display Size Restriction
Restricting Image Display Size Width to Screen Size Width (or browser width)?
Is this possible?
The reason is, I am putting ultra high resolution images for my products since most devices are HiDpi/Retina now. So right now, images are opening according to their result ion and running off the screen. I am sure there is a way to modify the code to get browser width and display in to that size.
-
Re: Image Display Size Restriction
Change the dimensions of your large images..
Quote:
Originally Posted by
sle39lvr
Restricting Image Display Size Width to Screen Size Width (or browser width)?
Is this possible?
The reason is, I am putting ultra high resolution images for my products since most devices are HiDpi/Retina now. So right now, images are opening according to their result ion and running off the screen. I am sure there is a way to modify the code to get browser width and display in to that size.
-
Re: Image Display Size Restriction
I cannot do that, for the reasons I listed already. For example, 2000x2000 image, I want to display in a 1000x1000 window (or smaller if the browser window width is smaller). I guess I will find the code where it picks up image width and height and divide by 2.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
sle39lvr
I cannot do that, for the reasons I listed already. For example, 2000x2000 image, I want to display in a 1000x1000 window (or smaller if the browser window width is smaller). I guess I will find the code where it picks up image width and height and divide by 2.
Umm, kinda hate to say it, but if you use this plugin to accomplish what you are intending, you will have done what you have said you can not do.
The help provided identified the image type that must be modified to suit your needs. Basically before the image is directed to be shown, you will want to modify the max dimensions of the large image to be no larger than the screen display, which should force the image to be recalculated/remade in the cache directory. Be prepared though to have your storage file space increase/fluctuate as a result. If however, you want a 2000x2000 image to always show at 1000x1000 all you need to do is adjust your admin settings for IH4 and it will do the rest of the work for you.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
If however, you want a 2000x2000 image to always show at 1000x1000 all you need to do is adjust your admin settings for IH4 and it will do the rest of the work for you.
Could you elaborate on this please?
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
sle39lvr
I cannot do that, for the reasons I listed already. For example, 2000x2000 image, I want to display in a 1000x1000 window (or smaller if the browser window width is smaller). I guess I will find the code where it picks up image width and height and divide by 2.
Quote:
Originally Posted by
mc12345678
Umm, kinda hate to say it, but if you use this plugin to accomplish what you are intending, you will have done what you have said you can not do.
The help provided identified the image type that must be modified to suit your needs. Basically before the image is directed to be shown, you will want to modify the max dimensions of the large image to be no larger than the screen display, which should force the image to be recalculated/remade in the cache directory. Be prepared though to have your storage file space increase/fluctuate as a result. If however, you want a 2000x2000 image to always show at 1000x1000 all you need to do is adjust your admin settings for IH4 and it will do the rest of the work for you.
Exactly.. why upload a 2000 x 2000 image if the desired display dimensions are 1000 x 1000.. Change the image settings for the large image to 1000h 1000w and then Zen Cart or IH4 (if installed) will take care of the rest..
However on smaller displays (like say a tablet or smartphone) a 1000 x 1000 image will over flow the edge of the display.. THIS requires that Zen Lightbox be responsive, and this kind of functionality is just not supported with the current version of Zen Lightbox or any other lightbox module available.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
Exactly.. why upload a 2000 x 2000 image if the desired display dimensions are 1000 x 1000..
HiDPI/Retina displays
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
sle39lvr
HiDPI/Retina displays
uh huh.. and my answer is still the same.. If you want the image to DISPLAY at 1000 x 1000, and you are using IH4 inaddition to Zen Lightbox, then you need to change the image settings to make that happen.. If you are using IH4 (which will re-size, cache and optimize the displayed image) you need to also make sure that you change the compression setting so that it doesn't compress your images (default compression setting is 85)..
If you are NOT using IH4 along with Zen Lightbox, then you will need to change the way Zen Carts default image management works.
Your other option is to adjust your stylesheet to artificially change the image sizes.. The last two options are outside the scope of this support thread..
-
Re: Image Display Size Restriction
I have installed this and it works well with my site which uses a responsive template.
However, when the site is viewed on a smartphone I find that the lightbox is scollable up and down, but the left/right scroll bars have no effect (so the 'close button cannot be seen or used).
Can anyone point me in the direction of any info that may assist with the problem.
Thanks.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
I have installed this and it works well with my site which uses a responsive template.
However, when the site is viewed on a smartphone I find that the lightbox is scollable up and down, but the left/right scroll bars have no effect (so the 'close button cannot be seen or used).
Can anyone point me in the direction of any info that may assist with the problem.
Thanks.
Simply put this module is not "responsive" and needs to be made "responsive"..
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
Simply put this module is not "responsive" and needs to be made "responsive"..
I see.
Not entirely sure I understand what that means, but - is that something that is likely to happen now that the developer appears to no longer be around???
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
I see.
Not entirely sure I understand what that means, but - is that something that is likely to happen now that the developer appears to no longer be around???
Your RESPONSIVE template is only a small part of making your site RESPONSIVE.. Appearance modules like this one are not going to be RESPONSIVE just because your template is RESPONSIVE..
So to answer your question, the lightbox module is not RESPONSIVE so it doesn't adjust itself at different media queries.. and unless someone comes along and either makes this module RESPONSIVE or at least MOBILE ENABLED then you will get the result you are reporting.. Dunno if when this will happen.. If you really need this corrected, then you can seek the services of a developer to help make the necessary changes to this module that you require..
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
Your RESPONSIVE template is only a small part of making your site RESPONSIVE.. Appearance modules like this one are not going to be RESPONSIVE just because your template is RESPONSIVE..
So to answer your question, the lightbox module is not RESPONSIVE so it doesn't adjust itself at different media queries.. and unless someone comes along and either makes this module RESPONSIVE or at least MOBILE ENABLED then you will get the result you are reporting.. Dunno if when this will happen.. If you really need this corrected, then you can seek the services of a developer to help make the necessary changes to this module that you require..
I finally have a "responsive" version of this plugin complete.
It is not responsive as to where it shrinks and expands with your browser window but instead fits to the window it's being opened in.
check it out, tell me what you think.
www[.]zcadditions[.]com/222/index.php?main_page=product_music_info&products_id=166
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
rbarbour
I finally have a "responsive" version of this plugin complete.
It is not responsive as to where it shrinks and expands with your browser window but instead fits to the window it's being opened in.
check it out, tell me what you think.
www[.]zcadditions[.]com/222/index.php?main_page=product_music_info&products_id=166
Works as I would expect! Tested on my smartphone and just for grins and giggles, I tested on my 10" Galaxy 2 tablet too.. Sooooooooooooo... will you be SHARING???:D
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
Works as I would expect! Tested on my smartphone and just for grins and giggles, I tested on my 10" Galaxy 2 tablet too.. Sooooooooooooo... will you be SHARING???:D
Will be uploaded over the weekend :smile:
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
Works as I would expect! Tested on my smartphone and just for grins and giggles, I tested on my 10" Galaxy 2 tablet too.. Sooooooooooooo... will you be SHARING???:D
Agree worked and looks good (blackberry 9930), was a little confused about some of the messages: seemed to indicate my phone wasn't recognized, but look forward to the update.
Will it only work with a responsive template, or is it "template" independent?
-
Re: Image Display Size Restriction
The changes should be templates independent.. just mean that in small mobile devices the lightbox will work correctly..
Quote:
Originally Posted by
mc12345678
Agree worked and looks good (blackberry 9930), was a little confused about some of the messages: seemed to indicate my phone wasn't recognized, but look forward to the update.
Will it only work with a responsive template, or is it "template" independent?
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
The changes should be templates independent.. just mean that in small mobile devices the lightbox will work correctly..
Certainly excited to see the results of installing it. :)
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
Certainly excited to see the results of installing it. :)
That's the beauty. I only altered the classes/zen_lightbox/slimbox.php file, nothing else. All admin configurations and file structure are intact and will work as it did, on responsive or not templates.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
rbarbour
I finally have a "responsive" version of this plugin complete.
It is not responsive as to where it shrinks and expands with your browser window but instead fits to the window it's being opened in.
check it out, tell me what you think.
www[.]zcadditions[.]com/222/index.php?main_page=product_music_info&products_id=166
Looks bloody brilliant Raymond!
-
1 Attachment(s)
Re: Image Display Size Restriction
Raymond.
I am not trying to steal your thunder, but at the same time as I saw your post I had just uploaded a new copy of slimbox.php to my site and it works.
Last nigh before retiring I found the code for a responsive version of slimbox.js on google groups which I copied to replace the code in the zen lightbox .php script.
I haven't fully tested it, but it appears to work - it is attached if you'd like to compare it to yours and for anyone else to test for issues.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
Raymond.
I am not trying to steal your thunder, but at the same time as I saw your post I had just uploaded a new copy of slimbox.php to my site and it works.
Last nigh before retiring I found the code for a responsive version of slimbox.js on google groups which I copied to replace the code in the zen lightbox .php script.
I haven't fully tested it, but it appears to work - it is attached if you'd like to compare it to yours and for anyone else to test for issues.
That's great, seems to work. One less plugin I have to upload and maintain. :smile:
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
Raymond.
I am not trying to steal your thunder, but at the same time as I saw your post I had just uploaded a new copy of slimbox.php to my site and it works.
Last nigh before retiring I found the code for a responsive version of slimbox.js on google groups which I copied to replace the code in the zen lightbox .php script.
I haven't fully tested it, but it appears to work - it is attached if you'd like to compare it to yours and for anyone else to test for issues.
and to be clear for others following this.. you replaced the slimbox.php file in includes/classes/zen_lightbox with the one you attached right???
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
and to be clear for others following this.. you replaced the slimbox.php file in includes/classes/zen_lightbox with the one you attached right???
Correct. :yes:
-
Re: Image Display Size Restriction
pewe,
I merged in your updates and submitted a new version.
I have also created a github repo to make collaboration easier (if anyone else here uses github).
daniel
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
niestudio
pewe,
I merged in your updates and submitted a new version.
I have also created a
github repo to make collaboration easier (if anyone else here uses github).
daniel
:cheers::thumbsup::bow:
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
I haven't fully tested it, but it appears to work - it is attached if you'd like to compare it to yours and for anyone else to test for issues.
Are the following values=100 from includes\classes\zen_lightbox\slimbox.php expressed in percentages?
Code:
initialWidth: 100, //1024
initialHeight: 100, //768
Thanks in advance.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
niestudio
pewe,
I merged in your updates and submitted a new version.
I have also created a
github repo to make collaboration easier (if anyone else here uses github).
daniel
:thumbsup: just forked and submitted a small change
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
Design75
:thumbsup: just forked and submitted a small change
What was the small change - did you find a problem somewhere?
(Github shows all the files as being last changed 2 days ago.)
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
dw08gm
Are the following values=100 from includes\classes\zen_lightbox\slimbox.php expressed in percentages?
Code:
initialWidth: 100, //1024
initialHeight: 100, //768
Thanks in advance.
I, for one, don't know - but maybe one of the other guys will have the answer.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
What was the small change - did you find a problem somewhere?
(Github shows all the files as being last changed 2 days ago.)
Check the pull requests. Essentially the submitted change removes the echo statement in the includes/classes/zen_light_box/slimbox.php file that loads the jquery script from the template folder.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
Check the pull requests. Essentially the submitted change removes the echo statement in the includes/classes/zen_light_box/slimbox.php file that loads the jquery script from the template folder.
That's the one :)
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
Check the pull requests. Essentially the submitted change removes the echo statement in the includes/classes/zen_light_box/slimbox.php file that loads the jquery script from the template folder.
Forgive me - am I missing something.
The files on the Github link posted by @niestudio are still showing as posted 2 days ago, and the file there (slimbox.php) still appears to contain the same code as the one I have.
So is there a different link to the re-submitted file??
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
Forgive me - am I missing something.
The files on the Github link posted by @niestudio are still showing as posted 2 days ago, and the file there (slimbox.php) still appears to contain the same code as the one I have.
So is there a different link to the re-submitted file??
This really isn't the place to discuss how github works. If that type of assistance is needed a separate thread should be begun, possibly on an entirely different website. More can be seen at:
https://github.com/Zen4All/zen_light...f66243b95c709c
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
In which case - with all due respect - if someone makes a change to an zen cart plugin (particularly one already hosted on the zen cart plugins section) surely the changes should be uploaded to the Plugin repository where zen cart users would expect to find it (as niestudio kindly did) - or at least post details of the changes in the relevant plugin support thread so others could see them without visiting a third party hosting service.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
In which case - with all due respect - if someone makes a change to an zen cart plugin (particularly one already hosted on the zen cart plugins section) surely the changes should be uploaded to the Plugin repository where zen cart users would expect to find it (as niestudio kindly did) - or at least post details of the changes in the relevant plugin support thread so others could see them without visiting a third party hosting service.
No disrespect observed, thank you for the concern. The issue(s) are this: the Zen Cart forum and plugin areas, do not as openly support a collaboration/testing of a product to be made available/acceptable to all that will use it. Generally speaking, github is an open source location (when not paying to have a private space) where yes collaboration can occur. In this case, one meber of the community posted the code and in essence is in control of that code. Another member of the community has provided their input (including a statement of such here as wellas performing the actions to notify the original poster.) That individual could go through the submission of an "updated" plug-in, or could allow the community to incorporate the suggestion or perhaps the change is not beneficial to the masses. Whatever the case, other than our coonversation on this portion of the topic, I don't see that Design75 nor niestudio have done anything wrong. At this point it is basically up to niestudio to accept the change that Design75 has suggested in order for that revision to appear in the final package of the github link. This is also how multiple versions of a product end up existing. One developer heads down a path, another picks up part way and goes another direction and the two do not get merged together offering multiple programs that essentially do the same thing but have different ways of getting there or slightly different features.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
Check the pull requests. Essentially the submitted change removes the echo statement in the includes/classes/zen_light_box/slimbox.php file that loads the jquery script from the template folder.
Without seeing this change, this sounds like the same change I made to the Colorbox module.. I removed the echo statement that calls the jQuery CDN and instead made this call to the CDN via a file in the jscript folder (plus I updated it to call the latest version of jQuery as well).. I did this for a number of reasons. The biggest reason is so that shopowners who have templates or other modules which ALSO include jQuery do not end up with jQuery loaded twice (they can remove the duplicates or not load them at all). Otherwise novice shopowners will end up being unable to trace WHERE the other jQuery call is.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
In which case - with all due respect - if someone makes a change to an zen cart plugin (particularly one already hosted on the zen cart plugins section) surely the changes should be uploaded to the Plugin repository where zen cart users would expect to find it (as niestudio kindly did) - or at least post details of the changes in the relevant plugin support thread so others could see them without visiting a third party hosting service.
Quote:
Originally Posted by
mc12345678
No disrespect observed, thank you for the concern. The issue(s) are this: the Zen Cart forum and plugin areas, do not as openly support a collaboration/testing of a product to be made available/acceptable to all that will use it. Generally speaking, github is an open source location (when not paying to have a private space) where yes collaboration can occur. In this case, one meber of the community posted the code and in essence is in control of that code. Another member of the community has provided their input (including a statement of such here as wellas performing the actions to notify the original poster.) That individual could go through the submission of an "updated" plug-in, or could allow the community to incorporate the suggestion or perhaps the change is not beneficial to the masses. Whatever the case, other than our coonversation on this portion of the topic, I don't see that Design75 nor niestudio have done anything wrong. At this point it is basically up to niestudio to accept the change that Design75 has suggested in order for that revision to appear in the final package of the github link. This is also how multiple versions of a product end up existing. One developer heads down a path, another picks up part way and goes another direction and the two do not get merged together offering multiple programs that essentially do the same thing but have different ways of getting there or slightly different features.
and to piggyback on this, this is EXACTLY where/how updates to the Zen Cart framework are conducted.. Zen Cart maintains an ACTIVE github repository. All niestudio did was to do the SAME THING with Zen Lightbox when he created the gibhub repository for this module.. and Design75 did what good community members do.. CONTRIBUTE/COLLABORATE..
mc12345678 is right.. No one is doing anything wrong.. In fact this is the RIGHT way to do it so that Zen Lightbox doesn't go the way of modules like Stock by Attributes which now has SO MANY forks/variants/versions (with various degrees of suitability/stability) that were created and submitted by well meaning community members NOT based on community needs, but the need of the individual authors. These well meaning authors fork this module to HELL without any regard for how these variations could cause more harm than good down the road. (multiple modules where a feature works on one, but not on another version, etc)
-
Re: Image Display Size Restriction
Thank you for the explanations and taking the time to write them Guys.
Much appreciated.
If I may, could I clarify -
Would I be right to assume that updates such as the latter one will end up in the plugins section (as was the case with the one niestudio did)?
and if so, is there any built in update notifier for those who use it, or is it up to the individual to periodically check for changes??
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
Thank you for the explanations and taking the time to write them Guys.
Much appreciated.
If I may, could I clarify -
Would I be right to assume that updates such as the latter one will end up in the plugins section (as was the case with the one niestudio did)?
and if so, is there any built in update notifier for those who use it, or is it up to the individual to periodically check for changes??
Welcome with whatever little I may have helped. Typically those that submit an update will post something in the forum thread (which if monitored and one stays "up-to-date" with) will be notified. But I can't say that I have seen a notifier for plug-in updates otherwise. And yes as such the shop owner(s) should periodically check for updates and then evaluate whether it should eventually be incorporated into the active site.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
pewe
Thank you for the explanations and taking the time to write them Guys.
Much appreciated.
If I may, could I clarify -
Would I be right to assume that updates such as the latter one will end up in the plugins section (as was the case with the one niestudio did)?
and if so, is there any built in update notifier for those who use it, or is it up to the individual to periodically check for changes??
Of course they will.. and while I don't exactly know how to submit changes to github:blush:, I do undestand how it works.. gihub isn't a place to HOST modules, and the forum rules frown up supporting modules that are not available for download on this site (commercial or not)..
As for notification, IF this thread is updated with such a notification and IF you are subscribed to this thread, that is ALL the notification that any module gets round here..
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
and while I don't exactly know how to submit changes to github:blush:, I do undestand how it works..
and just that quick I think I figured it out.. (would love someone to grade my homework though) I created a fork and submitted a change as follows:
Quote:
Replace jQuery with the latest jQuery version.
Pulls latest jQuery from CDN.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
and just that quick I think I figured it out.. (would love someone to grade my homework though) I created a fork and submitted a change as follows:
So, looks like you successfully have updated github to reflect the changes that you have made, which went a step further than provided by Design75 by deleting what looks like the contents of the the jquery file (haven't downloaded the applicable files to see if actually the file itself and associated folders were deleted or just the contents of the file), but then kept a reference to the internet version of the jscript_jquery file. So couple of comments based on a review and I wouldn't call myself a grading teacher:
Don't see a pull request from niestudio's version (so, yes forked, but no notification back to the main project to request merging).
It looks like the project was forked from niestudio's version which does not yet include Design75's changes.
The changes made in both forks are different, as well as similar, this would result in niestudio having to decide/determine a "best" path forward as to which to incorporate and will likely require a manual merge, but that is the way of working in/with github.
Next homework assignment is to provide a new commit to your own branch, create two branches off of yours, make a modification in each branch that is in two different areas, merge the two branches, submit a pull request for your changes, let's see what else? :)
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
Next homework assignment is to provide a new commit to your own branch, create two branches off of yours, make a modification in each branch that is in two different areas, merge the two branches, submit a pull request for your changes, let's see what else? :)
:laugh: I'll have to read and try and digest this all after I eat.. I already submitted the pull request for my changes.. (figured out that I missed this all on my own..:smile: just need someone to tell me if I did it "right":smile:)
Quote:
Originally Posted by
mc12345678
So, looks like you successfully have updated github to reflect the changes that you have made, which went a step further than provided by Design75 by deleting what looks like the contents of the the jquery file (haven't downloaded the applicable files to see if actually the file itself and associated folders were deleted or just the contents of the file), but then kept a reference to the internet version of the jscript_jquery file. So couple of comments based on a review and I wouldn't call myself a grading teacher:
Don't see a pull request from niestudio's version (so, yes forked, but no notification back to the main project to request merging).
It looks like the project was forked from niestudio's version which does not yet include Design75's changes.
The changes made in both forks are different, as well as similar, this would result in niestudio having to decide/determine a "best" path forward as to which to incorporate and will likely require a manual merge, but that is the way of working in/with github.
In summary my changes included deleting the outdated v1.4.1 jQuery file that is included with Zen Lightbox in it's entirety, and replacing it with a NEW file that instead pulls the latest version of jQuery from a CDN.. (I followed the same pattern that Picaflor follows in her templates)
Now going forward should I have simply worked from Design75's repo or niestudios's original repo versus creating my own fork???.. As I said I know what gihub is for, but have never used it in practice.. So I simply followed Design75's lead and created my own fork.. If this was the wrong path, then I would appreciate some tips on best practices here..
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
mc12345678
So, looks like you successfully have updated github to reflect the changes that you have made, which went a step further than provided by Design75 by deleting what looks like the contents of the the jquery file (haven't downloaded the applicable files to see if actually the file itself and associated folders were deleted or just the contents of the file), but then kept a reference to the internet version of the jscript_jquery file. So couple of comments based on a review and I wouldn't call myself a grading teacher:
Don't see a pull request from niestudio's version (so, yes forked, but no notification back to the main project to request merging).
It looks like the project was forked from niestudio's version which does not yet include Design75's changes.
The changes made in both forks are different, as well as similar, this would result in niestudio having to decide/determine a "best" path forward as to which to incorporate and will likely require a manual merge, but that is the way of working in/with github.
Next homework assignment is to provide a new commit to your own branch, create two branches off of yours, make a modification in each branch that is in two different areas, merge the two branches, submit a pull request for your changes, let's see what else? :)
I like that "cliff's notes" version of github collaboration. :)
While I do agree that jQuery probably doesn't need to be loaded in the way that it has with this plugin since the beginning.
With these new proposals, my concern with pulling latest jQuery from the cdn is that ZLB is based on slimbox which is not really actively developed anymore. There was an update in May (that has not been applied to ZLB) to address jQuery 1.9 compatibility, but the previous one was 3+yrs prior.
So, had we been pulling latest jQuery from CDN all this time, it may have broken everyones ZLB until there was an update to slimbox.
Also, shouldn't we have a fallback to check if !jQuery {load jquery} incase the user has not used a template or other plugin that already has jQuery?
any thoughts on this?
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
niestudio
I like that "cliff's notes" version of github collaboration. :)
While I do agree that jQuery probably doesn't need to be loaded in the way that it has with this plugin since the beginning.
With these new proposals, my concern with pulling latest jQuery from the cdn is that ZLB is based on slimbox which is not really actively developed anymore. There was an
update in May (that has not been applied to ZLB) to address jQuery 1.9 compatibility, but the previous one was 3+yrs prior.
So, had we been pulling latest jQuery from CDN all this time, it may have broken everyones ZLB until there was an update to slimbox.
Also, shouldn't we have a fallback to check if !jQuery {load jquery} incase the user has not used a template or other plugin that already has jQuery?
any thoughts on this?
The fallback option was a thought that I had, as well as the concerns of always loading/forcing the latest. Yes programs should always seek to use the latest, and if everything else is kept up-to-date, going out and calling the latest is probably a great way to go. I did at one time (2 years ago) collaborate on a project where they were calling the latest from the internet, and the resulting delay was actually causing trouble as compared to simply loading it locally, but at the same time can understand the reasons for not loading it again, and again, and again.... (almost worse if all of them are using different versions).
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
niestudio
I like that "cliff's notes" version of github collaboration. :)
While I do agree that jQuery probably doesn't need to be loaded in the way that it has with this plugin since the beginning.
With these new proposals, my concern with pulling latest jQuery from the cdn is that ZLB is based on slimbox which is not really actively developed anymore. There was an
update in May (that has not been applied to ZLB) to address jQuery 1.9 compatibility, but the previous one was 3+yrs prior.
So, had we been pulling latest jQuery from CDN all this time, it may have broken everyones ZLB until there was an update to slimbox.
Also, shouldn't we have a fallback to check if !jQuery {load jquery} incase the user has not used a template or other plugin that already has jQuery?
any thoughts on this?
I agree with the fallback code.. it's a BIG problem with sooooo many modules and templates using jQuery and shopowners unwittingly having MULTIPLE versions of jQuery running in their shops.. (which was the inspiration for my contribution)
Couldn't backwards compatibility be mitigated with the jQuery Migrate script??
Code:
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
:laugh: I'll have to read and try and digest this all after I eat.. I already submitted the pull request for my changes.. (figured out that I missed this all on my own..:smile: just need someone to tell me if I did it "right":smile:)
In summary my changes included deleting the outdated v1.4.1 jQuery file that is included with Zen Lightbox in it's entirety, and replacing it with a NEW file that instead pulls the latest version of jQuery from a CDN.. (I followed the same pattern that Picaflor follows in her templates)
Now going forward should I have simply worked from Design75's repo or niestudios's original repo versus creating my own fork???.. As I said I know what gihub is for, but have never used it in practice.. So I simply followed Design75's lead and created my own fork.. If this was the wrong path, then I would appreciate some tips on best practices here..
If you and Design75 are working on the same "goal" then probably better to repo/fork off of Design75's version so that the changes made by the two of you could be merged together by one of you and then brought into niestudio's master. If you each are working on something different, like each working on a different feature, or "black box", then repo'ing off of a functional path would be best/easiest. In short, the collaborative effort actually requires collaboration, not just at the software level (which allows "checking out" each other's work), but also in the communication of what is being done to minimize rework and duplication of effort.
Also, by forking off the master, the master can be changed, including building more functionality, and eventually the or one of the forks can be merged with the master (possibly to even create a new branch) to verify downstream/future compatibility, and then could be rewound also to find in which commit caused a conflict.
I personally thought it was great to see you run off and give it a shot. Unfortunately you and one other basically did the same thing, so the result didn't give you the best first experience. :)
In short, usually best to pick a "known" point that is good/works (which you can do before actually forking the project) and then work from that point. When others provide input, always possible to provide comment associated with what they have shared with github/the thread "runner". (That person also can add others to help manage the master thread.) Also, there are ways/places to provide input about the mod as part of pushing each commit, and depending on your interface software this may be "clearer" than with others, but generally the title will wrap around to the body of the statement(s), also things pushed to github, well... are out there and can not really be taken back. There are several readme files in github that are informative. Perhaps niestudio may have other hints/tips?
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
I agree with the fallback code.. it's a BIG problem with sooooo many modules and templates using jQuery and shopowners unwittingly having MULTIPLE versions of jQuery running in their shops.. (which was the inspiration for my contribution)
Couldn't backwards compatibility be mitigated with the jQuery Migrate script??
Code:
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
Have you ever suggested that ZC roll a latest jQuery call into the ZC default template?
Hmm, I've never come across this before. Sounds interesting but would not have worked for this since it only supports jQuery 1.6.4 and later.
Going forward it could be good though.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
niestudio
Have you ever suggested that ZC roll a latest jQuery call into the ZC default template?
I believe that v1.6 (though I haven't looked at the gibhub lately) is going to do JUST THAT.. Then there would be no NEED for plugin authors to have to include jQuery files which would also eliminate the issue with multiple jQuery versions being loaded on a shop..
It's a path WordPress also took in recent versions so that plugin developers wouldn't have to include jQuery in their plugins. Eliminates the number of plugin clashes due to conflicting versions of jQuery loading at once on a site..
Quote:
Originally Posted by
niestudio
Hmm, I've never come across this before. Sounds interesting but would not have worked for this since it only supports jQuery 1.6.4 and later.
Going forward it could be good though.
Well I've used it with Zen Lightbox with no issues.. let me find the site and post the URL.. Here's the gihub for the jQuery Migrate script: https://github.com/jquery/jquery-migrate/#readme
Edited to add: http://laserdiscvault(dot)com/
CDN calls for jQuery and the jQuery Migrate script.. This is both the changes Design75 and I submitted to github with the addition of the jQuery Migrate script.. Lightbox works with no issues..
-
Re: Image Display Size Restriction
haha , you make one little change in code and get almost 2,5 pages of reading in return :laugh:.
The reason I did not change the jquery version, is because I wanted to make this first change as easy as possible. I know ZLB runs fine on JQ 1.8.4 , and probably later versions. My knowledge of Jquery is only limited. I wanted to integrate the latest version of slimbox, but since I do not have enough knowledge of Jquery, and a limited amount of time, I choose to only remove the echo command and rename the script-name to start with jscript_ .
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
Design75
haha , you make one little change in code and get almost 2,5 pages of reading in return :laugh:.
The reason I did not change the jquery version, is because I wanted to make this first change as easy as possible. I know ZLB runs fine on JQ 1.8.4 , and probably later versions. My knowledge of Jquery is only limited. I wanted to integrate the latest version of slimbox, but since I do not have enough knowledge of Jquery, and a limited amount of time, I choose to only remove the echo command and rename the script-name to start with jscript_ .
has happened this way a lot over the years.
I'll go ahead and update to Slimbox 2.05 then we can safely load jQuery latest.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
Edited to add: http://laserdiscvault(dot)com/
CDN calls for jQuery and the jQuery Migrate script.. This is both the changes Design75 and I submitted to github with the addition of the jQuery Migrate script.. Lightbox works with no issues..
I see that you are using migrate 1.0 on this site, and maybe that encompasses jQuery 1.4 with no issues.
I just saw on the GH page that the latest version (1.2.1) only covers jQuery 1.6.4
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
niestudio
I see that you are using migrate 1.0 on this site, and maybe that encompasses jQuery 1.4 with no issues.
I just saw on the GH page that the latest version (1.2.1) only covers jQuery 1.6.4
I'm sure I read elsewhere it will work with older versions too.. That's something I can EASILY and quickly test..
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
Design75
haha , you make one little change in code and get almost 2,5 pages of reading in return :laugh:.
should we move this part of the discussion to github instead since this is not helpful for someone lookin for basic ZLB help?
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
niestudio
I see that you are using migrate 1.0 on this site, and maybe that encompasses jQuery 1.4 with no issues.
I just saw on the GH page that the latest version (1.2.1) only covers jQuery 1.6.4
Quote:
Originally Posted by
DivaVocals
I'm sure I read elsewhere it will work with older versions too.. That's something I can EASILY and quickly test..
Done.. take a look now.. Update the jQuery and jQuery Migrate versions.. Lightbox still works like a champ..
Quote:
Originally Posted by
niestudio
should we move this part of the discussion to github instead since this is not helpful for someone lookin for basic ZLB help?
I would agree with this move..
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
I would agree with this move..
I would also agree
-
Re: Image Display Size Restriction
Hello, I am very new to zen cart. I have tried to install the lightbox addon (version: 1.6.4b_1.5). However, it was not successful. I have the following questions. in the installation file:
4.Rename the following folders to match your template folder name.
includes\languages\english\extra_definitions\YOUR-TEMPLATE-FOLDER
includes\modules\YOUR-TEMPLATE-FOLDER
includes\templates\YOUR-TEMPLATE-FOLDER
I am wondering the "YOUR-TEMPLATE-FOLDER" is it the folder at Admin-->Tools-->Template Selection. In my case, it is theme377. Please help.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
DivaVocals
Done.. take a look now.. Update the jQuery and jQuery Migrate versions.. Lightbox still works like a champ..
I would agree with this move..
Off topic I know but must ask before you guys working on the ZLB update slip away into the ether.
Is there a zencart forum page, existing or coming any time soon, providing instructions on how to load/use jQuery Migrate with zencart.
Thanks
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
aszybdean
Hello, I am very new to zen cart. I have tried to install the lightbox addon (version: 1.6.4b_1.5). However, it was not successful. I have the following questions. in the installation file:
4.Rename the following folders to match your template folder name.
includes\languages\english\extra_definitions\YOUR-TEMPLATE-FOLDER
includes\modules\YOUR-TEMPLATE-FOLDER
includes\templates\YOUR-TEMPLATE-FOLDER
I am wondering the "YOUR-TEMPLATE-FOLDER" is it the folder at Admin-->Tools-->Template Selection. In my case, it is theme377. Please help.
Welcome to ZenCart (ZC). Pretty decent start with your first post. Please in the future identify what "didn't work". But, to answer your question, yes it will be a directory that is theme377 or named very close to that. One way to tell what the name should be is to try to follow that path (substituting the desired (typically active) template name) and see what it leads you to. When you get there, if you see a file that is named like what you want to put there, you probably will need to merge the two or at least should make sure you won't lose something important with the new file.
Use the tools you have and you'll get through: a good ftp program, a head on your shoulders, knowing where your various logs are, a good merge program, backup, backup, backup, help where you can and give detailed information when asking for help, should get there.
-
Re: Image Display Size Restriction
Quote:
Originally Posted by
dw08gm
Off topic I know but must ask before you guys working on the ZLB update slip away into the ether.
Is there a zencart forum page, existing or coming any time soon, providing instructions on how to load/use jQuery Migrate with zencart.
Thanks
Nothing really different than the last two pages. :P I think/thought there was something about instructions at the following post. http://www.zen-cart.com/showthread.p...03#post1226003
I could be wrong.