Forums

[Plugin: Shadowbox JS] Little Problem working with Lightbox Plus (11 posts)

  1. wjm
    Member
    Posted 2 years ago #

    Hi,
    I have configured both plugins to work correctly, but there is a little problem remaining,
    I am loading images with LigthBox Plus, and videos with Shadowbox-JS.
    the issue only happens when i click on images in the same page that im loading videos,
    i can see the images, but when i close the image or click outside of it, it the blury background of Shadowbox will be there, so i need to click again.
    Is there a way to solve this issue,
    i am posting it here and no in the Lightbox plus forum, since i can tell because of the color of the layers that its shadowbox's
    I'm using Lightbox Plus: 1.6.9.7
    and Shadowbox 3.0.3.2

    thanks in advanced, and cheers up for the great script!

  2. Dan Zappone
    Member
    Posted 2 years ago #

    Can you point me to an example page?

  3. wjm
    Member
    Posted 2 years ago #

    do you have an email address so i can email you the files?
    the site is not live yet.

    Shadowbox is displaying the
    #sb-overlay
    div,

  4. wjm
    Member
    Posted 2 years ago #

    update: the problem occurs even if you are not using shadowbox in that page, as the shadowbox files are loaded in every page.

  5. HAMMADHASSAN
    Member
    Posted 2 years ago #

  6. Matt Martz
    Member
    Posted 2 years ago #

    Shadowbox works as a drop in replacement for lightbox. SO if it sees rel="shadowbox" or rel="lightbox" it is going to try and shadowbox it. The smart loading feature checks to see if there are links that contain either of those rel attributes and if so places shadowbox on the page.

    There is no real way to fix this other than not using 2 plugins that do the same thing.

  7. wjm
    Member
    Posted 2 years ago #

    hi sivel.
    i have modified

    cache.js
    changed
    var relAttr=/^(light|shadow)box/i
    for
    var relAttr=/^(shadow)box/i

    and in core.js
    changed
    galleryName=/^(light|shadow)box\[(.*?)\]/i,
    for
    galleryName=/^(shadow)box\[(.*?)\]/i,

    clicked "update" in the settings page, and it worked!

    i think this could be added as an option in the settings page.
    something like.
    * Make Shadowbox-js a drop in replacement for lightbox? [checkbox}

    thanks sivel for mentioning that, great plugin as well as lightbox-plus.

  8. wjm
    Member
    Posted 2 years ago #

    and to avoid loading unnecessary files, make the following changes in inc/frontend.php

    //$box_rel_pattern = '/\ rel=(\'|")(.*?)(shadow|light|no)box(.*?)(\'|")/i';
    $box_rel_pattern = '/\ rel=(\'|")(.*?)(shadow|no)box(.*?)(\'|")/i';
    //$slbox_rel_pattern = '/\ rel=(\'|")(.*?)(shadow|light)box(.*?)(\'|")/i';
    $slbox_rel_pattern = '/\ rel=(\'|")(.*?)(shadow)box(.*?)(\'|")/i';

    still the css files are loaded when not needed.

  9. alessandrodias
    Member
    Posted 1 year ago #

    Hi Wjm, did you find a answer ou solution for your question? Can't figure out what to do. I have the same issue here. Shadowbox loading at the same time of lightbox when trying to load images. But working fine shadowbox with video. Any hints? thanks

  10. Matt Martz
    Member
    Posted 1 year ago #

    The lingering question is why? Why would you want to do this? It doesn't make sense to use 2 different plugins that do the exact same things. Actually shadowbox does more.

  11. alessandrodias
    Member
    Posted 1 year ago #

    My template has built-in lightbox/prettybox that I can't figure out how to turn off. I would love use only shadowbox. Until there would be nice be able to disable the function. Seems silly but it's the solution I can think now.

Topic Closed

This topic has been closed to new replies.

About this Topic