private static function outputSlideshow() { $stdout = ""; // ------------------- // -- Construct configuration parameters // ------------------- if (preg_match("~.*/" . PHOTO_URI . "/(.*)/index.php\$~U", $_SERVER["PHP_SELF"], $tmp)) { self::$subdir = PHOTO_URI . "/" . $tmp[1]; } else { self::$subdir = PHOTO_URI . "/nordita"; } self::$imgpath = PATH_PHOTOS . "/" . $GLOBALS["documentClass"]->getPageCrumb(); if (!file_exists(INCLEVEL . self::$imgpath)) { return "<p style='color:#f2bcbc'><strong>»</strong> <em>No images were found!</em></p>\r\n"; } self::$filenames = self::collectFilenames(); self::$numberOfImages = count(self::$filenames); if (self::$numberOfImages == 0) { return "<p style='color:#f2bcbc'><strong>»</strong> <em>No images were found!</em></p>\r\n"; } if (isset(self::$thumbWidth)) { self::$thumbsHorizontally = min(self::$thumbsHorizontally, floor(self::$thumbs_table_width / self::$thumbWidth)); } else { self::$thumbHeight = 64; self::$thumbWidth = 64; } self::$thumbsMaxDisplayed = self::$thumbsVertically * self::$thumbsHorizontally; self::$copyright = "(c)" . " " . (!empty(self::$copyright) ? self::$copyright : "2001-" . date("Y")) . " " . (!empty(self::$photographer) ? self::$photographer : "Nordita") . ""; functions::gpc_declare_input("tum", "false", true); self::$showThumbnails = $GLOBALS["tum"]; functions::gpc_declare_input("nr", 1); self::$nr = $GLOBALS["nr"] < 0 || $GLOBALS["nr"] > self::$numberOfImages ? 1 : $GLOBALS["nr"]; // ------------------- // -- Output slideshow // ------------------- $stdout .= "<div id='slideshow'>\r\n\r\n"; if (self::$enableVerboseDisplay) { if (self::$showThumbnails && !empty(self::$eventDate)) { $stdout .= "<h3>" . self::$eventDate . "</h3>\r\n\r\n"; } if (self::$showThumbnails && !empty(self::$introText)) { $stdout .= "<p><strong>" . self::$introText . "</strong></p>\r\n"; } if (self::$showThumbnails && !empty(self::$photographer)) { $stdout .= "<p><i>Photos</i>: " . self::$copyright . ".</p>\r\n"; } } if (self::$showThumbnails) { $stdout .= self::outputThumbnails(); } else { $stdout .= self::outputOneImage(); } $stdout .= "</div> <!-- end slideshow -->\r\n\r\n"; return $stdout; }