app->sessionVar . "_slideshow_mode"; $modeCookie = isset($_COOKIE[$cookieName]) ? $_COOKIE[$cookieName] : null; if (isset($mode)) { if ($modeCookie != $mode) { $curCookieParams = session_get_cookie_params(); setcookie( $cookieName, $mode, time()+60*60*24*365, '/', $curCookieParams['domain'], isHttpsConnection() ); } } else { if (isset($modeCookie)) { $mode = $modeCookie; } } // Hack check if (empty($gallery->session->albumName) && $gallery->app->gallery_slideshow_type == "off") { header("Location: " . makeAlbumHeaderUrl()); return; } $albumName = $gallery->session->albumName; if (!empty($albumName)) { if (!$gallery->user->canReadAlbum($gallery->album)) { header("Location: " . makeAlbumHeaderUrl()); return; } $album = $gallery->album; if (!$album->isLoaded()) { header("Location: " . makeAlbumHeaderUrl()); return; } if ($album->fields["slideshow_type"] == "off") { header("Location: " . makeAlbumHeaderUrl($gallery->session->albumName)); return; } } // common initialization if (empty($albumName)) { $album = null; $recursive = true; $number = (int)$gallery->app->gallery_slideshow_length; $random = ($gallery->app->gallery_slideshow_type == "random"); $loop = ($gallery->app->gallery_slideshow_loop == "yes"); $borderColor = $gallery->app->default["bordercolor"]; $borderwidth = $gallery->app->default["border"]; } else { $recursive = ($album->fields["slideshow_recursive"] == "yes"); $loop = ($album->fields["slideshow_loop"] == "yes"); $random = ($album->fields["slideshow_type"] == "random"); $number = (int)$album->fields["slideshow_length"]; $borderColor = $gallery->album->fields["bordercolor"]; $borderwidth = $gallery->album->fields["border"]; $bgcolor = $gallery->album->fields['bgcolor']; } $playIconText = getIconText('slideshow/1rightarrow.gif', gTranslate('core', "Play")); $stopIconText = getIconText('slideshow/play_stop.gif', gTranslate('core', "Stop")); $normalSizeIconText = getIconText('window_nofullscreen.gif', gTranslate('core', "Normal size")); $fullSizeIconText = getIconText('window_fullscreen.gif', gTranslate('core', "Full size")); $forwardIconText = getIconText('slideshow/1rightarrow.gif', gTranslate('core', "Forward direction")); $backwardIconText = getIconText('slideshow/1leftarrow.gif', gTranslate('core', "Reverse direction")); $delayIconText = getIcontext('history.gif', gTranslate('core', "Delay")); $loopIconText = getIcontext('reload.gif', gTranslate('core', "Loop:")); // in offline mode, only high is available, because it's the only // one where the photos can be spidered... if (file_exists(dirname(__FILE__) . "/java/GalleryRemoteAppletMini.jar") && file_exists(dirname(__FILE__) . "/java/GalleryRemoteHTTPClient.jar") && ! $gallery->session->offline) { $modes["applet"] = gTranslate('core', "Fullscreen applet"); } $modes["high"] = gTranslate('core', "Modern browsers"); if (!empty($albumName) && !$gallery->session->offline) { $modes["low"] = gTranslate('core', "Compatible but limited"); } if (!isset($mode) || !isset($modes[$mode])) { $mode = isset($modes[$gallery->app->slideshowMode]) ? $gallery->app->slideshowMode : "high"; } include(dirname(__FILE__) . "/includes/slideshow/$mode.inc"); slideshow_initialize(); if (!$GALLERY_EMBEDDED_INSIDE) { doctype(); ?> <?php echo $title; ?> album->fields["linkcolor"]) || !empty($gallery->album->fields["bgcolor"]) || !empty($gallery->album->fields["textcolor"])) { echo "\n"; } } ?> app->photoAlbumURL."/images"; #-- breadcrumb text --- $breadcrumb["text"] = @returnToPathArray($gallery->album, true, true); $breadcrumb["bordercolor"] = $borderColor; $adminbox['commands'] = ''; // todo: on the client, prevent old browsers from using High, and remove High from the bar if (!$gallery->session->offline) { foreach ($modes as $m => $mt) { $url = makeGalleryUrl('slideshow.php',array('mode' => $m, "set_albumName" => $gallery->session->albumName)); if ($m != $mode) { $adminbox['commands'] .= " [" .$modes[$m] ."]"; } else { $adminbox['commands'] .= " " .$modes[$m]; } } } $adminbox["text"] = gTranslate('core', "Slide Show"); $adminbox["bordercolor"] = $borderColor; $navigator["fullWidth"] = '100'; $navigator["widthUnits"] = '%'; includeLayout('navtablebegin.inc'); includeLayout('adminbox.inc'); includeLayout('navtablemiddle.inc'); includeLayout('breadcrumb.inc'); includeLayout('navtablemiddle.inc'); slideshow_controlPanel(); includeLayout('navtableend.inc'); echo "\n
"; slideshow_image(); echo languageSelector(); includeHtmlWrap("slideshow.footer"); if (!$GALLERY_EMBEDDED_INSIDE) { ?>