Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to add option that would disable modal functionality. When i have youtube video playing and open pic in lightbox , video disappears and restarts on lightbox close. I would like to continue watching video while looking at pics.
Thx.
Comments
Comment #1
stella CreditAttribution: stella commentedThat's nothing to do with "modal" functionality. It's necessary to disable videos while viewing anything in a lightbox as in some browsers the embedded video will always appear above the lightbox display regardless of the settings. The same thing can also happen with form selects.
So I'm afraid, I'm marking this as by design.
Cheers,
Stella
Comment #2
nbchip CreditAttribution: nbchip commentedOK, I understand... so u do that with
Lightbox.toggleSelectsFlash('hide');
...now what would be best approach to disable this only for some pages (actually need this just for front page)?
I wouldnt like to change anything in lightbox.js...
thx.
Comment #3
stella CreditAttribution: stella commentedYou would need to modify lightbox.js, or create your own copy of the file which you load on those specific pages instead.
Cheers
Stella
Comment #4
nbchip CreditAttribution: nbchip commentedCan u help pointing where in the lightbox2.module should i check if it is front page so i can load my modified .js file?
thx.
Comment #5
stella CreditAttribution: stella commentedTake a look at
lightbox2_init()
andlightbox2_add_files()
.Comment #6
nbchip CreditAttribution: nbchip commentedwell in
lightbox2_add_files()
i checked if its front withif (strlen($_SERVER['REQUEST_URI']) < 3) {
if there is some better way to check that, let me know.
Thx.
Comment #7
stella CreditAttribution: stella commentedThat's the wrong way to do it and may not necessarily work on all browsers, try this instead:
See http://api.drupal.org/api/function/drupal_match_path for more info.
Comment #8
nbchip CreditAttribution: nbchip commentedIm on Drupal 5, and there this function doesnt exist.
Comment #9
stella CreditAttribution: stella commentedAh, yes of course - well then look at
lightbox2_exclude_these_paths()
to see if you can reuse any of the code there.Comment #10
nbchip CreditAttribution: nbchip commentedIt is not such an important feature so i will not complicate more and will stick with $_SERVER['REQUEST_URI']. It works for now. Thx for fast responses!