Hey guys,
if you want to look through a new album of your friend (one-picture-view), it can be very annoying to click everytime on this small "next"-button above the picture, especially if your friend often turned his camera, so you have a change between landscape and upright format - so this "next"-button is not at the same place due to various picture-format.
I tried to write a small plugin, but I didn't find any possibility to work this out. So I tell you where you have to insert some code.
You have to edit the template-file "photo.tpl", so find it at something like this: yourGalleryFolder/themes/yourTheme/templates. Make here a new folder called "local" and copy the photo.tpl in this new folder. Now you have to edit this copied file:
Find this piece of code:
{g->image item=$theme.item image=$image fallback=$smarty.capture.fallback}
Overwrite it with this:
{if isset($theme.navigator.next)}
<a href="{g->url params=$theme.navigator.next.urlParams}" title="{g->text text="Next"}">
{/if}
{g->image item=$theme.item image=$image fallback=$smarty.capture.fallback}
{if isset($theme.navigator.next)}
</a>
{/if}
Now you can click at this one-picture-view on your pics and it will load the next one (if it wasn't the last).
I hope, this can help you... and sorry for my bad english ;)
Some greets from Germany,
Patrick
Posts: 207
does not work on matrix... for me anyway
Posts: 1
I tried to do this on the carbon theme, but it doesn't work.
What am i doing wrong?
Sander
Posts: 16503
Works for me in Matrix, make sure you clear your cache:
http://codex.gallery2.org/Gallery2:Editing_Templates
FAQ: How can I clear cached data?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 11
The code doesn't work, but:
Find this piece of code (for matrix theme):
{g->image id="%ID%" item=$theme.item image=$image
fallback=$smarty.capture.fallback class="%CLASS%"}
and replace it with:
{if isset($theme.navigator.next)}
<a href="{g->url params=$theme.navigator.next.urlParams}" title="{g->text text="Next"}">
{/if}
{g->image id="%ID%" item=$theme.item image=$image
fallback=$smarty.capture.fallback class="%CLASS%"}
{if isset($theme.navigator.next)}
</a>
{/if}
Then it works!
Good luck!