Colorbox Video Problem

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

  • acrylian Administrator, Developer
    That is not possible and a colorbox limitation. To call videos you have to put them on a page and call that via the colorbox iframe mode.

    If I am correct at least on the Zenage theme the colorbox is disabled for non image items.
  • Thanks for the reply. That's not so bad and I don't mind if videos don't show up with colorbox as long as it can be disabled for non image items as you said.

    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!
  • acrylian Administrator, Developer
    Well parts from all. All that needs to do is not attach the class the Colorbox triggers on on your theme to the link if you have a non image item. That is was the first if sorts out and then the result is echoed below.
Sign In or Register to comment.