colorbox and zenphoto issue

Hi there,

okay i have read a million topics and none of them fix my issue on this.

We are using zenphoto for our image gallery and everything we have done so far has worked and all looks good.. Apart from one annoying thing!

When you click on the image to see the full size (through colorbox) all is great apart from it does not show previous or next buttons, it only shows the close button.

I have checked the control images are linked correctly and all are fine, i have updated all colorbox files and still nothing :(

On the zenphoto site it says:

Note that this plugin does not attach Colorbox to any element because there are so many different options and usages. You need to do this in your theme yourself. Visit the colorbox site for information.

Any ideas on how i can get the showing? Would be much better then having to click out all the time and would probably keep people looking for longer.

UPDATE When i inspect the page i can see the code for it but it is dark in color for some weird reason.


Thanks.

Comments

  • acrylian Administrator, Developer

    You didn't mention what theme you are using. But generally official themes use Colorbox on the single image page to "zoom" the full image. That full image is not an actual "theme page" and for full images there is no previous and next. Because that is what the single image page is for.

    If you use it on the album view - the thumbs - on the imaeg directly, the code must be setup with the rel= attribute (see the colorbox docs, I don't rememeber what value) to get prev/next an all elements on that page.

  • acrylian Administrator, Developer

    I quickly look, the setup should be like this:

    JS code like this:

    $("a.gallery").colorbox({rel:"imagegroup"});

    HTML like this:

     <a href="your-image1.jpg" class="gallery" rel="imagegroup">…</a>
     <a href="your-image2.jpg" class="gallery" rel="imagegroup">…</a> 
     (…)
    
  • lost me totally.. lol

    i am using the zpArdoise-master theme but we have highly modified it.

    ok if you go here http://battlefieldinformer.com/gallery/battlefield-2042/battlefield-2042-wallpapers-art/battlefield-2042-master-of-arms-wallpaper.jpg and click on the image all is good, not sure what you mean by single page? this is in album section.

    Also was looking for the rel but not sure where i should add it?

    Thanks for the quick response been trying to solve this for a couple of years now kinda annoying.

  • if the images are served through zenphoto how would i use: your-image1.jpg? that is only for standalone i think. The images are uploaded through zenphoto and does not use the index.html

  • acrylian Administrator, Developer

    First, zpArdoise is not an official theme I am not that familar with.

    ok if you go here http://battlefieldinformer.com/gallery/battlefield-2042/battlefield-2042-wallpapers-art/battlefield-2042-master-of-arms-wallpaper.jpg and click on the image all is good, not sure what you mean by single page? this is in album section.

    That is the single image page. The colorbox opens the full image, there is no prev/next.

    If you care about SEO I strongly suggest to set teh modrewrite suffix on the options as you might get into trouble as the URL looks like a direct call of an image. That may be judged as miming with bad intentions.

    The your-image1.jpg was an placeholder example. But what you want to do will not work on that page as the other images are not available on that page for a colorbox gallery. Sorry. It could be done but involves some custom (theme) coding.

    If you haven't I suggest to read: these
    https://www.zenphoto.org/news/zenphoto-glossary/ (to understand the terms we are using)
    https://www.zenphoto.org/news/theming-tutorial/ (to learn about the basics of theming).

    Also note that the colorbox plugin itself will become deprecated with the next release.

  • Thanks for the info, and yes i was wondering about the url, i have modrewrite enabled but unsure of what to add for its suffix as i don't want anything at the end of the url. is that possible as if i put a suffix it displays like .jpg.php which looks weird tbh.

    Last note you say colorbox is going to be deprecated, will anything replace this?

    Thanks

  • acrylian Administrator, Developer
    edited September 2022

    Yes .jpg.php is a rewrite suffix but I recommend using .jpg.html. Just .jpg is bad in any case.

    It is not possible without the image suffix (or a suffix at all) as Zenphoto being filesystem based can have images with the same name except the suffix. So you could have image.jpg, image.gif, image.png or even other files. For ZP to differ them the image suffix is required currently. Also it will be harder to differ between image urls and album url.

    We might have something for this in the future but not really a priority. (In mobile times no one looks at URLs anyway ;-))

  • acrylian Administrator, Developer

    ast note you say colorbox is going to be deprecated, will anything replace this?

    It will still be in the next release and yes there will be a replacement once it is removed.

  • Okay great ;) i changed the url now to .html thanks for the info.

Sign In or Register to comment.