enable jcarousel on album.php

Dear all,

how do I enable jcarousel on album.php It works fine on image.php.
I read the documentation, I can edit the variables on image.php and the css... all fine.

I copied the jcarousel code on the album.php. I tried all sorts of things with the code, I enabled it for all the possible pages on "theme options"... It just won't appear on album.php.

I tried the same thing on "zenpage" nothing happens either.

Is there something else to it? why can't I just call the function on album.php?

Thank you very much

Sebastian

Comments

  • acrylian Administrator, Developer
    From the doc `Place printjCarouselThumbNav() on your theme's image.php where you want it to appear.`

    You can't call it on album.php because it is not made for that. It is made to replace the need of the album page so you have the thumbs with the sized image. You will have to make your own custom version of the plugin.
  • that's too bad, I guess I'm not going to be able to do that. I lack the deeper understanding of the structure how zenphoto works, necessary for this task. I don't even have a clue why it shouldn't work! It would do the same thing as it does on image.php. Looking at the code of the plugin, I don't see why not. What's the problem.

    a hint ?

    thanks

    Sebastian
  • acrylian Administrator, Developer
    The problem is - as said - it is coded to work on image.php only. I don't know offhand where to look but lack the time at the moment.
  • I don't have access to a machine to test this out at the moment..but I'd look at how the album and image pages behave differently when it comes to displaying items. The whole structure is different.

    On Image.php for example:

    <?php if (hasPrevImage()) { ?>

    <?php echo html_encode(getPrevImageURL()); ?>

    <?php } if (hasNextImage()) { ?>

    <?php echo html_encode(getNextImageURL()); ?>"

    You'd probably have to rig your album page up with some custom calls, since ZenPhoto would likely be unable to make any sense of a call like..:

    $img = $_zp_current_image->getPrevImage();

    from the album page.

    Anyhow..just a shot in the dark without having a test case in front of me, but hopefully a good hint if you want some ideas on how to get something going.

    Frankly, from what it sounds to me, It sounds like you want a carousel of images above your normal album photos so the user doesn't have to scroll or move their mouse, right?

    If that were the case...and you don't mind a dirty little solution...grab up the jCarousel jQuery plugin (http://github.com/jsor/jcarousel) and do the following:

    `


    jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
    wrap: 'circular'
    });
    });



    Then just wrap your thumbs in the included list elements by modifying their generation functions (I did something very similar for a jQuery LazyLoad setup):
    • `
  • Otherwise you have to dive into the plugin architecture and set something up..which takes a lot more time but if you are up to...have a ball and share your own solutions. :)
  • acrylian Administrator, Developer
    Actually he could just enable the plugin and do the custom code. The original jCarousel script will not work with our jQuery version anymore (we added a trick so it still does). Our plugin probably can display on album.php, it's just not coded for that yet.

    That is why it will probably not be part of 1.4.6 anymore if I manage to get the replacement ready. Together with the slideshow plugin it will become a new plugin while retaining the current function names: https://github.com/zenphoto/zenphoto/issues/349
  • All true, just trying to offer a few options, none are more user friendly than the other except for the difference of the user. ;)

    A little more featureful version:
    http://caroufredsel.dev7studios.com/

    Good advice though...and it'll probablly be a nice simplification to update it and have it manage the jobs that currently take up multiple plugins.
  • acrylian Administrator, Developer
    The jCarousel plugin in the support build now also works on album.php.
  • Thank both of you so much!
    I haven't come round to try the new possibilities, cause I've been on something else...
    I will start on that issue tomorrow.
    One more thing: since I'm rather a newby, where do I find the support build. is it GitHub?

    Thank you!

    Sebastian
  • acrylian Administrator, Developer
    Yes, the support build is on Github but there is a direct link on our download page, too.
Sign In or Register to comment.