Exemplo n.º 1
0
    function theme_content($map)
    {
        global $_zp_current_image, $points;
        ?>
		<!-- Colorbox section -->
		<div id="content">
			<div id="main">
				<div id="images">
					<?php 
        $points = array();
        $firstImage = null;
        $lastImage = null;
        while (next_image()) {
            // Colorbox does not do video
            if (is_null($firstImage)) {
                $lastImage = imageNumber();
                $firstImage = $lastImage;
            } else {
                $lastImage++;
            }
            ?>
						<div class="image">
							<div class="imagethumb">
								<?php 
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            $annotate = annotateImage();
            if (isImagePhoto()) {
                // colorbox is only for real images
                echo '<a href="' . html_encode(getDefaultSizedImage()) . '" class="thickbox"';
            } else {
                echo '<a href="' . html_encode(getImageURL()) . '"';
            }
            echo " title=\"" . $annotate . "\">\n";
            printImageThumb($annotate);
            echo "</a>";
            ?>
							</div>
						</div>
						<?php 
        }
        echo '<div class="clearage"></div>';
        if (!empty($points) && $map) {
            function map_callback($map)
            {
                global $points;
                foreach ($points as $coord) {
                    addGeoCoord($map, $coord);
                }
            }
            ?>
						<div id="map_link">
						<?php 
            printGoogleMap(NULL, NULL, NULL, 'album_page', 'map_callback');
            ?>
						</div>
						<?php 
        }
        @call_user_func('printSlideShowLink', NULL, 'text-align:center;');
        ?>
				</div><!-- images -->
			<?php 
        @call_user_func('printRating');
        ?>
			</div><!-- main -->
			<div class="clearage"></div>
		<?php 
        if (isset($firstImage)) {
            printNofM('Photo', $firstImage, $lastImage, getNumImages());
        }
        ?>
		</div><!-- content -->
		<?php 
    }
Exemplo n.º 2
0
    /**
     * Prints a link to call the slideshow (not shown if there are no images in the album)
     * To be used on album.php and image.php
     * A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.
     *
     * If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow
     * from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image.
     *
     * @param string $linktext Text for the link
     * @param string $linkstyle Style of Text for the link
     */
    function printSlideShowLink($linktext = NULL, $linkstyle = Null)
    {
        global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page;
        if (is_null($linktext)) {
            $linktext = gettext('View Slideshow');
        }
        if (empty($_GET['page'])) {
            $pagenr = 1;
        } else {
            $pagenr = sanitize_numeric($_GET['page']);
        }
        $slideshowhidden = '';
        $numberofimages = 0;
        if (in_context(ZP_SEARCH)) {
            $imagenumber = '';
            $imagefile = '';
            $albumnr = 0;
            $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow");
            $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
        } else {
            if (in_context(ZP_IMAGE)) {
                $imagenumber = imageNumber();
                $imagefile = $_zp_current_image->filename;
            } else {
                $imagenumber = '';
                $imagefile = '';
            }
            if (in_context(ZP_SEARCH_LINKED)) {
                $albumnr = -$_zp_current_album->getID();
                $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
            } else {
                $albumnr = $_zp_current_album->getID();
            }
            if ($albumnr) {
                $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFileName()) . '/' . _PAGE_ . '/slideshow', "index.php?p=slideshow&amp;album=" . urlencode($_zp_current_album->getFileName()));
            } else {
                $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow");
                $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />' . "\n" . '<input type="hidden" name="title" value="' . $_myFavorites->instance . '" />';
            }
        }
        $numberofimages = getNumImages();
        $option = getOption('slideshow_mode');
        switch ($option) {
            case 'jQuery':
                if ($numberofimages > 1) {
                    ?>
					<form name="slideshow_<?php 
                    echo $slideshow_instance;
                    ?>
" method="post"	action="<?php 
                    echo zp_apply_filter('getLink', $slideshowlink, 'slideshow.php', NULL);
                    ?>
">
						<?php 
                    echo $slideshowhidden;
                    ?>
						<input type="hidden" name="pagenr" value="<?php 
                    echo html_encode($pagenr);
                    ?>
" />
						<input type="hidden" name="albumid" value="<?php 
                    echo $albumnr;
                    ?>
" />
						<input type="hidden" name="numberofimages" value="<?php 
                    echo $numberofimages;
                    ?>
" />
						<input type="hidden" name="imagenumber" value="<?php 
                    echo $imagenumber;
                    ?>
" />
						<input type="hidden" name="imagefile" value="<?php 
                    echo html_encode($imagefile);
                    ?>
" />
						<?php 
                    if (!empty($linkstyle)) {
                        echo '<p style="' . $linkstyle . '">';
                    }
                    ?>
						<a class="slideshowlink" id="slideshowlink_<?php 
                    echo $slideshow_instance;
                    ?>
" 	href="javascript:document.slideshow_<?php 
                    echo $slideshow_instance;
                    ?>
.submit()"><?php 
                    echo $linktext;
                    ?>
</a>
						<?php 
                    if (!empty($linkstyle)) {
                        echo '</p>';
                    }
                    ?>
					</form>
					<?php 
                }
                $slideshow_instance++;
                break;
            case 'colorbox':
                $theme = $_zp_gallery->getCurrentTheme();
                $script = stripSuffix($_zp_gallery_page);
                if (!getOption('colorbox_' . $theme . '_' . $script)) {
                    setOptionDefault('colorbox_' . $theme . '_' . $script, 1);
                    $themes = $_zp_gallery->getThemes();
                    ?>
					<div class="errorbox"><?php 
                    printf(gettext('Slideshow not available because colorbox is not enabled on %1$s <em>%2$s</em> pages.'), $themes[$theme]['name'], $script);
                    ?>
</div>
					<?php 
                    break;
                }
                if ($numberofimages > 1) {
                    if (in_context(ZP_SEARCH_LINKED) && !in_context(ZP_ALBUM_LINKED) || in_context(ZP_SEARCH) && is_null($_zp_current_album)) {
                        $images = $_zp_current_search->getImages(0);
                    } else {
                        $images = $_zp_current_album->getImages(0);
                    }
                    $count = '';
                    ?>
					<script type="text/javascript">
						$(document).ready(function() {
							$("a[rel='slideshow']").colorbox({
								slideshow: true,
								loop: true,
								transition: '<?php 
                    echo getOption('slideshow_colorbox_transition');
                    ?>
',
								slideshowSpeed: <?php 
                    echo getOption('slideshow_speed');
                    ?>
,
								slideshowStart: '<?php 
                    echo gettext("start slideshow");
                    ?>
',
								slideshowStop: '<?php 
                    echo gettext("stop slideshow");
                    ?>
',
								previous: '<?php 
                    echo gettext("prev");
                    ?>
',
								next: '<?php 
                    echo gettext("next");
                    ?>
',
								close: '<?php 
                    echo gettext("close");
                    ?>
',
								current: '<?php 
                    printf(gettext('image %1$s of %2$s'), '{current}', '{total}');
                    ?>
',
								maxWidth: '98%',
								maxHeight: '98%',
								photo: true
							});
						});
					</script>
					<?php 
                    foreach ($images as $image) {
                        if (is_array($image)) {
                            $suffix = getSuffix($image['filename']);
                        } else {
                            $suffix = getSuffix($image);
                        }
                        $suffixes = array('jpg', 'jpeg', 'gif', 'png');
                        if (in_array($suffix, $suffixes)) {
                            $count++;
                            if (is_array($image)) {
                                $albobj = newAlbum($image['folder']);
                                $imgobj = newImage($albobj, $image['filename']);
                            } else {
                                $imgobj = newImage($_zp_current_album, $image);
                            }
                            if (in_context(ZP_SEARCH_LINKED) || $_zp_gallery_page != 'image.php') {
                                if ($count == 1) {
                                    $style = '';
                                } else {
                                    $style = ' style="display:none"';
                                }
                            } else {
                                if ($_zp_current_image->filename == $image) {
                                    $style = '';
                                } else {
                                    $style = ' style="display:none"';
                                }
                            }
                            switch (getOption('slideshow_colorbox_imagetype')) {
                                case 'fullimage':
                                    $imagelink = getFullImageURL($imgobj);
                                    break;
                                case 'sizedimage':
                                    $imagelink = $imgobj->getCustomImage(getOption("slideshow_width"), NULL, NULL, NULL, NULL, NULL, NULL, false, NULL);
                                    break;
                            }
                            $imagetitle = '';
                            if (getOption('slideshow_colorbox_imagetitle')) {
                                $imagetitle = html_encode(getBare($imgobj->getTitle()));
                            }
                            ?>
							<a href="<?php 
                            echo html_encode(pathurlencode($imagelink));
                            ?>
" rel="slideshow"<?php 
                            echo $style;
                            ?>
 title="<?php 
                            echo $imagetitle;
                            ?>
"><?php 
                            echo $linktext;
                            ?>
</a>
							<?php 
                        }
                    }
                }
                break;
        }
    }
Exemplo n.º 3
0
				<!-- Wrap Main Body -->
				<?php 
    if (getNumImages() > 0) {
        /* Only print if we have images. */
        ?>
					<!-- Image page section -->
					<div id="content">
						<div id="main">
							<div id="images">
								<?php 
        $points = array();
        $firstImage = null;
        $lastImage = null;
        while (next_image()) {
            if (is_null($firstImage)) {
                $lastImage = imageNumber();
                $firstImage = $lastImage;
            } else {
                $lastImage++;
            }
            ?>
									<div class="image">
										<div class="imagethumb">
											<?php 
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            $annotate = annotateImage();
Exemplo n.º 4
0
    static function printSlideShow($heading = true, $speedctl = false, $albumobj = "", $imageobj = "", $width = "", $height = "")
    {
        if (!isset($_POST['albumid']) and !is_object($albumobj)) {
            echo "<div class=\"errorbox\" id=\"message\"><h2>" . gettext("Invalid linking to the slideshow page.") . "</h2></div>";
            echo "</div></body></html>";
            exit;
        }
        global $_zp_flash_player, $_zp_current_image, $_zp_current_album, $_zp_gallery;
        //getting the image to start with
        if (!empty($_POST['imagenumber']) and !is_object($imageobj)) {
            $imagenumber = $_POST['imagenumber'] - 1;
            // slideshows starts with 0, but zp with 1.
        } elseif (is_object($imageobj)) {
            makeImageCurrent($imageobj);
            $imagenumber = imageNumber() - 1;
        } else {
            $imagenumber = 0;
        }
        // set pagenumber to 0 if not called via POST link
        if (isset($_POST['pagenr'])) {
            $pagenumber = sanitize_numeric($_POST['pagenr']);
        } else {
            $pagenumber = 0;
        }
        // getting the number of images
        if (!empty($_POST['numberofimages'])) {
            $numberofimages = sanitize_numeric($_POST['numberofimages']);
        } elseif (is_object($albumobj)) {
            $numberofimages = $albumobj->getNumImages();
        }
        //getting the album to show
        if (!empty($_POST['albumid']) and !is_object($albumobj)) {
            $albumid = sanitize_numeric($_POST['albumid']);
        } elseif (is_object($albumobj)) {
            $albumid = $albumobj->id;
        } else {
            $albumid = -1;
        }
        // setting the image size
        if (!empty($width) and !empty($height)) {
            $width = sanitize_numeric($width);
            $height = sanitize_numeric($height);
        } else {
            $width = getOption("slideshow_width");
            $height = getOption("slideshow_height");
        }
        $option = getOption("slideshow_mode");
        // jQuery Cycle slideshow config
        // get slideshow data
        $gallery = new Gallery();
        if ($albumid <= 0) {
            // search page
            $dynamic = 2;
            $search = new SearchEngine();
            $params = $_POST['preserve_search_params'];
            $search->setSearchParams($params);
            $images = $search->getImages(0);
            $searchwords = $search->words;
            $searchdate = $search->dates;
            $searchfields = $search->fields;
            $page = $search->page;
            if (empty($_POST['imagenumber'])) {
                $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . abs($albumid));
                $album = new Album($gallery, $albumq['folder']);
                $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
                //$returnpath = rewrite_path('/'.pathurlencode($album->name).'/page/'.$pagenumber,'/index.php?album='.urlencode($album->name).'&page='.$pagenumber);
            } else {
                $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
            }
            $albumtitle = gettext('Search');
        } else {
            $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
            $album = new Album($gallery, $albumq['folder']);
            $albumtitle = $album->getTitle();
            if (!checkAlbumPassword($albumq['folder'], $hint)) {
                echo gettext("This album is password protected!");
                exit;
            }
            $dynamic = $album->isDynamic();
            $images = $album->getImages(0);
            // return path to get back to the page we called the slideshow from
            if (empty($_POST['imagenumber'])) {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/page/' . $pagenumber, '/index.php?album=' . urlencode($album->name) . '&page=' . $pagenumber);
            } else {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/' . rawurlencode($_POST['imagefile']) . getOption('mod_rewrite_image_suffix'), '/index.php?album=' . urlencode($album->name) . '&image=' . urlencode($_POST['imagefile']));
            }
        }
        // slideshow display section
        switch ($option) {
            case "jQuery":
                $validtypes = array('jpg', 'jpeg', 'gif', 'png', 'mov', '3gp');
                ?>
					<script type="text/javascript">
						$(document).ready(function(){
							$(function() {
								var ThisGallery = '<?php 
                echo html_encode($albumtitle);
                ?>
';
								var ImageList = new Array();
								var TitleList = new Array();
								var DescList = new Array();
								var ImageNameList = new Array();
								var DynTime=(<?php 
                echo getOption("slideshow_timeout");
                ?>
) * 1.0;	// force numeric
								<?php 
                for ($imgnr = 0, $cntr = 0, $idx = $imagenumber; $imgnr < $numberofimages; $imgnr++, $idx++) {
                    if ($dynamic) {
                        $filename = $images[$idx]['filename'];
                        $album = new Album($gallery, $images[$idx]['folder']);
                        $image = newImage($album, $filename);
                    } else {
                        $filename = $images[$idx];
                        $image = newImage($album, $filename);
                    }
                    $ext = is_valid($filename, $validtypes);
                    if ($ext) {
                        makeImageCurrent($image);
                        $img = getCustomSizedImageMaxSpace($width, $height);
                        //$img = WEBPATH . '/' . ZENFOLDER . '/i.php?a=' . pathurlencode($image->album->name) . '&i=' . urlencode($filename) . '&s=' . $imagesize;
                        echo 'ImageList[' . $cntr . '] = "' . $img . '";' . "\n";
                        echo 'TitleList[' . $cntr . '] = "' . js_encode($image->getTitle()) . '";' . "\n";
                        if (getOption("slideshow_showdesc")) {
                            $desc = $image->getDesc();
                            $desc = str_replace("\r\n", '<br />', $desc);
                            $desc = str_replace("\r", '<br />', $desc);
                            echo 'DescList[' . $cntr . '] = "' . js_encode($desc) . '";' . "\n";
                        } else {
                            echo 'DescList[' . $cntr . '] = "";' . "\n";
                        }
                        if ($idx == $numberofimages - 1) {
                            $idx = -1;
                        }
                        echo 'ImageNameList[' . $cntr . '] = "' . urlencode($filename) . '";' . "\n";
                        $cntr++;
                    }
                }
                echo "\n";
                $numberofimages = $cntr;
                ?>
								var countOffset = <?php 
                echo $imagenumber;
                ?>
;
								var totalSlideCount = <?php 
                echo $numberofimages;
                ?>
;
								var currentslide = 2;
			
								function onBefore(curr, next, opts) {
									//$(next).parent().animate({opacity: 0});

									if (opts.timeout != DynTime) {
										opts.timeout = DynTime;
									}
									if (!opts.addSlide)
										return;
							
									var currentImageNum = currentslide;
									currentslide++;
									if (currentImageNum == totalSlideCount) {
										opts.addSlide = null;
										return;
									}
									var relativeSlot = (currentslide + countOffset) % totalSlideCount;
									if (relativeSlot == 0) {relativeSlot = totalSlideCount;}
									var htmlblock = "<span class='slideimage'><h4><strong>" + ThisGallery + ":</strong> ";
									htmlblock += TitleList[currentImageNum]  + " (" + relativeSlot + "/" + totalSlideCount + ")</h4>";
									htmlblock += "<img src='" + ImageList[currentImageNum] + "'/>";
									htmlblock += "<p class='imgdesc'>" + DescList[currentImageNum] + "</p></span>";
									opts.addSlide(htmlblock);

								}
			
								function onAfter(curr, next, opts){
									<?php 
                if (!isMyALbum($album->name, ALL_RIGHTS)) {
                    ?>
									//Only register at hit count the first time the image is viewed.
									if ($(next).attr( 'viewed') != 1) {
										$.get("<?php 
                    echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
                    ?>
/slideshow/slideshow-counter.php?album=<?php 
                    echo pathurlencode($album->name);
                    ?>
&img="+ImageNameList[opts.currSlide]);
										$(next).attr( 'viewed', 1 );
									}
									<?php 
                }
                ?>

									//THE MISSING LINE
									$(next).parent().height(
										$(next).find('img').height() + $(next).find('p').height() + $(next).find('h4').height() + 40
									); //.animate({opacity: 1}, 'normal', 'linear');
									//getOption('slideshow_onafter'); //make it generic
									//END MISSING LINE
								}
			
								$('#slides').cycle({
										fx:     '<?php 
                echo getOption("slideshow_effect");
                ?>
',
										speed:   <?php 
                echo getOption("slideshow_speed");
                ?>
,
										timeout: DynTime,
										next:   '#next',
										prev:   '#prev',
										cleartype: 1,
										before: onBefore,
										after: onAfter
								});
			
								$('#speed').change(function () {
									DynTime = this.value;
									return false;
								});
			
								$('#pause').click(function() { $('#slides').cycle('pause'); return false; });
								$('#play').click(function() { $('#slides').cycle('resume'); return false; });
							});
			
						});	// Documentready()
			
						</script>
						<div id="slideshow" align="center">
						<?php 
                // 7/21/08dp
                if ($speedctl) {
                    echo '<div id="speedcontrol">';
                    // just to keep it away from controls for sake of this demo
                    $minto = getOption("slideshow_speed");
                    while ($minto % 500 != 0) {
                        $minto += 100;
                        if ($minto > 10000) {
                            break;
                        }
                        // emergency bailout!
                    }
                    $dflttimeout = getOption("slideshow_timeout");
                    /* don't let min timeout = speed */
                    $thistimeout = $minto == getOption("slideshow_speed") ? $minto + 250 : $minto;
                    echo 'Select Speed: <select id="speed" name="speed">';
                    while ($thistimeout <= 60000) {
                        // "around" 1 minute :)
                        echo "<option value={$thistimeout} " . ($thistimeout == $dflttimeout ? " selected='selected'>" : ">") . round($thistimeout / 1000, 1) . " sec</option>";
                        /* put back timeout to even increments of .5 */
                        if ($thistimeout % 500 != 0) {
                            $thistimeout -= 250;
                        }
                        $thistimeout += $thistimeout < 1000 ? 500 : ($thistimeout < 10000 ? 1000 : 5000);
                    }
                    echo "</select> </div>";
                }
                if (!is_object($albumobj)) {
                    // disable controls if calling the slideshow directly on homepage for example
                    ?>
						<div id="controls">
						<div><span><a href="#" id="prev"
							title="<?php 
                    echo gettext("Previous");
                    ?>
"></a></span> <a
							href="<?php 
                    echo $returnpath;
                    ?>
" id="stop"
							title="<?php 
                    echo gettext("Stop and return to album or image page");
                    ?>
"></a>
						<a href="#" id="pause"
							title="<?php 
                    echo gettext("Pause (to stop the slideshow without returning)");
                    ?>
"></a>
						<a href="#" id="play" title="<?php 
                    echo gettext("Play");
                    ?>
"></a> <a
							href="#" id="next" title="<?php 
                    echo gettext("Next");
                    ?>
"></a>
						</div>
						</div>
						<?php 
                }
                ?>
						<div id="slides" class="pics">
						<?php 
                if ($cntr > 1) {
                    $cntr = 1;
                }
                for ($imgnr = 0, $idx = $imagenumber; $imgnr <= $cntr; $idx++) {
                    if ($idx >= $numberofimages) {
                        $idx = 0;
                    }
                    if ($dynamic) {
                        $folder = $images[$idx]['folder'];
                        $dalbum = new Album($gallery, $folder);
                        $filename = $images[$idx]['filename'];
                        $image = newImage($dalbum, $filename);
                        $imagepath = FULLWEBPATH . getAlbumFolder('') . pathurlencode($folder) . "/" . urlencode($filename);
                    } else {
                        $folder = $album->name;
                        $filename = $images[$idx];
                        //$filename = $animage;
                        $image = newImage($album, $filename);
                        $imagepath = FULLWEBPATH . getAlbumFolder('') . pathurlencode($folder) . "/" . urlencode($filename);
                    }
                    $ext = is_valid($filename, $validtypes);
                    if ($ext) {
                        $imgnr++;
                        echo "<span class='slideimage'><h4><strong>" . $albumtitle . gettext(":") . "</strong> " . $image->getTitle() . " (" . ($idx + 1) . "/" . $numberofimages . ")</h4>";
                        if ($ext == "3gp") {
                            echo '</a>
												<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="352" height="304" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
												<param name="src" value="' . $imagepath . '"/>
												<param name="autoplay" value="false" />
												<param name="type" value="video/quicktime" />
												<param name="controller" value="true" />
												<embed src="' . $imagepath . '" width="352" height="304" autoplay="false" controller"true" type="video/quicktime"
												pluginspage="http://www.apple.com/quicktime/download/" cache="true"></embed>
												</object>
												<a>';
                        } elseif ($ext == "mov") {
                            echo '</a>
									 			<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="640" height="496" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
										 		<param name="src" value="' . $imagepath . '"/>
										 		<param name="autoplay" value="false" />
										 		<param name="type" value="video/quicktime" />
										 		<param name="controller" value="true" />
										 		<embed src="' . $imagepath . '" width="640" height="496" autoplay="false" controller"true" type="video/quicktime"
										 		pluginspage="http://www.apple.com/quicktime/download/" cache="true"></embed>
												</object>
												<a>';
                        } else {
                            makeImageCurrent($image);
                            printCustomSizedImageMaxSpace($alt = '', $width, $height, NULL, NULL, false);
                            //echo "<img src='".WEBPATH."/".ZENFOLDER."/i.php?a=".urlencode($folder)."&i=".urlencode($filename)."&s=".$imagesize."' alt='".html_encode($image->getTitle())."' title='".html_encode($image->getTitle())."' />\n";
                        }
                        if (getOption("slideshow_showdesc")) {
                            $desc = $image->getDesc();
                            $desc = str_replace("\r\n", '<br />', $desc);
                            $desc = str_replace("\r", '<br />', $desc);
                            echo "<p class='imgdesc'>" . $desc . "</p>";
                        }
                        echo "</span>";
                    }
                }
                break;
            case "flash":
                if ($heading) {
                    echo "<span class='slideimage'><h4><strong>" . $albumtitle . "</strong> (" . $numberofimages . " images) | <a style='color: white' href='" . $returnpath . "' title='" . gettext("back") . "'>" . gettext("back") . "</a></h4>";
                }
                echo "<span id='slideshow'></span>";
                ?>
 
					<script type="text/javascript">
					$("#slideshow").flashembed({
						  src:'<?php 
                echo FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
                ?>
/flowplayer/FlowPlayerLight.swf',
						  width:<?php 
                echo getOption("slideshow_flow_player_width");
                ?>
,
						  height:<?php 
                echo getOption("slideshow_flow_player_height");
                ?>
						},
						{config: {
						  autoPlay: true,
						  useNativeFullScreen: true,
						  playList: [
													<?php 
                echo "\n";
                $count = 0;
                foreach ($images as $animage) {
                    if ($dynamic) {
                        $folder = $animage['folder'];
                        $filename = $animage['filename'];
                        $salbum = new Album($_zp_gallery, $folder);
                        $image = newImage($salbum, $filename);
                        $imagepath = FULLWEBPATH . getAlbumFolder('') . pathurlencode($salbum->name) . "/" . urlencode($filename);
                    } else {
                        $folder = $album->name;
                        $filename = $animage;
                        $image = newImage($album, $filename);
                        $imagepath = FULLWEBPATH . getAlbumFolder('') . pathurlencode($folder) . "/" . pathurlencode($filename);
                    }
                    $ext = is_valid($filename, array('jpg', 'jpeg', 'gif', 'png', 'flv', 'mp3', 'mp4'));
                    if ($ext) {
                        if ($ext == "flv" || $ext == "mp3" || $ext == "mp4") {
                            $duration = "";
                        } else {
                            $duration = ", duration: " . getOption("slideshow_speed") / 10;
                        }
                        if ($count > 0) {
                            echo ",\n";
                        }
                        echo "{ url: '" . FULLWEBPATH . getAlbumFolder('') . pathurlencode($folder) . "/" . urlencode($filename) . "'" . $duration . " }";
                        $count++;
                    }
                }
                echo "\n";
                ?>
												],
						  showPlayListButtons: true,
						  showStopButton: true,
						  controlBarBackgroundColor: 0,
						 	showPlayListButtons: true,
						 	controlsOverVideo: 'ease',
						 	controlBarBackgroundColor: '<?php 
                echo getOption('flow_player_controlbarbackgroundcolor');
                ?>
',
						  controlsAreaBorderColor: '<?php 
                echo getOption('flow_player_controlsareabordercolor');
                ?>
'
						}}
				  );
					</script> 
					<?php 
                echo "</span>";
                echo "<p>";
                printf(gettext("Click on %s on the right in the player control bar to view full size."), "<img style='position: relative; top: 4px; border: 1px solid gray' src='" . WEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . "/slideshow/flowplayerfullsizeicon.png' />");
                echo "</p>";
                break;
        }
        ?>
			</div>
		</div>
			<?php 
    }
Exemplo n.º 5
0
/**
 * Prints the Galleria slideshow for albums or search results.
 *
 * Two ways to use (see readme/documentation):
 * a) Used on the included theme slideshow.php page and called via printSlideShowLink() from the core slideshow plugin:
 * b) Calling directly via printGslideshow() function in a template file or codeblock.
 *
 * @param obj $albumobj The object of the album to show the slideshow of. Not needed if calling slideshow from album, image, or search.
 * @param obj $imageobj The object of the image to start the slideshow with. If not set the slideshow starts with the first image of the album, or current image if called from image.php. Not needed if calling slideshow from album, image, or search.
 * @param bool $linkslides Set to true if you want the slides to be linked to their image pages
 * @param mixed $autoplay true to autoplay slideshow with interval set in options, false to start with slideshow stopped.  Set integer in milliseconds to autoplay at that interval (Ex. 4000), overriding plugin option set.
 * @param bool $shuffle Set to true if you want random (shuffled) order of the slides
 *
 * */
function printGslideshow($albumobj = null, $imageobj = null, $linkslides = true, $autoplay = true, $forceheight = false, $shuffle = false)
{
    $data = 'data';
    // no POST data from slidehow link and $albumobj provided is not valid, exit
    if (!isset($_POST['albumid']) and !is_object($albumobj)) {
        echo "<div class=\"errorbox\" id=\"message\"><h2>" . gettext("Invalid linking to the slideshow page.") . "</h2></div>";
        echo "</div></body></html>";
        exitZP();
    }
    global $_zp_current_image, $_zp_current_album, $_zp_gallery, $_myFavorites, $_zp_conf_vars;
    $imagenumber = 0;
    //getting the image to start with
    if (!empty($_POST['imagenumber']) and !is_object($imageobj)) {
        $imagenumber = sanitize_numeric($_POST['imagenumber']) - 1;
        // slideshows starts with 0, but zp with 1.
    } elseif (is_object($imageobj)) {
        makeImageCurrent($imageobj);
        $imagenumber = imageNumber() - 1;
    }
    // set pagenumber to 0 if not called via POST link
    if (isset($_POST['pagenr'])) {
        $pagenumber = sanitize_numeric($_POST['pagenr']);
    } else {
        $pagenumber = 1;
    }
    // getting the number of images
    if (!empty($_POST['numberofimages'])) {
        $numberofimages = sanitize_numeric($_POST['numberofimages']);
    } elseif (is_object($albumobj)) {
        $numberofimages = $albumobj->getNumImages();
    } else {
        $numberofimages = 0;
    }
    if ($imagenumber < 2 || $imagenumber > $numberofimages) {
        $imagenumber = 0;
    }
    //getting the album to show
    if (!empty($_POST['albumid']) && !is_object($albumobj)) {
        $albumid = sanitize_numeric($_POST['albumid']);
        $embedded = false;
    } elseif (is_object($albumobj)) {
        $albumid = $albumobj->getID();
        $embedded = true;
    } else {
        $albumid = 0;
        $embedded = false;
    }
    if ($numberofimages == 0) {
        return NULL;
    }
    // get slideshow data
    if (isset($_POST['preserve_search_params'])) {
        // search page
        $search = new SearchEngine();
        $params = sanitize($_POST['preserve_search_params']);
        $search->setSearchParams($params);
        $images = $search->getImages(0);
        $searchwords = $search->getSearchWords();
        $searchdate = $search->getSearchDate();
        $searchfields = $search->getSearchFields(true);
        $page = $search->page;
        $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
        $albumtitle = gettext('Search');
    } else {
        if (isset($_POST['favorites_page'])) {
            $album = $_myFavorites;
            $albumtitle = gettext('My Favorites');
            $images = $album->getImages(0);
            $returnpath = rewrite_path(favorites::getFavorites_link() . '/' . $pagenumber, FULLWEBPATH . '/index.php?p=favorites' . '&page=' . $pagenumber);
        } else {
            $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
            $album = newAlbum($albumq['folder']);
            $albumtitle = $album->getTitle();
            if (!$album->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumq['folder'])) {
                echo gettext("This album is password protected!");
                exitZP();
            }
            $dynamic = $album->isDynamic();
            $images = $album->getImages(0);
            // return path to get back to the page we called the slideshow from
            if (empty($_POST['imagenumber'])) {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/page/' . $pagenumber, '/index.php?album=' . urlencode($album->name) . '&page=' . $pagenumber);
            } else {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/' . rawurlencode(sanitize($_POST['imagefile'])) . getOption('mod_rewrite_image_suffix'), '/index.php?album=' . urlencode($album->name) . '&image=' . urlencode($_POST['imagefile']));
            }
        }
    }
    if ($shuffle) {
        shuffle($images);
    }
    // slideshow display section
    ?>

			<script>
				var data = [
				<?php 
    for ($imgnr = 0, $cntr = 0, $idx = 0; $imgnr < $numberofimages; $imgnr++, $idx++) {
        if (is_array($images[$idx])) {
            $filename = $images[$idx]['filename'];
            $album = newAlbum($images[$idx]['folder']);
            $image = newImage($album, $filename);
        } else {
            $filename = $images[$idx];
            $image = newImage($album, $filename);
        }
        $ext = isImagePhoto($image);
        if ($ext) {
            makeImageCurrent($image);
            echo '{' . "\n";
            echo 'thumb: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_thumbsize'), getOption('gslideshow_thumbsize')) . '\',' . "\n";
            echo 'image: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_mediumsize'), getOption('gslideshow_mediumsize')) . '\',' . "\n";
            echo 'big: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_bigsize'), getOption('gslideshow_bigsize')) . '\',' . "\n";
            echo 'title: \'' . js_encode($image->getTitle()) . '\',' . "\n";
            $desc = $image->getDesc();
            $desc = str_replace("\r\n", '<br />', $desc);
            $desc = str_replace("\r", '<br />', $desc);
            echo 'description: \'' . js_encode($desc) . '\',' . "\n";
            if ($linkslides) {
                echo 'link: \'' . html_encode($image->getLink()) . '\'' . "\n";
            }
            if ($imgnr == $numberofimages - 1) {
                echo '}' . "\n";
            } else {
                echo '},' . "\n";
            }
        }
    }
    echo "\n";
    ?>
				];
			</script>
			<?php 
    printGalleriaRun($data, $linkslides, $autoplay, $embedded, $forceheight, $imagenumber, $albumtitle, $returnpath);
    //restore_context(); // needed if the slideshow is for example called directly via album object before the next_album loop on index.php
}
Exemplo n.º 6
0
    /** Prints the jQuery bxslider HTML setup to be replaced by JS
     *
     * @param int $minitems The minimum number of thumbs to be visible always if resized regarding responsiveness.
     * @param int $maxitems The maximum number of thumbs to be visible always if resized regarding responsiveness.
     * @param int $width Width Set to NULL if you want to use the backend plugin options.
     * @param int $height Height Set to NULL if you want to use the backend plugin options.
     * @param int $cropw Crop width Set to NULL if you want to use the backend plugin options.
     * @param int $croph Crop heigth Set to NULL if you want to use the backend plugin options.
     * @param bool $crop TRUE for cropped thumbs, FALSE for un-cropped thumbs. $width and $height then will be used as maxspace. Set to NULL if you want to use the backend plugin options.
     * @param bool $fullimagelink Set to TRUE if you want the thumb link to link to the full image instead of the image page. Set to NULL if you want to use the backend plugin options.
     * @param string $mode 'horizontal','vertical', 'fade'
     * @param int $speed The speed in miliseconds the slides advance when clicked
     */
    function printThumbNav($minitems = NULL, $maxitems = NULL, $width = NULL, $height = NULL, $cropw = NULL, $croph = NULL, $fullimagelink = NULL, $mode = NULL, $speed = NULL)
    {
        global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_gallery_page;
        //	Just incase the theme has not set the option, at least second try will work!
        setOptionDefault('bxslider_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page), 1);
        $items = "";
        if (is_object($_zp_current_album) && $_zp_current_album->getNumImages() >= 2) {
            if (is_null($minitems)) {
                $minitems = getOption('bxslider_minitems');
            } else {
                $minitems = sanitize_numeric($minitems);
            }
            $minitems = max(1, (int) $minitems);
            if (is_null($maxitems)) {
                $maxitems = getOption('bxslider_maxitems');
            } else {
                $maxitems = sanitize_numeric($maxitems);
            }
            $maxitems = max(1, (int) $maxitems);
            if (is_null($width)) {
                $width = getOption('bxslider_width');
            } else {
                $width = sanitize_numeric($width);
            }
            if (is_null($height)) {
                $height = getOption('bxslider_height');
            } else {
                $height = sanitize_numeric($height);
            }
            if (is_null($cropw)) {
                $cropw = getOption('bxslider_cropw');
            } else {
                $cropw = sanitize_numeric($cropw);
            }
            if (is_null($croph)) {
                $croph = getOption('bxslider_croph');
            } else {
                $croph = sanitize_numeric($croph);
            }
            if (is_null($fullimagelink)) {
                $fullimagelink = getOption('bxslider_fullimagelink');
            } else {
                $fullimagelink = sanitize($fullimagelink);
            }
            if (is_null($mode)) {
                $mode = getOption('bxslider_mode');
            } else {
                $mode = sanitize($mode);
            }
            if (is_null($speed)) {
                $speed = getOption('bxslider_speed');
            } else {
                $speed = sanitize_numeric($speed);
            }
            if (in_context(ZP_SEARCH_LINKED)) {
                if ($_zp_current_search->getNumImages() === 0) {
                    $searchimages = false;
                } else {
                    $searchimages = true;
                }
            } else {
                $searchimages = false;
            }
            if (in_context(ZP_SEARCH_LINKED) && $searchimages) {
                $bxslider_items = $_zp_current_search->getImages();
            } else {
                $bxslider_items = $_zp_current_album->getImages();
            }
            if (count($bxslider_items) >= 2) {
                foreach ($bxslider_items as $item) {
                    if (is_array($item)) {
                        $imgobj = newImage(newAlbum($item['folder']), $item['filename']);
                    } else {
                        $imgobj = newImage($_zp_current_album, $item);
                    }
                    if ($fullimagelink) {
                        $link = $imgobj->getFullImageURL();
                    } else {
                        $link = $imgobj->getLink();
                    }
                    if (!is_null($_zp_current_image)) {
                        if ($_zp_current_album->isDynamic()) {
                            if ($_zp_current_image->filename == $imgobj->filename && $_zp_current_image->getAlbum()->name == $imgobj->getAlbum()->name) {
                                $active = ' class="activeimg" ';
                            } else {
                                $active = '';
                            }
                        } else {
                            if ($_zp_current_image->filename == $imgobj->filename) {
                                $active = ' class="activeimg" ';
                            } else {
                                $active = '';
                            }
                        }
                    } else {
                        $active = '';
                    }
                    $imageurl = $imgobj->getCustomImage(NULL, $width, $height, $cropw, $croph, NULL, NULL, true);
                    $items[] = '<li' . $active . '><a href="' . $link . '"><img src="' . html_encode($imageurl) . '" alt="' . html_encode($imgobj->getTitle()) . '"></a></li>';
                }
            }
            $albumid = $_zp_current_album->get('id');
            //$items = substr($items, 0, -2);
            $numimages = getNumImages();
            if (!is_null($_zp_current_image)) {
                $imgnumber = imageNumber() - 1;
            } else {
                $imgnumber = 0;
            }
            ?>
			<ul class="bxslider<?php 
            echo $albumid;
            ?>
">
				<?php 
            $count = '';
            foreach ($items as $item) {
                echo $item;
            }
            ?>
			</ul>
			<script type="text/javascript">
				$(document).ready(function() {
					var index = $('.bxslider<?php 
            echo $albumid;
            ?>
 li.activeimg').index();
					index = ++index;
					currentPager = parseInt(index / <?php 
            echo $maxitems;
            ?>
)
					$('.bxslider<?php 
            echo $albumid;
            ?>
').bxSlider({
						mode: '<?php 
            echo $mode;
            ?>
',
						minSlides: <?php 
            echo $minitems;
            ?>
,
						maxSlides: <?php 
            echo $maxitems;
            ?>
,
						speed: <?php 
            echo $speed;
            ?>
,
						slideWidth: <?php 
            echo $width;
            ?>
,
						slideMargin: 5,
						moveSlides: <?php 
            echo $maxitems;
            ?>
 - 1,
						pager: false,
						adaptiveHeight: true,
						useCSS: false,
						startSlide: currentPager
					});
				});
			</script>
			<?php 
        }
    }
Exemplo n.º 7
0
    printCustomSizedImage(getImageTitle(), null, $ls ? 480 : null, $ls ? null : 480);
    ?>
					</strong>
					</p>
				<?php 
}
?>
			</div>
			<?php 
if ($show) {
    ?>
			<div id="meta">
				<ul>
					<li class="count"><?php 
    if (($num = getNumImages()) > 1) {
        printf(gettext('%1$u of %2$u photos'), imageNumber(), getNumImages());
    }
    ?>
</li>
					<li class="date"><?php 
    printImageDate();
    ?>
</li>
					<li class="tags"><?php 
    echo getAlbumPlace();
    ?>
</li>
					<li class="exif">
				<?php 
    if (getImageEXIFData()) {
        echo "<a href=\"#TB_inline?height=345&amp;width=300&amp;inlineId=imagemetadata\" title=\"" . gettext("image details") . "\" class=\"thickbox\">" . gettext('Image Info') . "</a>";
Exemplo n.º 8
0
/**
 * Show the content of an media album with .flv/.mp4/.mp3 movie/audio files only as a playlist or as separate players with Flowplayer 3
 * Important: The Flowplayer 3 plugin needs to be activated to use this plugin. This plugin shares all settings with this plugin, too.
 *
 * You can either show a 'one player window' playlist or show all items as separate players paginated. See the examples below.
 * (set in the settings for thumbs per page) on one page (like on a audio or podcast blog).
 *
 * There are two usage modes:
 *
 * a) 'playlist'
 * The playlist is meant to replace the 'next_image()' loop on a theme's album.php.
 * It can be used with a special 'album theme' that can be assigned to media albums with with .flv/.mp4/.mp3s, although Flowplayer 3 also supports images
 * Replace the entire 'next_image()' loop on album.php with this:
 * <?php flowplayerPlaylist("playlist"); ?>
 *
 * This produces the following html:
 * <div class="wrapper">
 * <a class="up" title="Up"></a>
 * <div class="playlist">
 * <div class="clips">
 * <!-- single playlist entry as an "template" -->
 * <a href="${url}">${title}</a>
 * </div>
 * </div>
 * <a class="down" title="Down"></a>
 * </div>
 * </div>
 * This is styled by the css file 'playlist.css" that is located within the 'zp-core/plugins/flowplayer3_playlist/flowplayer3_playlist.css' by default.
 * Alternatively you can style it specifically for your theme. Just place a css file named "flowplayer3_playlist.css" in your theme's folder.
 *
 * b) 'players'
 * This displays each audio/movie file as a separate player on album.php.
 * If there is no videothumb image for an mp3 file existing only the player control bar is shown.
 * Modify the 'next_image()' loop on album.php like this:
 * <?php
 * while (next_image()):
 * flowplayerPlaylist("players");
 * endwhile;
 * ?>
 * Of course you can add further functions to b) like printImageTitle() etc., too.
 *
 * @param string $option The mode to use "players", "playlist" or "playlist-mp3". "playlist-mp3" is the same as "playlist" except that only the controlbar is shown (if you are too lazy for custom video thumbs and don't like the empty screen)
 * @param string $albumfolder For "playlist" mode only: To show a playlist of an specific album directly on another page (for example on index.php). Note: Currently it is not possible to have several playlists on one page
 */
function flowplayerPlaylist($option = "playlist", $albumfolder = "")
{
    global $_zp_current_image, $_zp_current_album, $_zp_flash_player;
    $curdir = getcwd();
    chdir(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/flowplayer3');
    $filelist = safe_glob('flowplayer-*.swf');
    $swf = array_shift($filelist);
    $filelist = safe_glob('flowplayer.audio-*.swf');
    $audio = array_shift($filelist);
    $filelist = safe_glob('flowplayer.controls-*.swf');
    $controls = array_shift($filelist);
    chdir($curdir);
    $playlistwidth = getOption('flow_player3_playlistwidth');
    $playlistheight = getOption('flow_player3_playlistheight');
    switch ($option) {
        case 'playlist':
        case 'playlist-mp3':
            $splashimage = getOption('flow_player3_playlistsplashimage');
            if ($option == 'playlist-mp3') {
                $playlistheight = FLOW_PLAYER_MP3_HEIGHT;
                $splashimage = 'none';
            }
            if (empty($albumfolder)) {
                $albumname = $_zp_current_album->name;
            } else {
                $albumname = $albumfolder;
            }
            $album = newAlbum($albumname);
            if (getOption("flow_player3_playlistautoplay") == 1) {
                $autoplay = 'true';
            } else {
                $autoplay = 'false';
            }
            $playlist = $album->getImages();
            // slash image fetching
            $videoobj = new Video($album, $playlist[0]);
            $albumfolder = $album->name;
            $splashimagerwidth = $playlistwidth;
            $splashimageheight = $playlistheight;
            $videoThumbImg = '';
            if ($splashimage != 'none') {
                switch ($splashimage) {
                    case 'albumthumb':
                        $albumthumbobj = $album->getAlbumThumbImage();
                        getMaxSpaceContainer($splashimagerwidth, $splashimageheight, $albumthumbobj, true);
                        $albumthumb = $albumthumbobj->getCustomImage(null, $splashimagerwidth, $splashimageheight, null, null, null, null, true);
                        $videoThumbImg = '<img src="' . pathurlencode($albumthumb) . '" alt="" />';
                        break;
                    case 'firstentry':
                        getMaxSpaceContainer($splashimagerwidth, $splashimageheight, $videoobj, true);
                        $videoThumb = $videoobj->getCustomImage(null, $splashimagerwidth, $splashimageheight, null, null, null, null, true);
                        $videoThumbImg = '<img src="' . pathurlencode($videoThumb) . '" alt="" />';
                        break;
                }
            }
            if ($album->getNumImages() != 0) {
                if (getOption('flow_player3_playlistnumbered')) {
                    $liststyle = 'ol';
                } else {
                    $liststyle = 'div';
                }
                echo '<div class="flowplayer3_playlistwrapper">
			<a id="player' . $album->getID() . '" class="flowplayer3_playlist" style="display:block; width: ' . $playlistwidth . 'px; height: ' . $playlistheight . 'px;">
			' . $videoThumbImg . '
			</a>
			<script type="text/javascript">
			// <!-- <![CDATA[
			$(function() {

			$("div.playlist").scrollable({
				items:"' . $liststyle . '.clips' . $album->getID() . '",
				vertical:true,
				next:"a.down",
				prev:"a.up",
				mousewheel: true
			});
			flowplayer("player' . $album->getID() . '","' . WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/flowplayer3/' . $swf . '", {
			plugins: {
				audio: {
					url: "' . $audio . '"
				},
				controls: {
					url: "' . $controls . '",
					backgroundColor: "' . getOption('flow_player3_controlsbackgroundcolor') . '",
					autoHide: "' . getOption('flow_player3_playlistautohide') . '",
					timeColor:"' . getOption('flow_player3_controlstimecolor') . '",
					durationColor: "' . getOption('flow_player3_controlsdurationcolor') . '",
					progressColor: "' . getOption('flow_player3_controlsprogresscolor') . '",
					progressGradient: "' . getOption('flow_player3_controlsprogressgradient') . '",
					bufferColor: "' . getOption('flow_player3_controlsbuffercolor') . '",
					bufferGradient:	 "' . getOption('fflow_player3_controlsbuffergradient') . '",
					sliderColor: "' . getOption('flow_player3_controlsslidercolor') . '",
					sliderGradient: "' . getOption('flow_player3_controlsslidergradient') . '",
					buttonColor: "' . getOption('flow_player3_controlsbuttoncolor') . '",
					buttonOverColor: "' . getOption('flow_player3_controlsbuttonovercolor') . '",
					scaling: "' . getOption('flow_player3_scaling') . '",
					playlist: true
				}
			},
			canvas: {
				backgroundColor: "' . getOption('flow_player3_backgroundcolor') . '",
				backgroundGradient: "' . getOption('flow_player3_backgroundcolorgradient') . '"
			},';
                $list = '';
                foreach ($playlist as $item) {
                    $image = newImage($album, $item);
                    $playtime = '';
                    if (getOption('flow_player3_playlistplaytime')) {
                        $playtime = $image->get('VideoPlaytime');
                        if (!empty($playtime)) {
                            $playtime = $image->get('VideoPlaytime');
                        }
                    }
                    $coverimagerwidth = getOption('flow_player3_playlistwidth');
                    $coverimageheight = getOption('flow_player3_playlistheight');
                    getMaxSpaceContainer($coverimagerwidth, $coverimageheight, $image, true);
                    $cover = $image->getCustomImage(null, $coverimagerwidth, $coverimageheight, null, null, null, null, true);
                    $ext = getSuffix($item);
                    if ($ext == "flv" || $ext == "mp3" || $ext == "mp4" || $ext == "fla" || $ext == "m4v" || $ext == "m4a") {
                        $list .= '{
					url:"' . ALBUM_FOLDER_WEBPATH . $album->name . '/' . $item . '",
					autoPlay: ' . $autoplay . ',
					title: "' . $image->getTitle() . ' <small>(' . $playtime . ')</small>",
					autoBuffering: ' . $autoplay . ',
					coverImage: {
						url: "' . urlencode($cover) . '",
						scaling: "fit"
					}
				},';
                    }
                    // if ext end
                }
                // foreach end
                echo 'playlist: [' . substr($list, 0, -1) . ']
			});
			flowplayer("player' . $album->getID() . '").playlist("' . $liststyle . '.clips' . $album->getID() . ':first", {loop:true});
			});
			// ]]> -->
			</script>';
                ?>
		<div class="wrapper">
					<a class="up" title="Up"></a>

			<div class="playlist playlist<?php 
                echo $album->getID();
                ?>
">
				<<?php 
                echo $liststyle;
                ?>
 class="clips clips<?php 
                echo $album->getID();
                ?>
">
					<!-- single playlist entry as an "template" -->
					<?php 
                if ($liststyle == 'ol') {
                    ?>
 <li> <?php 
                }
                ?>
					<a href="${url}">${title}</a>
					<?php 
                if ($liststyle == 'ol') {
                    ?>
 </li> <?php 
                }
                ?>
				</<?php 
                echo $liststyle;
                ?>
>
			</div>
		<a class="down" title="Down"></a>
</div>
</div><!-- flowplayer3_playlist wrapper end -->
<?php 
            }
            // check if there are images end
            break;
        case 'players':
            $_zp_flash_player->printPlayerConfig('', '', imageNumber());
            break;
    }
    // switch end
}
Exemplo n.º 9
0
function printBaseSlideShowLink($linktext = null)
{
    global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page;
    if (is_null($linktext)) {
        $linktext = gettext('View Slideshow');
    }
    if (empty($_GET['page'])) {
        $pagenr = 1;
    } else {
        $pagenr = sanitize_numeric($_GET['page']);
    }
    $slideshowhidden = '';
    $numberofimages = 0;
    if (in_context(ZP_SEARCH)) {
        $imagenumber = '';
        $imagefile = '';
        $albumnr = 0;
        $slideshowlink = rewrite_path('/' . _PAGE_ . '/slideshow', "index.php?p=slideshow");
        $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
    } else {
        if (in_context(ZP_IMAGE)) {
            $imagenumber = imageNumber();
            $imagefile = $_zp_current_image->filename;
        } else {
            $imagenumber = '';
            $imagefile = '';
        }
        if (in_context(ZP_SEARCH_LINKED)) {
            $albumnr = -$_zp_current_album->getID();
            $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
        } else {
            $albumnr = $_zp_current_album->getID();
        }
        if ($albumnr) {
            $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFileName()) . '/' . _PAGE_ . '/slideshow', "index.php?p=slideshow&amp;album=" . urlencode($_zp_current_album->getFileName()));
        } else {
            $slideshowlink = rewrite_path('/' . _PAGE_ . '/slideshow', "index.php?p=slideshow");
            $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />';
        }
    }
    //$numberofimages = getNumImages();
    $slideshow_instance = 0;
    if (checkForImages()) {
        ?>
			<!-- <form name="slideshow_<?php 
        echo $slideshow_instance;
        ?>
" method="post"	action="<?php 
        echo $slideshowlink;
        ?>
">
				<?php 
        echo $slideshowhidden;
        ?>
				<input type="hidden" name="pagenr" value="<?php 
        echo html_encode($pagenr);
        ?>
" />
				<input type="hidden" name="albumid" value="<?php 
        echo $albumnr;
        ?>
" />
				<input type="hidden" name="numberofimages" value="<?php 
        echo $numberofimages;
        ?>
" />
				<input type="hidden" name="imagenumber" value="<?php 
        echo $imagenumber;
        ?>
" />
				<input type="hidden" name="imagefile" value="<?php 
        echo html_encode($imagefile);
        ?>
" />
				<a class="slideshowlink" id="slideshowlink_<?php 
        echo $slideshow_instance;
        ?>
" 	href="javascript:document.slideshow_<?php 
        echo $slideshow_instance;
        ?>
.submit()"><?php 
        echo $linktext;
        ?>
</a>
			</form> -->
		<?php 
    }
}
Exemplo n.º 10
0
    /** Prints the jQuery jCarousel HTML setup to be replaced by JS
     *
     * @param int $minitems The minimum number of thumbs to be visible always if resized regarding responsiveness.
     * @param int $maxitems not supported
     * @param int $width Width Set to NULL if you want to use the backend plugin options.
     * @param int $height Height Set to NULL if you want to use the backend plugin options.
     * @param int $cropw Crop width Set to NULL if you want to use the backend plugin options.
     * @param int $croph Crop heigth Set to NULL if you want to use the backend plugin options.
     * @param bool $crop TRUE for cropped thumbs, FALSE for un-cropped thumbs. $width and $height then will be used as maxspace. Set to NULL if you want to use the backend plugin options.
     * @param bool $fullimagelink Set to TRUE if you want the thumb link to link to the full image instead of the image page. Set to NULL if you want to use the backend plugin options.
     * @param string $vertical 'horizontal','vertical', 'fade'
     * @param int $speed not supported
     */
    function printThumbNav($minitems = NULL, $maxitems = NULL, $width = NULL, $height = NULL, $cropw = NULL, $croph = NULL, $fullimagelink = NULL, $vertical = NULL, $speed = NULL, $thumbscroll = NULL)
    {
        global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_gallery_page;
        //	Just incase the theme has not set the option, at least second try will work!
        setOptionDefault('slideshow_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page), 1);
        $items = "";
        if (is_object($_zp_current_album) && $_zp_current_album->getNumImages() >= 2) {
            if (is_null($thumbscroll)) {
                $thumbscroll = getOption('jcarousel_scroll');
            } else {
                $thumbscroll = sanitize_numeric($thumbscroll);
            }
            if (is_null($width)) {
                $width = getOption('jcarousel_width');
            } else {
                $width = sanitize_numeric($width);
            }
            if (is_null($height)) {
                $height = getOption('jcarousel_height');
            } else {
                $height = sanitize_numeric($height);
            }
            if (is_null($cropw)) {
                $cropw = getOption('jcarousel_cropw');
            } else {
                $cropw = sanitize_numeric($cropw);
            }
            if (is_null($croph)) {
                $croph = getOption('jcarousel_croph');
            } else {
                $croph = sanitize_numeric($croph);
            }
            if (is_null($fullimagelink)) {
                $fullimagelink = getOption('jcarousel_fullimagelink');
            } else {
                $fullimagelink = sanitize($fullimagelink);
            }
            if (is_null($vertical)) {
                $vertical = getOption('jcarousel_vertical');
            } else {
                $vertical = sanitize($vertical);
            }
            if ($vertical) {
                $vertical = 'true';
            } else {
                $vertical = 'false';
            }
            if (in_context(ZP_SEARCH_LINKED)) {
                if ($_zp_current_search->getNumImages() === 0) {
                    $searchimages = false;
                } else {
                    $searchimages = true;
                }
            } else {
                $searchimages = false;
            }
            if (in_context(ZP_SEARCH_LINKED) && $searchimages) {
                $jcarousel_items = $_zp_current_search->getImages();
            } else {
                $jcarousel_items = $_zp_current_album->getImages();
            }
            if (count($jcarousel_items) >= 2) {
                foreach ($jcarousel_items as $item) {
                    if (is_array($item)) {
                        $imgobj = newImage($_zp_current_album, $item['filename']);
                    } else {
                        $imgobj = newImage($_zp_current_album, $item);
                    }
                    if ($fullimagelink) {
                        $link = $imgobj->getFullImageURL();
                    } else {
                        $link = $imgobj->getLink();
                    }
                    if (!is_null($_zp_current_image)) {
                        if ($_zp_current_album->isDynamic()) {
                            if ($_zp_current_image->filename == $imgobj->filename && $_zp_current_image->getAlbum()->name == $imgobj->getAlbum()->name) {
                                $active = 'active';
                            } else {
                                $active = '';
                            }
                        } else {
                            if ($_zp_current_image->filename == $imgobj->filename) {
                                $active = 'active';
                            } else {
                                $active = '';
                            }
                        }
                    } else {
                        $active = '';
                    }
                    $imageurl = $imgobj->getCustomImage(NULL, $width, $height, $cropw, $croph, NULL, NULL, true);
                    $items .= ' {url: "' . html_encode($imageurl) . '", title: "' . html_encode($imgobj->getTitle()) . '", link: "' . html_encode($link) . '", active: "' . $active . '"},';
                    $items .= "\n";
                }
            }
            $items = substr($items, 0, -2);
            $numimages = getNumImages();
            if (!is_null($_zp_current_image)) {
                $imgnumber = imageNumber();
            } else {
                $imgnumber = 1;
            }
            ?>
			<script type="text/javascript">
				// <!-- <![CDATA[
				var mycarousel_itemList = [
			<?php 
            echo $items;
            ?>
				];

				function mycarousel_itemLoadCallback(carousel, state) {
					for (var i = carousel.first; i <= carousel.last; i++) {
						if (carousel.has(i)) {
							continue;
						}
						if (i > mycarousel_itemList.length) {
							break;
						}
						carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[i - 1]));
					}
				}

				function mycarousel_getItemHTML(item) {
					if (item.active === "") {
						html = '<a href="' + item.link + '" title="' + item.title + '"><img src="' + item.url + '" width="<?php 
            echo $width;
            ?>
" height="<?php 
            echo $height;
            ?>
" alt="' + item.url + '" /></a>';
					} else {
						html = '<a href="' + item.link + '" title="' + item.title + '"><img class="activecarouselimage" src="' + item.url + '" width="<?php 
            echo $width;
            ?>
" height="<?php 
            echo $height;
            ?>
" alt="' + item.url + '" /></a>';
					}
					return html;
				}

				jQuery(document).ready(function() {
					jQuery("#mycarousel").jcarousel({
						vertical: <?php 
            echo $vertical;
            ?>
,
						size: mycarousel_itemList.length,
						start: <?php 
            echo $imgnumber;
            ?>
,
						scroll: <?php 
            echo $thumbscroll;
            ?>
,
						itemLoadCallback: {onBeforeAnimation: mycarousel_itemLoadCallback}
					});
				});
				// ]]> -->
			</script>
			<ul id="mycarousel">
				<!-- The content will be dynamically loaded in here -->
			</ul>
			<?php 
        }
    }
Exemplo n.º 11
0
 /**
  *
  * @param unknown_type $imagesperpage
  * @param unknown_type $counter
  * @param unknown_type $prev
  * @param unknown_type $next
  * @param unknown_type $width
  * @param unknown_type $height
  * @param unknown_type $crop
  * @param unknown_type $placeholders
  * @param unknown_type $showpagelist
  * @param unknown_type $pagelistprevnext
  * @param unknown_type $pagelistlength
  * @return pagedThumbsNav
  */
 function pagedThumbsNav($imagesperpage = 0, $counter = false, $prev = '', $next = '', $width = NULL, $height = NULL, $crop = NULL, $placeholders = NULL, $showpagelist = false, $pagelistprevnext = false, $pagelistlength = 6)
 {
     global $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_gallery;
     if (is_null($crop)) {
         $this->crop = getOption("pagedthumbs_crop");
     } else {
         $this->crop = sanitize($crop);
     }
     if (empty($imagesperpage)) {
         $this->imagesperpage = getOption("pagedthumbs_imagesperpage");
     } else {
         $this->imagesperpage = sanitize_numeric($imagesperpage);
     }
     if (is_null($width)) {
         $this->width = getOption("pagedthumbs_width");
     } else {
         $this->width = sanitize_numeric($width);
     }
     if (is_null($height)) {
         $this->height = getOption("pagedthumbs_height");
     } else {
         $this->height = sanitize_numeric($height);
     }
     if (empty($prev)) {
         $this->prev = get_language_string(getOption("pagedthumbs_prevtext"));
     } else {
         $this->prev = sanitize($prev);
     }
     if (empty($next)) {
         $this->next = get_language_string(getOption("pagedthumbs_nexttext"));
     } else {
         $this->next = sanitize($next);
     }
     if (empty($counter)) {
         $this->counter = getOption("pagedthumbs_counter");
     }
     if (is_null($placeholders)) {
         $this->placeholders = getOption("pagedthumbs_placeholders");
     } else {
         $this->placeholders = sanitize($placeholders);
     }
     if (is_null($showpagelist)) {
         $this->showpagelist = getOption("pagedthumbs_pagelist");
     } else {
         $this->showpagelist = sanitize($showpagelist);
     }
     if (empty($pagelistlength)) {
         $this->pagelistlength = getOption("pagedthumbs_pagelistlength");
     } else {
         $this->pagelistlength = sanitize($pagelistlength);
     }
     if (is_null($pagelistprevnext)) {
         $this->pagelistprevnext = getOption("pagedthumbs_pagelistprevnext");
     } else {
         $this->pagelistprevnext = sanitize($pagelistprevnext);
     }
     // get the image of current album
     if (in_context(ZP_SEARCH_LINKED)) {
         if ($_zp_current_search->getNumImages() === 0) {
             $this->searchimages = false;
         } else {
             $this->searchimages = true;
         }
     } else {
         $this->searchimages = false;
     }
     if (in_context(ZP_SEARCH_LINKED) && $this->searchimages) {
         $this->images = $_zp_current_search->getImages();
     } else {
         $this->images = $_zp_current_album->getImages();
     }
     $this->currentimgnr = imageNumber();
     $this->totalimages = count($this->images);
     $this->totalpages = ceil($this->totalimages / $this->imagesperpage);
     $this->currentpage = floor(($this->currentimgnr - 1) / $this->imagesperpage) + 1;
     $this->currentciel = $this->currentpage * $this->imagesperpage - 1;
     $this->currentfloor = $this->currentciel - $this->imagesperpage + 1;
 }
Exemplo n.º 12
0
    function theme_content($map)
    {
        global $_zp_current_image, $points;
        if (isImagePage()) {
            ?>
			<!-- Gallery section -->
			<div id="images">
				<?php 
            $points = array();
            $firstImage = null;
            $lastImage = null;
            if (getNumImages() > 0) {
                ?>
					<div id="gallery" class="ad-gallery">
						<div class="ad-image-wrapper"></div>
						<div class="ad-controls"></div>
						<div class="ad-nav">
							<div class="ad-thumbs">
								<ul class="ad-thumb-list">
									<?php 
                while (next_image(true)) {
                    if ($map) {
                        $coord = getGeoCoord($_zp_current_image);
                        if ($coord) {
                            $points[] = $coord;
                        }
                    }
                    if (isImagePhoto()) {
                        // does not do video
                        if (is_null($firstImage)) {
                            $lastImage = imageNumber();
                            $firstImage = $lastImage;
                        } else {
                            $lastImage++;
                        }
                        ?>
											<li>
												<a href="<?php 
                        echo html_encode(getDefaultSizedImage());
                        ?>
">
													<img src="<?php 
                        echo html_encode(pathurlencode(getImageThumb()));
                        ?>
"
															 class="image<?php 
                        echo $lastImage;
                        ?>
"
															 alt="<?php 
                        echo html_encode(getImageDesc());
                        ?>
">
												</a>
											</li>
											<?php 
                    }
                }
                ?>
								</ul>
							</div>
						</div>
					</div>
				<?php 
            }
            ?>

				<div id="caption"<?php 
            if (getOption('garland_caption_location') == 'none') {
                echo ' style="display:none"';
            }
            ?>
>
				</div>
				<div class="clearage"></div>
			</div><!-- images -->
			<br class="clearall" />
			<?php 
        }
    }
Exemplo n.º 13
0
    function theme_content($map)
    {
        global $_zp_current_image, $_zp_current_album, $points;
        if (isImagePage()) {
            ?>
			<!-- Gallery section -->
			<div id="content">
				<div id="main">
					<div id="images">
						<?php 
            $points = array();
            $firstImage = null;
            $lastImage = null;
            if (getNumImages() > 0) {
                ?>
							<div id="gallery" class="ad-gallery">
								<div class="ad-image-wrapper"></div>
								<div class="ad-controls"></div>
								<div class="ad-nav">
									<div class="ad-thumbs">
										<ul class="ad-thumb-list">
											<?php 
                while (next_image(true)) {
                    if ($map) {
                        $coord = getGeoCoord($_zp_current_image);
                        if ($coord) {
                            $points[] = $coord;
                        }
                    }
                    if (isImagePhoto()) {
                        // does not do video
                        if (is_null($firstImage)) {
                            $lastImage = imageNumber();
                            $firstImage = $lastImage;
                        } else {
                            $lastImage++;
                        }
                        ?>
													<li>
														<a href="<?php 
                        echo html_encode(getDefaultSizedImage());
                        ?>
">
															<img src="<?php 
                        echo html_encode(pathurlencode(getImageThumb()));
                        ?>
"
																	 class="image<?php 
                        echo $lastImage;
                        ?>
"
																	 alt="<?php 
                        echo html_encode(getImageDesc());
                        ?>
">
														</a>
													</li>
													<?php 
                    }
                }
                ?>
										</ul>
									</div>
								</div>
							</div>
							<?php 
            }
            ?>

						<div id="caption"<?php 
            if (getOption('effervescence_caption_location') == 'none') {
                echo ' style="display:none"';
            }
            ?>
>
						</div>
						<div class="clearage"></div>
						<?php 
            if (!empty($points) && $map) {
                function map_callback($map)
                {
                    global $points;
                    foreach ($points as $coord) {
                        addGeoCoord($map, $coord);
                    }
                }
                ?>
							<div id="map_link">
							<?php 
                printGoogleMap(NULL, NULL, NULL, 'album_page', 'map_callback');
                ?>
							</div>
						<?php 
            }
            ?>
					</div><!-- images -->
			<?php 
            if (function_exists('printAddToFavorites')) {
                printAddToFavorites($_zp_current_album);
            }
            ?>
			<?php 
            @call_user_func('printRating');
            ?>
				</div><!-- main -->
				<div class="clearage"></div>
			</div><!-- content -->
			<?php 
        }
    }
Exemplo n.º 14
0
" title="<?php 
gettext('Index');
?>
"><?php 
echo gettext("Index");
?>
</a> &raquo; <?php 
echo gettext("Gallery");
printParentBreadcrumb(" &raquo; ", " &raquo; ", " &raquo; ");
printAlbumBreadcrumb(" ", " &raquo; ");
?>
			 <strong><?php 
printImageTitle(true);
?>
</strong> (<?php 
echo imageNumber() . "/" . getNumImages();
?>
)
			</h2>
		</div>
	<div id="content-left">

	<!-- The Image -->
 <?php 
//
if (function_exists('printjCarouselThumbNav')) {
    printjCarouselThumbNav(6, 50, 50, 50, 50, FALSE);
} else {
    if (function_exists("printPagedThumbsNav")) {
        printPagedThumbsNav(6, FALSE, gettext('&laquo; prev thumbs'), gettext('next thumbs &raquo;'), 40, 40);
    }
Exemplo n.º 15
0
function printPagedThumbsNav($imagesperpage = '', $counter = '', $prev = '', $next = '', $width = NULL, $height = NULL, $crop = false)
{
    global $_zp_current_album, $_zp_current_image;
    // in case someone wants to override the options by parameter
    if (empty($imagesperpage)) {
        $imagesperpage = getOption("pagedthumbs_imagesperpage");
    }
    if (empty($width)) {
        $width = getOption("pagedthumbs_width");
    } else {
        $width = sanitize_numeric($width);
    }
    if (empty($height)) {
        $height = getOption("pagedthumbs_height");
    } else {
        $height = sanitize_numeric($height);
    }
    if (empty($prev)) {
        $prev = getOption("pagedthumbs_prevtext");
    }
    if (empty($next)) {
        $next = getOption("pagedthumbs_nexttext");
    }
    if (empty($counter)) {
        $counter = getOption("pagedthumbs_counter");
    }
    // get the image of current album
    $images = $_zp_current_album->getImages();
    $totalimages = getNumImages();
    $totalpages = ceil($totalimages / $imagesperpage);
    $currentimgnr = imageNumber();
    for ($nr = 1; $nr <= $totalpages; $nr++) {
        $startimg[$nr] = $nr * $imagesperpage - ($imagesperpage - 1);
        // get start image number for thumb pagination
        $endimg[$nr] = $nr * $imagesperpage;
        // get end image number for thumb pagination
    }
    // get current page number
    for ($nr = 1; $nr <= $totalpages; $nr++) {
        if ($startimg[$nr] <= $currentimgnr) {
            $currentpage = $nr;
        }
        if ($endimg[$nr] >= $currentimgnr) {
            $currentpage = $nr;
            break;
        }
    }
    echo "<div id=\"pagedthumbsnav\">\n";
    echo "<div class=\"pagedthumbsnav-prev\">\n";
    // Prev thumbnails - show only if there is a prev page
    if ($totalpages > 1) {
        $prevpageimagenr = $currentpage * $imagesperpage - ($imagesperpage + 1);
        if ($currentpage > 1) {
            $prevpageimage = newImage($_zp_current_album, $images[$prevpageimagenr]);
            echo "<a href=\"" . $prevpageimage->getImageLink() . "\" title=\"" . gettext("previous thumbs") . "\">" . $prev . "</a>\n";
        }
    }
    echo "</div>\n";
    // the thumbnails
    $number = $startimg[$currentpage] - 2;
    for ($nr = 1; $nr <= $imagesperpage; $nr++) {
        $number++;
        if ($number == $totalimages) {
            break;
        }
        $image = newImage($_zp_current_album, $images[$number]);
        if ($image->id === getImageID()) {
            $css = " id='pagedthumbsnav-active' ";
        } else {
            $css = "";
        }
        echo "<a {$css} href=\"" . $image->getImageLink() . "\" title=\"" . strip_tags($image->getTitle()) . "\">";
        if (getOption("pagedthumbs_crop") or $crop) {
            echo "<img src='" . $image->getCustomImage(null, $width, $height, $width, $height, null, null, true) . "' alt=\"" . strip_tags($image->getTitle()) . "\" width='" . $width . "' height='" . $height . "' />";
        } else {
            $_zp_current_image = $image;
            printCustomSizedImageThumbMaxSpace(strip_tags($image->getTitle()), $width, $height);
        }
        echo "</a>\n";
        if ($number == $endimg[$currentpage]) {
            break;
        }
    }
    // next thumbnails - show only if there is a next page
    echo "<div class=\"pagedthumbsnav-next\">\n";
    if ($totalpages > 1) {
        if ($currentpage < $totalpages) {
            $nextpageimagenr = $currentpage * $imagesperpage;
            $nextpageimage = newImage($_zp_current_album, $images[$nextpageimagenr]);
            echo "<a href=\"" . $nextpageimage->getImageLink() . "\" title=\"" . gettext("next thumbs") . "\">" . $next . "</a>\n";
        }
    }
    //first if
    echo "</div>\n";
    // image counter
    if ($counter) {
        $fromimage = $startimg[$currentpage];
        if ($totalimages < $endimg[$currentpage]) {
            $toimage = $totalimages;
        } else {
            $toimage = $endimg[$currentpage];
        }
        echo "<p id=\"pagedthumbsnav-counter\">" . sprintf(gettext('Images %1$u-%2$u of %3$u (%4$u/%5$u)'), $fromimage, $toimage, $totalimages, $currentpage, $totalpages) . "</p>\n";
    }
    echo "</div>\n";
}
Exemplo n.º 16
0
    echo html_encode(getNextImageURL());
    ?>
" title="<?php 
    echo gettext("Next Image");
    ?>
"><?php 
    echo gettext("next");
    ?>
 &raquo;</a><?php 
}
?>
			<span title="<?php 
echo gettext('Image Number/Total images');
?>
"><?php 
echo imageNumber() . '/' . getNumImages();
?>
</span>
		</div>
		<div class="sidebar-divide">
			<div id="full-image-details">
				<h2><?php 
printImageTitle(true);
?>
</h2>
				<div class="sidebar-section"><?php 
printImageDate('', '', null, true);
?>
</div>
				<?php 
if (getImageDesc() || zp_loggedin()) {
Exemplo n.º 17
0
			 <a href="<?php 
echo html_encode(getCustomPageURl('gallery'));
?>
" title="<?php 
echo gettext('Gallery');
?>
"><?php 
echo gettext("Gallery") . " » ";
?>
</a><?php 
printParentBreadcrumb(" » ", " » ", " » ");
printAlbumBreadcrumb(" ", " » ");
?>
			 <strong><?php 
/* printImageTitle(true); */
echo gettext("Image") . " " . imageNumber() . "/" . getNumImages();
?>
</strong> 
	</h2>
	</div>
	<div id="content-left">

	<!-- The Image -->
 <?php 
//
if (function_exists('printThumbNav')) {
    printThumbNav(3, 6, 50, 50, 50, 50, FALSE);
} else {
    @call_user_func('printPagedThumbsNav', 6, FALSE, gettext('« prev thumbs'), gettext('next thumbs »'), 40, 40);
}
?>