Пример #1
0
    print '<div id="inner_wrapper"><div id="big-picture-container">';
    print '<script type="text/javascript">';
    print 'slides = new slideshow("slides");';
    print 'slides.prefetch = 2; slides.timeout = 4000; ';
    while (plogger_has_pictures()) {
        $pic = plogger_load_picture();
        // output a line of javascript for each image
        echo 's = new slide("' . plogger_get_picture_thumb(THUMB_LARGE) . '",
		"' . plogger_get_source_picture_url() . '",
		"' . plogger_get_picture_caption() . '",
		"_self","","","' . basename($pic['path']) . '");
		slides.add_slide(s);';
    }
    print '// --> </script>';
    print '</div></div>';
    print generate_slideshow_interface();
} else {
    print '<div id="no-pictures-msg">No pictures to show.</div>';
}
print '</div>';
function generate_slideshow_interface()
{
    global $config;
    $large_link = '<a accesskey="v" href="javascript:slides.hotlink()" title="View Large Image"><img hspace="1" src="' . $config["gallery_url"] . 'graphics/search.gif" width="16" height="16"></a>';
    $prev_url = '<a accesskey="," title="Previous Image" 
	href="javascript: slides.previous();"><img hspace="1" src="' . $config["gallery_url"] . 'graphics/rewind.gif" 
	width="16" height="16"></a>';
    $next_url = '<a accesskey="." title="Next Image" 
	href="javascript: slides.next();"><img hspace="1" src="' . $config["gallery_url"] . 'graphics/fforward.gif" 
	width="16" height="16"></a>';
    $stop_url = '<a accesskey="x" title="Stop Slideshow" 
Пример #2
0
",
		"_self","","","<?php 
        echo basename($pic['path']);
        ?>
");
		slides.add_slide(s);
		
	<?php 
    }
    ?>
		
	// --> 
	</script>

	<?php 
    echo generate_slideshow_interface();
    ?>

<?php 
} else {
    ?>
	
	<div id="no-pictures-msg">There are no pictures to show.</div>

<?php 
}
?>

</div>

<?php