zpGallerific theme unlogical behaviour - js issue(?)

Hi all... i am runnung zenPhoto gallery with zpgallerific theme, which is wonderfull, but i find his behaviour a bit strange and unlogical... in album page, there are thumbs al the left an a big thumb at the right... clicking this big thumb makes only change to the next image, same as You click the next button, or if You click the next thumb in thumbs block ... what for is good this duplicity ... i think the click on the big thumb should rather show the image in max size, same as it do in image view ...

i think this behaviour isdone by query.zpgallerific.js which is part of the theme ...

Is there anyone who knows hot to change this behaviour, pleas? I did try many thing to change it in the main php code, but js i dont understand ...

I got feedback that the gallery is made bad, because to see the full image You have to click 2 more times after entering the album and often people even do not click the "image details" button which leads to image page, because they think it will only show exif or other stuff ... so , finally, they leave the gallery without had seen any photo, they saw only thumbnails and they let you a feedback "your photos are too little"

can anyone help me to solve this?

thank you

Comments

  • frankm Member
    hi,

    the behavior of the gallery display is fully part of the javascript code jquery.galleriffic.js
    if you want to remove the "go next" action when clicking on the big thumbnail you need to edit the file and get rid of the instruction in the buildImage function. unfortunately the file that comes with the theme is minified and it is really difficult to see what you're doing. if you decide to go on, i would suggest you get the extended version of galleriffic.js on the author website (i don't remember it, google it) and edit it.

    somewhere around line 635 you have a piece of code that reads
    `
    newSlide.find('a')
    .append(imageData.image)
    .click(function(e) {
    gallery.clickHandler(e, this);
    });
    `
    if i remember well, you need to comment this call to the click handler and replace it by whatever you want.
    i don't know if this helps. a good source of information regarding the gallery itself is the author's forum (twospy.com i think).

    cheers.
  • afarkas Member
    Thank You much, Frankm, now i know what to look for and which direction to proceed. Thanks a lot, have a nice day
  • frankm Member
    for info,

    my mistake, the galleriffic.js in the zpGalleriffic theme is not minified (mine in my theme is, so the confusion in my head). so go ahead and comment what you need to comment.

    frank.
  • afarkas Member
    TO frankm:

    Thank You,
    I downloaded anyway the newest js... the lines You quoted i found in jquery.galleriffic.js ... but anyway, if I coment, it will only stop show the next image on click on the big thumb ... but the function to open the full image obviously do not exist ... i did try add the php line from image.php which open the full image in colorbox, but it made only errors on the page ... (as i sayd i have no clue about javascript) ...
    So i dont know how to reach that on click on big thumbnail in album.php there will be a colorbox open with the full image as its done in image.php

    Are You able to write a function like this? I am ready to pay for it. Or anyone else? Thank You
  • frankm Member
    hi,

    you can't put php in javascript.
    maybe you should replace the commented piece of code by something like this:

    `
    .click(function(e) {
    $("a[rel='zoom']").click();
    });
    `
    leave the `append(imageData.image)` line uncommented. the relation attribute 'zoom' is what i think is used in the zpgalleriffic theme for link that must open in colorbox. if it is not it replace it by the right attribute.
    hopefully this works for you.

    frank.
  • afarkas Member
    Thank You, frankm,
    unfortunatelly no, it do not worsk...

    in jquery.galleriffic.js i made this:

    `
    newSlide.find('a')
    .append(imageData.image)
    // .click(function(e) {
    // gallery.clickHandler(e, this);
    // });
    .click(function(e) {
    $("a[rel='zoom']").click();
    });
    `
    but on click on big thumb it stays still changing to next image ...

    when i made this:

    `
    // newSlide.find('a')
    .append(imageData.image)
    // .click(function(e) {
    // gallery.clickHandler(e, this);
    // });
    .click(function(e) {
    $("a[rel='zoom']").click();
    });
    `
    there was no image shown at all, nor thumbnail navigation block ... do i something wrong?
  • frankm Member
    soory i forgot lots of thing. actually i've done that some time ago for a website that didn't use zenphoto. anyway...

    1) you need to initialize colorbox for your album page. it is done for the image page but not for the album one. looking at the theme files you need to edit the header file (header.php). there is somewhere a call to colorbox if `$_zp_gallery_page == image.php` add `|| $_zp_gallery_page == album.php`

    this way you will actually be able to call colorbox from within the album page.

    2) in the album page file (album.php) the proper link witht the zoom relation attribute is not created.
    in the definitiion of the <div id="thumbs" class="navigation"> you need to replace this piece of code
    `
    " title="<?php echo getBareImageTitle();?>">
    <?php } ?>
    <?php printImageThumb(getAnnotatedImageTitle()); ?>

    `
    by

    `
    " title="<?php echo getBareImageTitle();?>">
    <?php printImageThumb(getAnnotatedImageTitle()); ?>

    " title="<?php echo getBareImageTitle();?>">
    <?php } ?>
    `
    and finally the in the javascript file galleriffic.js i told you to put `$("a[rel='zoom']").click();` well you should put
    `$("a[rel='zoom']:eq(" + imageData.index + ")").click();`

    i've tried these modifications on the original zpgalleriffic theme i downloaded and it seems to work. hopefully this time i didn't leave anything out.
  • frankm Member
    and i forgot, remove the comment you've put in front of `newSlide.find('a')` in the js file.
  • afarkas Member
    WOW, man that works fine :D im happy!!!
    what should i pay You and how?
    You made a great job, You solved something i wastrying more than a week.
    Let me know please.
    Thank You once again
  • frankm Member
    i'm happy it worked out. it is better if the image opens in full when clicking on the big thumbnail. as for being paid... you'll buy me a beer if i ever come to slovakia one day !! how about that ?

    frank.
  • afarkas Member
    Thank You, Frank, You are a king.
    In slovakia we have great beers, unfortunatelly i am not much in slovakia, only some few week in summer. But anyway, You are wellcome. I live in france this moment, in south of france, in departement "aude", so if You go aroun, You got Your beer here too, but, i will propose You maybe rather wine, the beers here are nothing special, but the wines are great :)
    Thanks again and please, could You send me a link on Your gallery or blog or whatever? i would like to link You in my special thanks mention on my gallery. Thanks
  • frankm Member
    if you want to link to my gallery you can do so with fmphotography.free.fr. this one is not powered by zenphoto. i am currently rebuilding a new site from scratch but am still struggling with few things. i'll send you the new link when the site will be published. cheers, frank.
  • Thannnkkkssss !!
    It works fine for me to.
    This is the sumary of what has to be done (It took me a while to get it out of this posts):

    1°) in header.php line 51
    Replace :
    `<?php if ( ($_zp_gallery_page == 'image.php') && (getOption('final_link')=='colorbox') ) { ?>`
    By :
    `<?php if ( (($_zp_gallery_page == 'image.php') || ( $_zp_gallery_page == 'album.php')) && (getOption('final_link')=='colorbox') ) { ?>`

    2°) in album.php line 71
    Replace :
    `
    " title="<?php echo getBareImageTitle();?>">
    <?php } ?>
    <?php printImageThumb(getAnnotatedImageTitle()); ?>

    `
    By :
    `
    " title="<?php echo getBareImageTitle();?>">
    <?php printImageThumb(getAnnotatedImageTitle()); ?>

    `
    3°) in jquery.galleriffic.js line 633
    Replace :
    `
    newSlide.find('a')
    .append(imageData.image)
    .click(function(e) {
    gallery.clickHandler(e, this);
    });
    `
    By :
    `
    .append(imageData.image)
    .click(function(e) {
    $("a[rel='zoom']:eq(" + imageData.index + ")").click();
    });
    `
  • @frankm I pulled my hair out for days until this thread! :-)

    THANK YOU. Beer on me when you're in NYC next.

    @minutepapillon, thank you for pointing me to this thread from your search on doing this. However, your instructions are missing something, not sure what but when I followed yours, it did not work for me. So I followed the complex thread and posts by frankm above and ended up with a working zpGalleriffic theme with a colorbox popup on click of big thumb. I will post my updated files somewhere so that some others looking for this fuctionality can just install the files ;-)

    THANK YOU ALL for this!!

    Visit my site to see it in action
    http://www.thrustimages.com/

    Manny
  • The forums ate some of minutepapillon's code... I've added code markup to it above. :)
  • Hi everyone !!
    Sorry gonzalu if it didnn't work for you ... :o(
    By the way, what is MOD files ?
    Before trying to Re-understand and rewrite my recipe up there, kagutsuchi, is it sure that some of the got "eaten by the forum" ?
    For a friend of mine, it doesn't work either ... I haven't kept a text file of the stuff ...
  • Does this work for v.1.4?

    I have installed the files gonzalu provided but it's the same old colorbox as before, change to the next image.

    It would be really nice to get this modification to work.
  • This has been something that's always bugged me, though it wasn't very important and since I'm new at this, I've ignored it.

    I uploaded the Moded files to my gallery, but it didn't seem to do anything. Is anyone else having a problem with this?
  • Hello everyone. I have not updated my ZenPhoto to 1.4 yet so I do not know if it should work or not. I am going to attempt to do so and if zpGalleriffic breaks, I will try to fix it. However, without gjr and his expertise, I am afraid we may be SOL.

    So, bottom line is that you should try this mod on the older 1.3 release which is what worked and what I use today on my site

    http://www.thrustimages.com/

    Until I upgrade to 1.4 I can't even begin to comment on if this mod works or not :-(

    Thanks
  • gjr Member
    I am working on updates to my themes and zpGalleriffic will have this feature (colorbox in galleriffic), amoung lots of other things. I just don't have a lot of time these days!! I will complete as soon as I can...:)
  • Looking forward to the update of zpGalleriffic, a beautiful theme and with the feature of colorbox it will be great!
    Keep up the good work :)
  • My zp gallerific suddenly is wrapping strangely. I have eight gallery boxes on front page but without warning we now see 4 in the top row
    a single in the middle
    and the other three at the bottom

    no update from vs.1.3.1

    also the overview now wraps differently too..utilities were always on the right..now at bottom
Sign In or Register to comment.