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

stella’s picture

Status: Active » Closed (works as designed)

That'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

nbchip’s picture

OK, 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.

stella’s picture

You would need to modify lightbox.js, or create your own copy of the file which you load on those specific pages instead.

Cheers
Stella

nbchip’s picture

Can 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.

stella’s picture

Take a look at lightbox2_init() and lightbox2_add_files().

nbchip’s picture

well in lightbox2_add_files() i checked if its front with
if (strlen($_SERVER['REQUEST_URI']) < 3) {
if there is some better way to check that, let me know.
Thx.

stella’s picture

That's the wrong way to do it and may not necessarily work on all browsers, try this instead:

if (drupal_match_path($_GET['q'], "<front>")) {

See http://api.drupal.org/api/function/drupal_match_path for more info.

nbchip’s picture

Im on Drupal 5, and there this function doesnt exist.

stella’s picture

Ah, yes of course - well then look at lightbox2_exclude_these_paths() to see if you can reuse any of the code there.

nbchip’s picture

It 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!