I've tried my best but I am stumped. I recently implemented colorbox into a tweaked default theme directly from album.php but I am having issues with video files.
I used the guide linked in the forums found here:
http://halfelf.org/2012/zenphoto-and-colorbox/I have all images from albums loading in colorbox just as I want, except video files are not loading in colorbox. All video files are in the same folder as the image files and are not linked to a third-party site. I have tried videos in every supported format and none work.
Ideally I would like the videos to load in colorbox just as images do, however it would also be fine if video files were excluded from colorbox all together.
Here is what I have so far..
IN HEAD
<script type="text/javascript">
// <!-- <![CDATA[
$(document).ready(function(){
$(".colorbox").colorbox({inline:true, load:true, href:"#imagethumb"});
$("a[rel='showcase']").colorbox({maxHeight:"100%" });});
// ]]> -->
</script>
IN BODY
<div id="images">
<?php while (next_image()): ?>
<div class="image"><div class="imagethumb">
" rel="showcase" title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getAnnotatedImageTitle()); ?> </div></div>
<?php endwhile; ?>
</div>
I appreciate any help. Thanks!
Comments
If I am correct at least on the Zenage theme the colorbox is disabled for non image items.
I tried to adapt the code from the zenpage theme without any luck. I get a ton of errors.
Any idea what part of this code I need to extract and use in my theme?
<div id="image">
<?php
if(getOption("Use_thickbox") && !isImageVideo()) {
$boxclass = " class=\"thickbox\"";
} else {
$boxclass = "";
}
if (isImagePhoto()) {
$tburl = getFullImageURL();
} else {
$tburl = NULL;
}
if (!empty($tburl)) {
?>
"<?php echo $boxclass; ?> title="<?php printBareImageTitle();?>">
<?php
}
printCustomSizedImageMaxSpace(getBareImageTitle(),580,580); ?>
<?php
if (!empty($tburl)) {
?>
<?php
}
?>
</div>
Thanks again!