Hi there, i want to customize my Gallery2 to have a new behavior.
When i click on a picture on an album, i would like to go to the next picture not zoom (full size) on it.
The same functionality like on facebook. It's more comfortable to switch on photos with a link on all the picture and not on a little link on the top right.
What script i have to modify to obtain this behavior ?
Thanks
Posts: 27300
I would choose a theme that has this behavior since the script is already written for this.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
Giooo, i got the same problem, but cant solve it. Iam new in G2. My idea of solving - change code in template and add code of "next" button to image button. I think it is the simplest variant. But another trouble - i cant find code of image
Posts: 27300
http://themes.gallery2.hu
Find a theme that has this behavior. NZDI comes to mind.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
I tested about ten themes, wich have this feature in demo, but in fact its not there and in customisation there is no such function. I ll try NZDI, but i want to customize my theme..
Posts: 27300
Look how the NZDI theme does it and add that feature to your theme.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
Giooo, if it is good for you, you can try my variant. Eg matrix theme. In file photo.tpl look for "{g->image id="%ID%" item=$theme.item image=$image" ( line 74) and change it in such way
<a href="{g->url params=$theme.navigator.next.urlParams}">{g->image id="%ID%" item=$theme.item image=$image
fallback=$smarty.capture.fallback class="%CLASS%"}</a>
On click you will go to next page (dont forget to clear template cache to see changes). If its good for you - then SLOVED
Posts: 2
It doesn't work, i have clean cache template on the Maintenance of the Admin part but when i click on a pics, it load me the biggest view not the next middle view. :/
Posts: 13
Thanks, this is very helpful, I tried, it works! (I m using matrix theme of gallery 2.3 and created a directory "local" in "templates" and copied "photo.tpl" to this new directory then modified this new "photo.tpl" and then deleted template cache.)
Btw, this is a problem:
when browse to the last image of the album, clicking image leads to the homepage of the gallery but I do not want that, I just want it to jump back to the page of that album. Then how to solve the problem?
Posts: 7
if it helps anyone I wanted basically the same thing, I did this:
{if ($theme.navigator.next.urlParams != $navigator.last.urlParams)}
<a href="{g->url params=$theme.navigator.next.urlParams}">{g->image id="%ID%" item=$theme.item image=$image
fallback=$smarty.capture.fallback class="%CLASS%"}</a>
{else}
<a href="{g->url params=$theme.navigator.first.urlParams}">{g->image id="%ID%" item=$theme.item image=$image
fallback=$smarty.capture.fallback class="%CLASS%"}</a>
{/if}
when it gets to the last picture is starts over at the beginning, but you could probably change the second href= to anything