ZenphotoCMS Forum
zpGallerific theme unlogical behaviour - js issue(?) - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: zpGallerific theme unlogical behaviour - js issue(?) (/thread-7080.html)

Pages: 1 2


zpGallerific theme unlogical behaviour - js issue(?) - afarkas - 18-05-2010

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




zpGallerific theme unlogical behaviour - js issue(?) - frankm - 19-05-2010

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.




zpGallerific theme unlogical behaviour - js issue(?) - afarkas - 19-05-2010

Thank You much, Frankm, now i know what to look for and which direction to proceed. Thanks a lot, have a nice day




zpGallerific theme unlogical behaviour - js issue(?) - frankm - 19-05-2010

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.




zpGallerific theme unlogical behaviour - js issue(?) - afarkas - 19-05-2010

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




zpGallerific theme unlogical behaviour - js issue(?) - frankm - 19-05-2010

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.




zpGallerific theme unlogical behaviour - js issue(?) - afarkas - 19-05-2010

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?




zpGallerific theme unlogical behaviour - js issue(?) - frankm - 20-05-2010

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.

  1. in the album page file (album.php) the proper link witht the zoom relation attribute is not created.
    in the definitiion of the you need to replace this piece of code
    `



zpGallerific theme unlogical behaviour - js issue(?) - frankm - 20-05-2010

and i forgot, remove the comment you've put in front of newSlide.find('a') in the js file.




zpGallerific theme unlogical behaviour - js issue(?) - afarkas - 20-05-2010

WOW, man that works fine 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




zpGallerific theme unlogical behaviour - js issue(?) - frankm - 20-05-2010

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.




zpGallerific theme unlogical behaviour - js issue(?) - afarkas - 20-05-2010

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




zpGallerific theme unlogical behaviour - js issue(?) - frankm - 23-05-2010

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.




zpGallerific theme unlogical behaviour - js issue(?) - minutepapillon - 01-08-2010

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 :
By :

2°) in album.php line 71
Replace :
`
" title="">

By :
" title="">

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();
});
`




zpGallerific theme unlogical behaviour - js issue(?) - gonzalu - 31-08-2010

@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




zpGallerific theme unlogical behaviour - js issue(?) - kagutsuchi - 31-08-2010

The forums ate some of minutepapillon's code... I've added code markup to it above.




zpGallerific theme unlogical behaviour - js issue(?) - gonzalu - 31-08-2010

Here are my MOD files

http://manny.org/zenphoto/zpGalleriffic1_0/




zpGallerific theme unlogical behaviour - js issue(?) - minutepapillon - 03-09-2010

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 ...




zpGallerific theme unlogical behaviour - js issue(?) - kagutsuchi - 03-09-2010

Well, the `` tags are allowed markup on these forums, so they weren't appearing, so copying/pasting the code probably wouldn't have worked as expected.




zpGallerific theme unlogical behaviour - js issue(?) - biopixel - 20-01-2011

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.