Thread: Zen Colorbox

Results 1 to 10 of 350

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,835
    Plugin Contributions
    31

    Default Re: Zen Colorbox

    Regarding possible future changes to this plugin.
    It is not language-friendly as implemented.
    I would suggest that the slideshow start/stop texts are moved out of the admin and into a language file along with new constants to use with the jscript override options in includes/classes/zen_colorbox/options.php
    for these texts.

    slideshowStart: "start slideshow",
    slideshowStop: "stop slideshow",
    current: "image {current} of {total}",
    previous: "previous",
    next: "next",
    close: "close",
    xhrError: "This content failed to load.",
    imgError: "This image failed to load.",

    documentation
    The readme is a bit minimal.
    I would add links to this thread and a much more prominent mention that the original authors page has a great deal of useful information there.
    A note to point out that the jscript plugin offers many options which can be overridden by placing the same parameters/options in this file:
    includes/classes/zen_colorbox/options.php
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  2. #2
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    Using zen colorbox 2.x with Responsive Sheffield Blue 2.0

    This Picaflor Azul template uses earlier version of colorbox and there are no options to configure on the admin panel. I was unsuccessful updating to Colorbox 2.x. I tried dropping existing Colorbox table from db but template simply put them back.

    Eventually, discovered that the template installer: admin/includes/installers/responsive_sheffield_blue/2.0 has a section of code near the bottom of the file that installs the (earlier ver) of Colorbox. I removed that entire section of code then installed Colorbox 2 easy peezy using only the mod files. I did this AFTER I had dropped the db tables, so I don't know if it was necessary part of my success or not.

    Other Picaflor templates such as Winchester Black, Winchester Responsive have similar set up so I presume this would work for them too. Other Picaflor templates like Westminster New use Lightbox.

    Posted just in case anyone else was interested.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Zen Colorbox

    Quote Originally Posted by torvista View Post
    Regarding making the lightbox responsive and post 224
    https://www.zen-cart.com/showthread....21#post1339321

    If the lightbox is opened, then the browser window resized, the lightbox is resized but not the contained image.
    If the browser window is resized and then the lightbox is opened, the lightbox and contained image is resized.

    I think in the real world that is fine for me.

    The previous post about commenting out the 90% stops this from resizing at all, so I'm not sure about that conclusion.
    Having been looking over the code, testing options and further researching outside of the provided documentation (also referenced below), it is apparent that a solution has not been incorporated by the original author, but I am working towards one that provides a better result for the "zoom" possibility and would also improve response when changing the orientation of a device. The previous suggested methods (defining both width AND height) caused the issue I was seeing that on zoom, it was possible that the image "window" height would become so small that there would be no image viewable. The software (as described in the author's instruction) will auto-calculate the height if just the width (or innerWidth) is provided. Regardless, a side effect was that the usage of percentage for either causes the "border" of the colorbox to expand to the edge of the screen and then again shrink when the next image is chosen. This is appears as an unexplained change and doesn't look good. To that end an internal code modification has been identified (most effective is from issue 158 of the github repo for the colorbox software) that will resize the image and colorbox together when such function is called. Some additional work is being done to support the "zoom" (resize without change in window dimensions) to allow a current image to remain at its size while zooming in/out. When the window dimensions change (desktop shrink/expand the window) the entire box will be resized. This change is easy to implement (once all code parts are identified) in the non-minimized jquery code, and the jquery can again be minimized. Some series of this will be provided in the updated plugin with a version number indicating that there were modifications made away from the author's provided code. I'm thinking that perhaps that additional resize on window resize may be a feature controllable in the admin with the default of it auto-resizing on screen size change. Me personally, when I'm on a desktop and shrink the window to make space to see something else while the image is displayed, I'd rather the image stay the same size so it is easily viewable. But that isn't strictly responsive in nature. Perhaps an option switch could be added for the user to select/control that, but that is just another development feature to consider.

    Quote Originally Posted by torvista View Post
    Regarding possible future changes to this plugin.
    It is not language-friendly as implemented.
    I would suggest that the slideshow start/stop texts are moved out of the admin and into a language file along with new constants to use with the jscript override options in includes/classes/zen_colorbox/options.php
    for these texts.

    slideshowStart: "start slideshow",
    slideshowStop: "stop slideshow",
    current: "image {current} of {total}",
    previous: "previous",
    next: "next",
    close: "close",
    xhrError: "This content failed to load.",
    imgError: "This image failed to load.",

    documentation
    The readme is a bit minimal.
    I would add links to this thread and a much more prominent mention that the original authors page has a great deal of useful information there.
    A note to point out that the jscript plugin offers many options which can be overridden by placing the same parameters/options in this file:
    includes/classes/zen_colorbox/options.php
    Agree that more ZC standard and capability could be incorporated. Thank you for identifying areas of consideration. A lot was done to the files from the previous version to support html validation and some restructuring. Wanted to do more at the time, but also wanted to keep the functionality present and available.

    The reference to the author's instruction would likely reduce similar questions in the forum so yes also to be incorporated in the near future.

    Thank you.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,835
    Plugin Contributions
    31

    Default Re: Zen Colorbox

    Thank you.
    My apologies, I forgot to thank YOU for maintaining this mod and taking the time to wade through all those posts about responsive stuff.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Zen Colorbox

    Quote Originally Posted by torvista View Post
    My apologies, I forgot to thank YOU for maintaining this mod and taking the time to wade through all those posts about responsive stuff.
    Speaking of, though admin/includes/installers/zen_colorbox/2_1_3.php is not specifically necessary at the moment, care to take a look and provide feedback on the changes made thus far in the 2.1.3 branch: https://github.com/mc12345678/zen-colorbox/tree/v2.1.3

    I realize there may still be some "debate" to be had about the responsive response to screen size adjustment. The previous method remains available (requires code change at the moment). I'd be interested in suggestion of way forward: either admin switch or some level of code change by the end user. Ideally whatever seems to be "easiest" with understanding that more than likely once selected it would remain as it is until some level of upgrade (which potentially could be an issue for upgrades of the plugin and having to merge in those changes...)

    I am thinking that the responsive portion of code that is outside of the base javascript likely should be kept in a separate file to make that aspect of upgrade improved so that the base code would be modified as/if updated and the individual modifications to support say the above discussion kept separate.

    Anyways, more perspectives support finding a generally common ground.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    zc 1.5.5e live site, 1.5.5f test site. Responsive Sheffield Blue 2.0, many other mods. Php 5.6 live site, Php 7.1 and also 5.6 on wamptest site.

    I installed the most recent update of Zen Colorbox on my test site with no hiccups. I uninstalled earlier version that was merged into the RSB template, and removed the code from the template installer file that auto set up Colorbox (which has always worked for me as display in this template, except the admin/config options don't function). The updated install was flawless and everything works. I also installed on a second test site which was a clean zc 1.5.5f install with only clone template set up. Also flawless.

    I tried to replicate on live site and made a mess! Using the admin/tools/sql box I copied in the install sql for zc5 and it froze my site front end, back end, and my access to my cpanel. It all came back on after about 20 minutes. So I tried again, this time copying the install sql into phpMyAdmin.

    This line from the query was highlighted as an error (unexpected syntax near ?)

    Code:
    'Zen Colorbox (Update Check)', 'ZEN_COLORBOX_PLUGIN_CHECK', <?php echo SHOW_VERSION_UPDATE_IN_HEADER; ?>, 'Allow version checking if Zen Cart version checking enabled<br/><br/>If false, no version checking performed.<br/>If true, then only if Zen Cart version checking is on:', @cgi, 20, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '),
    I tried removing that line from the query and the rest installed. However the mod doesn't work. The config menu doesn't show up and the store images show up in pop up boxes and at a very slow speed. Thankfully I backed up my database and my files beforehand so I bailed.

    Apologies for the long winded lead up to my question:

    Is there a particular php setting that needs to be enabled for that phrase to be accepted. Or anything else spring to mind? (Some of my mods are older besides the template, but I see this phrase is also in the 1.3 sql install file).

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Zen Colorbox

    While there is an error in the problem line that was removed from the sql (see the last couple of pages where a suggested resolution was proposed and later incorporated into the above github version about which I'm waiting to hear back from anyone on).

    I don't see (or perhaps understand) why the auto-installer was not used and instead a manual query was executed.

    Add to this, would suggest that the uninstall query (found in YOUR_ADMIN/includes/installers/zen_colorbox) be executed at least twice based on the menu not appearing in the configurations section.

    If going to execute the manual install from within phpMyAdmin, then I would suggest replacing
    Code:
    <?php echo SHOW_VERSION_UPDATE_IN_HEADER; ?>
    With:
    Code:
    'true'
    This line also should not be executed by itself because it also includes a data reference to insert the configuration key in the colorbox configuration menu. Running by itself without first collecting that piece of data will associate it to a configuration menu having a gID=0 in the uri.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    Quote Originally Posted by mc12345678 View Post
    I don't see (or perhaps understand) why the auto-installer was not used and instead a manual query was executed.

    Add to this, would suggest that the uninstall query (found in YOUR_ADMIN/includes/installers/zen_colorbox) be executed at least twice based on the menu not appearing in the configurations section.

    If going to execute the manual install from within phpMyAdmin, then I would suggest replacing
    Code:
    <?php echo SHOW_VERSION_UPDATE_IN_HEADER; ?>
    With:
    Code:
    'true'
    This line also should not be executed by itself because it also includes a data reference to insert the configuration key in the colorbox configuration menu. Running by itself without first collecting that piece of data will associate it to a configuration menu having a gID=0 in the uri.
    Thanks very much. My first problem, probably, was that I misread the install info - I thought I needed to put in the sql statement to allow the auto-install to work. Which sounds really dumb now that I type it! I'll give your suggestions a go on a clean test install. I'm sure my live site is a little more challenging because old version Colorbox is incorporated throughout the template.

  9. #9
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    Quote Originally Posted by mc12345678 View Post
    ...
    I don't see (or perhaps understand) why the auto-installer was not used and instead a manual query was executed.

    Add to this, would suggest that the uninstall query (found in YOUR_ADMIN/includes/installers/zen_colorbox) be executed at least twice based on the menu not appearing in the configurations section...
    Just to confirm - you were quite right that running the sql install on top of the auto install appears to have been the culprit. I haven't gone live with the update yet but tried on test site 3 times, each successful:
    1. run uninstall twice. Check phpMyAdmin to make sure old tables are gone.
    2. load the new file set
    3. go into admin panel - shows Zen Colorbox loaded. Refresh screen to get config menu to appear.

    And because base template is Responsive Sheffield Blue 2.0 - edit out the old version Colorbox install code in admin/includes/installers/RSB/2.0, and load this revised file along with the Zen Colorbox files.

    Thanks for your help mc12345678

 

 

Similar Threads

  1. v155 Attribute image swapped for main image using Colorbox
    By soxophoneplayer in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Jun 2016, 02:34 PM
  2. Trying to fix inline code with colorbox...
    By toomanyknots in forum General Questions
    Replies: 2
    Last Post: 5 Apr 2015, 04:26 PM
  3. IH and Zen Colorbox vs Zen Lightbox?
    By Feznizzle in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 28 Jan 2015, 02:29 AM
  4. Lightbox OR Colorbox
    By Rizla in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 2 May 2014, 11:55 AM
  5. LightBox, SlimBox, ColorBox, which one is better?
    By waterbender in forum General Questions
    Replies: 0
    Last Post: 13 Aug 2013, 07:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg