function zpArdoise_printRandomImages($number = 5, $class = NULL, $option = 'all', $rootAlbum = '', $width = NULL, $height = NULL, $crop = NULL, $fullimagelink = false, $a_class = NULL) { if (is_null($crop) && is_null($width) && is_null($height)) { $crop = 2; } else { if (is_null($width)) { $width = 85; } if (is_null($height)) { $height = 85; } if (is_null($crop)) { $crop = 1; } else { $crop = (int) $crop && true; } } if (!empty($class)) { $class = ' class="' . $class . '"'; } echo "<ul" . $class . ">"; for ($i = 1; $i <= $number; $i++) { switch ($option) { case "all": $randomImage = getRandomImages(); break; case "album": $randomImage = getRandomImagesAlbum($rootAlbum); break; } if (is_object($randomImage) && $randomImage->exists) { echo "<li>\n"; if ($fullimagelink) { $aa_class = ' class="' . $a_class . '"'; $randomImageURL = $randomImage->getFullimageURL(); } else { $aa_class = NULL; $randomImageURL = $randomImage->getLink(); } echo '<a href="' . html_encode($randomImageURL) . '"' . $aa_class . ' title="' . html_encode($randomImage->getTitle()) . '">'; switch ($crop) { case 0: $html = "<img src=\"" . html_encode(pathurlencode($randomImage->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n"; break; case 1: $html = "<img src=\"" . html_encode(pathurlencode($randomImage->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, TRUE))) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" width=\"" . $width . "\" height=\"" . $height . "\" />\n"; break; case 2: $html = "<img src=\"" . html_encode(pathurlencode($randomImage->getThumb())) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n"; break; } echo zp_apply_filter('custom_image_html', $html, false); echo "</a>"; echo "</li>\n"; } else { break; } } echo "</ul>"; }
<div id="wrapnav"> <div id="navbar"> <span><?php if ($_zp_gallery->getWebsiteURL()) { printHomeLink('', ' | '); } printGalleryTitle(); ?> </span> </div> </div> <!-- wrapnav --> </div> <!-- header --> <!-- The Image --> <?php $randomImage = getRandomImages($imageofday = getOption('effervescence_daily_album_image')); if ($randomImage) { makeImageCurrent($randomImage); $size = floor(getOption('image_size') * $imagereduction); $size_a = getSizeDefaultImage($size); $s = $size_a[0] + 22; $wide = " style=\"width:" . $s . "px;"; $s = $size_a[1] + 72; $high = " height:" . $s . "px;\""; } else { $wide = " style=\"width:332px;"; $high = " height:162px;\""; } if ($imageofday) { ?> <p align="center">
</div> <!-- gallerytitle --> <!-- Crumb Trail Navigation --> <div id="wrapnav"> <div id="navbar"> <span><?php printHomeLink('', ' | '); printGalleryIndexURL(' | '); ?> </span> </div> </div> <!-- wrapnav --> </div> <!-- header --> <!-- Random Image --> <?php printHeadingImage(getRandomImages(getThemeOption('effervescence_daily_album_image'))); ?> <!-- Wrap Main Body --> <div id="content"> <div id="main"> <!-- Album List --> <ul id="albums"> <?php $firstAlbum = null; $lastAlbum = null; while (next_album()) { if (is_null($firstAlbum)) { $lastAlbum = albumNumber(); $firstAlbum = $lastAlbum;
$prevText = "<div id='image-nav-prev' class='image-nav-scroll opa60'><img src='{$_zp_themeroot}/resources/images/arrow_up.png' width='16' height='16'/></div>"; $nextText = "<div id='image-nav-next' class='image-nav-scroll opa60 {$cls}'><img src='{$_zp_themeroot}/resources/images/arrow_down.png' width='16' height='16'/></div>"; if (!in_context(ZP_SEARCH)) { $_zp_current_search = new SearchEngine(); set_context(ZP_SEARCH); } $prevNext = AlbumUtil::printNavigation($prevText, $nextText, false, 7, true); ?> <div class="nav-cell filler end"><span> </span></div> </div> <div style="padding-left: 1px;"> <div id="album-menu" class="opa60"> <div id="album-thumb"> <img src="<?php echo getRandomImages()->getCustomImage(NULL, 192, 48, 192, 48, NULL, null, false); ?> " width="195" height="48"/> </div> </div> <div id="search-tabs" class="shadow"> <span class="active opa60"><?php echo gettext('Images'); ?> </span> <span class="opa20"><?php echo gettext('Albums'); ?> </span> <span class="opa20"><?php
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/print_album_menu.php'; require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_album_statistics.php'; setOption('flag_thumbnail_use_text', true, false); setOption('flag_thumbnail_new_text', '<i title="' . gettext("New Image") . '" class="fa fa-flag fa-fw"></i>', false); setOption('flag_thumbnail_geodata_text', '<i title="' . gettext("Geotagged") . '" class="fa fa-map-marker fa-fw"></i>', false); setOption('flag_thumbnail_locked_text', '<i title="' . gettext("Protected") . '" class="fa fa-lock fa-fw"></i>', false); setOption('flag_thumbnail_unpublished_text', '<span title="' . gettext("Unpublished") . '" class="fa-stack"><i class="fa fa-circle fa-stack-1x fa-fw"></i><i class="fa fa-exclamation-circle fa-stack-1x fa-fw red"></i></span>', false); $quickmenu = '<div id="quickmenu">'; $quickmenu .= '<a id="nav-icon" class="quick-menu menu-btn"><i class="fa fa-bars fa-lg"></i></a>'; $quickmenu .= '<a id="search-icon" class="quick-menu" href="' . getCustomPageURL('archive') . '" title="' . gettext('Archive/Search') . '"><i class="fa fa-search fa-lg"></i></a>'; $quickmenu .= '<a id="scrollup" class="quick-menu scrollup" title="' . gettext('Scroll to top') . '"><i class="fa fa-chevron-circle-up fa-lg"></i></a>'; $quickmenu .= '</div>'; if ($_zp_current_album && $_zp_gallery_page != 'favorites.php' && $_zp_gallery_page != '404.php') { $randomImage = getRandomImagesAlbum($_zp_current_album); } else { $randomImage = getRandomImages(); } if (is_object($randomImage) && $randomImage->exists) { $bg = html_encode(pathurlencode($randomImage->getCustomImage(1200, null, null, null, null, null, null, true))); } else { $bg = ''; } ?> <!DOCTYPE html> <html> <head> <meta charset="<?php echo LOCAL_CHARSET; ?> " />
/** * Puts up random image thumbs from the gallery * * @param int $number how many images * @param string $class optional class * @param string $option what you want selected: all for all images, album for selected ones from an album * @param mixed $rootAlbum optional album object/folder from which to get the image. * @param integer $width the width/cropwidth of the thumb if crop=true else $width is longest size. * @param integer $height the height/cropheight of the thumb if crop=true else not used * @param bool $crop 'true' (default) if the thumb should be cropped, 'false' if not * @param bool $fullimagelink 'false' (default) for the image page link , 'true' for the unprotected full image link (to use Colorbox for example) */ function printRandomImages($number = 5, $class = null, $option = 'all', $rootAlbum = '', $width = NULL, $height = NULL, $crop = NULL, $fullimagelink = false) { if (is_null($crop) && is_null($width) && is_null($height)) { $crop = 2; } else { if (is_null($width)) { $width = 85; } if (is_null($height)) { $height = 85; } if (is_null($crop)) { $crop = 1; } else { $crop = (int) $crop && true; } } if (!empty($class)) { $class = ' class="' . $class . '"'; } echo "<ul" . $class . ">"; for ($i = 1; $i <= $number; $i++) { switch ($option) { case "all": $randomImage = getRandomImages(); break; case "album": $randomImage = getRandomImagesAlbum($rootAlbum); break; } if (is_object($randomImage) && $randomImage->exists) { echo "<li>\n"; if ($fullimagelink) { $randomImageURL = $randomImage->getFullimageURL(); } else { $randomImageURL = $randomImage->getLink(); } echo '<a href="' . html_encode($randomImageURL) . '" title="' . sprintf(gettext('View image: %s'), html_encode($randomImage->getTitle())) . '">'; switch ($crop) { case 0: $sizes = getSizeCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, $randomImage); $html = '<img src="' . html_encode(pathurlencode($randomImage->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . html_encode($randomImage->getTitle()) . '" />' . "\n"; break; case 1: $sizes = getSizeCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, $randomImage); $html = '<img src="' . html_encode(pathurlencode($randomImage->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, TRUE))) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . html_encode($randomImage->getTitle()) . '" />' . "\n"; break; case 2: $sizes = getSizeDefaultThumb($randomImage); //$html = '<img src="' . html_encode(pathurlencode($randomImage->getThumb())) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . html_encode($randomImage->getTitle()) . '" />' . "\n"; $html = $randomImage->filename . " (" . $randomImage->album->name . ")"; break; } echo zp_apply_filter('custom_image_html', $html, false); echo "</a>"; echo "</li>\n"; } else { break; } } echo "</ul>"; }
<!-- Crumb Trail Navigation --> <div id="wrapnav"> <div id="navbar"> <span><?php printHomeLink('', ' | '); echo empty($mainsite) ? ' ' : $mainsite; ?> </span> </div> </div> <!-- wrapnav --> </div> <!-- header --> <!-- The Image --> <?php makeImageCurrent(getRandomImages(true)); $size = floor(getOption('image_size') * $imagereduction); $s = getDefaultWidth($size) + 22; $wide = " style=\"width:" . $s . "px;"; $s = getDefaultHeight($size) + 72; $high = " height:" . $s . "px;\""; ?> <div id="image" <?php echo $wide . $high; ?> > <p align="center"> <?php echo gettext('Picture of the day'); ?> </p>
?> "><?php echo getGalleryTitle(); ?> </a></span> <?php printNewsIndexURL(gettext("News"), " | "); printCurrentNewsCategory(" | " . gettext('Category') . " - "); printNewsTitle(" | "); ?> </div> </div> <!-- wrapnav --> <!-- Random Image --> <?php printHeadingImage(getRandomImages()); ?> </div> <!-- header --> <!-- Wrap Main Body --> <div id="content"> <small> </small> <div id="main2"> <div id="content-left"> <?php if (!checkForPassword()) { // single news article if (is_NewsArticle()) { ?>
$zpmin_functionoption = 'toprated'; break; case "random-daily": $zpmin_albumorimage = ''; $zpmin_functionoption = 'daily'; break; } ?> <?php if ($zpmin_albumorimage == 'image') { printImageStatistic(1, $zpmin_functionoption, '', true, true, false, 40, '', 535, 535, false); } else { if ($zpmin_albumorimage == 'album') { printAlbumStatistic(1, $zpmin_functionoption, true, true, false, 40, '', 535, 535, false); } else { $randomImage = getRandomImages($zpmin_functionoption); if (is_object($randomImage) && $randomImage->exists) { $randomImageURL = html_encode($randomImage->getLink()); echo '<a href="' . $randomImageURL . '" title="' . sprintf(gettext('View image: %s'), html_encode($randomImage->getTitle())) . '">'; $html = "<img src=\"" . html_encode($randomImage->getCustomImage(535, NULL, NULL, NULL, NULL, NULL, NULL, TRUE)) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n"; echo zp_apply_filter('custom_image_html', $html, false); echo "</a>"; echo '<h3><a href="' . $randomImageURL . '" title="' . sprintf(gettext('View image: %s'), html_encode($randomImage->getTitle())) . '">' . html_encode($randomImage->getTitle()) . '</a></h3>'; echo "<p>" . zpFormattedDate(getOption('date_format'), strtotime($randomImage->getDateTime())) . "</p>"; } else { echo gettext('No Images Exist...'); } } } ?> <div id="enter">
/** * Puts up random image thumbs from the gallery * * @param int $number how many images * @param string $class optional class * @param string $option what you want selected: all for all images, album for selected ones from an album * @param string $rootAlbum optional album from which to get the images * @param integer $width the width/cropwidth of the thumb if crop=true else $width is longest size. * @param integer $height the height/cropheight of the thumb if crop=true else not used * @param bool $crop 'true' (default) if the thumb should be cropped, 'false' if not */ function printRandomImages($number = 5, $class = null, $option = 'all', $rootAlbum = '', $width = 100, $height = 100, $crop = true) { if (!is_null($class)) { $class = ' class="' . $class . '"'; } echo "<ul" . $class . ">"; for ($i = 1; $i <= $number; $i++) { echo "<li>\n"; switch ($option) { case "all": $randomImage = getRandomImages(); break; case "album": $randomImage = getRandomImagesAlbum($rootAlbum); break; } if (is_object($randomImage) && $randomImage->exists) { $randomImageURL = html_encode(getURL($randomImage)); echo '<a href="' . $randomImageURL . '" title="' . sprintf(gettext('View image: %s'), html_encode($randomImage->getTitle())) . '">'; if ($crop) { $html = "<img src=\"" . html_encode($randomImage->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, TRUE)) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n"; } else { $html = "<img src=\"" . html_encode($randomImage->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE)) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n"; } echo zp_apply_filter('custom_image_html', $html, false); echo "</a>"; } echo "</li>\n"; } echo "</ul>"; }