Hey All, i really like the idea of colorbox, is it simple to call a command to use colorbox upon clicking on an album image, and thus not calling the image page at all?
Is colorbox installed by default on the latest version of Zenphoto? i have enabled the plugin, and looked through the help on the colorbox site, but a little too daunting for me.
im assuming it gets added somewhere in the album.php? ive attached my album.php below:
__________________________________________________
<?php
$startTime = array_sum(explode(" ",microtime()));
if (!defined('WEBPATH')) die();
require_once ('joshuaink.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<?php zp_apply_filter('theme_head'); ?>
<title><?php printGalleryTitle(); ?></title>
<link rel="stylesheet" href="<?php echo $_zp_themeroot ?>/css/gallery.css" type="text/css" />
<?php printRSSHeaderLink('Album',getAlbumTitle()); ?>
</head>
<body>
<div id="wrap">
<div id="header">
<?php printAlbumDesc(true); ?>
<!--[if gte IE 5.5]>
<p>Internet Explorer users should
CLICK HERE to activate the image rollovers.</p>
<![endif]-->
</div>
<div id="gallerytitle">
<h2>
" title="Gallery Index"><?php echo getGalleryTitle(); ?> | <?php echo getAlbumTitle(); ?>
</h2>
</div>
<div id="main-content">
<?php if(PAGINATED) { while (next_album()){ ji_show_thumb();}} else {while (next_album()) { ji_show_thumb(); }}?>
<!--
-->
<?php
while (next_image()):
$ch = THM_HEIGHT;
$cw = THM_WIDTH;
if (isLandscape()) {
list($nw, $nh) = getSizeCustomImage(null, null, $ch);
$ih = $ch;
if ($nw < $cw) {
list($nw, $nh) = getSizeCustomImage(null, $cw);
$ih = $ch;
$iw = $nw;
} else {
$iw = $cw;
}
} else {
list($nw, $nh) = getSizeCustomImage(null, $cw);
$iw = $cw;
$ih = $ch;
}
//$cx = ($iw - $cw) / 2;
//$cy = ($ih - $ch) / 2;
?>
"
title="<?php echo getImageTitle();?>"><img
src="<?php echo getCustomImageURL(null, $iw, $ih, $cw, $ch); ?>"
alt="<?php echo getImageTitle(); ?>"
width="<?php echo $iw; ?>" height="<?php echo $ih; ?>" />
<span><?php
echo 'image size: ' . getFullWidth() . 'x' . getFullHeight();
if (getImageDesc() != '') {
echo '
' . getImageDesc();
} ?></span>
<?php endwhile; ?>
</div>
<div id="fullplate-navigation">
<?php
if (hasPrevPage()) {
echo "\t\t" . '<li id="previous"><a href="' . getPrevPageURL() .
'" title="Previous Image"><img src="' . $_zp_themeroot .
'/images/arrow_left.png" width="16" height="16" alt="left ' .
'arrow" />' . "\n";
} else {
echo "\t\t" . '
-
' . "\n";
}
if (in_context(ZP_IMAGE)) {
echo "\t\t" . '
- <a href="' . getFullImageURL() .
'" title="Full Size Image"><img src="' . $_zp_themeroot .
'/images/arrow_out.png" width="16" height="16" alt="arrows ' .
'pointing out" />
' . "\n";
} else {
echo "\t\t" . '
-
' . "\n";
}
if (hasNextPage()) {
echo "\t\t" . '<li id="next"><a href="' . getNextPageURL() .
'" title="Next Image"><img src="' . $_zp_themeroot .
'/images/arrow_right.png" width="16" height="16" alt="right ' .
'arrow" />' . "\n";
} else {
echo "\t\t" . '
-
' . "\n";
}
?>
</div>
<div id="foot">
<div id="logo">
<a href="
http://www.zenphoto.org"
title="A simpler web photo album">Powered by Zenphoto
</div>
<div id="info">
<?php echo "\t\t" . round((array_sum(explode(" ",microtime())) - $startTime),4).' seconds'; ?> |
<?php echo ji_ver(); ?> |
ZenPhoto <?php echo getOption('version') . "\n"; ?>
</div>
</div>
</div>
</body>
</html>
___________________________________________________
Comments
As the colorbox plugin description says it only loads the script files so they are avaiable. You can set on the plugin's options for what theme page you want them to be available (to avoid unnecessary overhead).
However you have to define the actual colorbox javascript calls yourself. Generally most of the standard themes have colorbox support for the full image display (clicking on the sized image) and image EXIF data..
If you want else you have to modify the theme to add that. How to do this is described on the colorbox website. You should of course know a little html and also have read the theming tutorial.