Colorbox customization

Hi There,

Is there any way to currently customize colorbox on zenphoto?

For example, I know colorbox has a functionality to resize the image based on the viewer's screen size, but that is not being used in zenphoto.

Also, there are several "themes" for colorbox, as seen here:

http://colorpowered.com/colorbox/core/example1/index.html

Any idea on how to make use of those?

Thanks! :)

Comments

  • acrylian Administrator, Developer
    I know colorbox has a functionality to resize the image based on the viewer's screen size
    As far as I know this is default behaviour which can just be refined to what % it should fit. The Zenpage theme uses that on image.php. The defines are in the head section of that file and can be change to whatever you like.

    Colorbox is located in zp-core/js/colorbox. Feel free to add any theme you like as well. I am sure it is even possible to put that into your theme and point the colorbox define to that location instead of putting it in the core.
  • Hi Malte,

    Thanks for the insight. I just realized I was looking on the wrong place for colorbox. I'm using the "slideshow" option with jQuery and thought that it uses colorbox, but it doesn't.

    Colorbox is only used when you click on each image, and then it "pops up".

    I know that zpfocus has colorbox implemented with slideshow functionality, do you know if it would be hard to implement this functionality on zenpage?

    Thanks!
    Carlos
  • acrylian Administrator, Developer
    Yes, the normal slideshow uses the Cycle jQuery script because of some more features (transitions and such). And Colorbox is just used to "zoom" to the full image in the Zenpage theme.

    The Colorbox slideshow could be used on any theme but to get all images in that and not just those of the current page (if on album.php with the thumbs) you will have to generate a list of all images first in the background in hiding and then call the Colorbox on that.
  • Hi Malte,

    Thanks for your help! I had a look at zpfocus code, and looks like the way it is done there is using the following code to grab all the images:

    <?php $x=0; while (next_image(true)):
    if ($x>=1) { $css='noshow'; } else {$css='slideshowlink';} ?>
    " rel="slideshow" href="<?php echo htmlspecialchars(getFullImageURL());?>" title="<?php echo getBareImageTitle();?>"><?php echo gettext('Play Slideshow'); ?>
    <?php $x=x+1; endwhile; ?>

    Do you think something like this (with small adjustments as necessary) would also work for the zenpage theme? :)

    Thanks!
    Carlos
  • acrylian Administrator, Developer
    The code is not properly escaped (backticks or HTML code tag) so I can't see it but looks like that principle might work (maybe better use the object model then you could use probably the same code on album.php and image.php).`
  • thank's for answer.
    Now it works...

    Note:
    - I've replace the old folder colorbox by colorbox-master (zp-core/extensions/).
    - Removed "colorbox_js.php" in zp-core/extensions/ and replace by "jquery.colorbox.js"
    - Change old "jquery.colorbox-min.js" by new one in "themes/bootstrap/js/"
    // Done
  • oops it's a mistake .. wrong post.. i'm confused
Sign In or Register to comment.