Hi guys,
I would like to see a nice feature in the gallery: on the photo page when user clicks on the photo itself, the next photo should be displayed. It's the same behaviour as the NEXT button, but it's more useful if the user has the possibility to click on the image instead, and he or she doesn't have to locate the next button and click on it (in some cases user has to scroll down to locate it).
I don't know where to implement it: in a theme or in a module or in the gallery 'core', but I the best way would be to have it generally available independently from the theme.
Of course the question is: is it easy to implement?
Regards,
JM|Tomi
Posts: 1857
It should be a theme-level issue.
What theme are you using?
Posts: 27300
temmpg is right.
It would be up to the theme author to have this behavior.
I have not tried all themes:
http://codex.gallery2.org/Category:Gallery_3:Themes
but I can assume that one might have this behavior or a admin setting to do so.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 54
Currently I use the wide-wind. Could you guys give me a short guide where to change the theme?
Here is the corresponding photo.html.php:
The line starts with '<a href...' will open the full size image, this is the part I have to change.
The paginator has a lot of stuff I think this is what I need:
I'm not familiar with the variable scopes between these .html.php files, are they accessible from each other?
And a checking should be performed to see if the next page is exist or not (in case of last page). I tried to change the lines around 'a href' to this:
But it's not ok yet... no link is assigned to the photo. I guess the scopes of the variables.
And what should I set for the class?
Regards,
JM|Tomi
Posts: 54
Ok, now I'm sure the problem is that the $next_page_url is not accessible from the photo.html.php, so the 'a href' part is skipped. How can I have it in that file?
Thanks,
JM|Tomi
Posts: 1857
Replace the g-photo div with this one:
(I'm not sure if that theme has an icon for access to full-sized images; if not, changing this will eliminate access to full-sizes.)
Posts: 54
Ok, this was the winner solution!
It wasn't easy, because there is a great function in the paginator.html.php that can be used for the next image url (next_page_url), but only inside the paginator.html.php!
From photo.html.php it is not accessible.
Thanks,
JM|Tomi
Posts: 27300
Care to create a new theme and share with others?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 54
Hi Dave,
I will do it just give me some days. Right now I'm very busy with my work.
Regards,
JM|Tomi
Posts: 26
Yes! This is a feature I've been waiting for. Thank you so much!
Posts: 263
I was wanting to do this also, I do understand what tempg did, but I cant seem to follow what JMTomi Is saying or what he changed or edited.. If someone can lead me in the right direction I would appreciate it....
Thanks..
Marcus
Posts: 54
Hi,
Ok, here it is stepbystep (for widewind theme, I don't know if the other themes are different but should be similar):
1. open widewind\views\photo.html.php
2. goto line 33
This <div...> section generates the photo on the photo pages:
3. Replace this section to this:
That's all!
Regards,
JM|Tomi
Posts: 54
Hi Dave,
Where can I upload the new theme? Could you help me?
And about the name: what about Widewind_click4next.zip?
Also changed the theme.info to this:
name = "Wide Wind Click 4 Next"
description = "A 100% width theme based on the default wind theme (by floridave) with click on the photo for the next one extension."
version = 1
author = "JM|Tomi"
site = 1
admin = 0
Is it correct (regarding the angle of copyright)?
Thanks,
JM|Tomi
Posts: 27300
No need to credit me.
Just attach the zip file here and I will create a codex page for you. Or better yet start a new thread for your new theme.
Thanks for your contribution.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 54
Here is the new theme that has this feature. Just click on the photo to navigate forward.
Try it and write if something went wrong.
Regards,
JM|Tomi
Posts: 263
Thanks JMT and Dave, Im using Clean Canvas Wide and it works fine, It also works with the non wide version, and browny wind..
I have those with the new file inserted and zipped as I sent the cool new change to a couple of users of those other themes. I can post but i was thinking it would be up to the theme designer?
I did find one bug, You can no longer use Daves, resize_protect which i really like, think it has to do with the overlay or something..
Marcus
Thanks again..
Posts: 1857
You have a link to resize_protect? (I assume it's a module, but I don't see it listed on the modules page.)
Posts: 263
Here It is, I had this activated when i first tried your script change, that is why i thought there was more to making the click for next image then you posted, once i removed resize_protect all was fine..
Thanks..
Marcus
http://codex.gallery2.org/Gallery3:Modules:resize_protect
Posts: 1857
Okay. Go back to the theme's photo.html.php file and replace the g-photo div with
Posts: 263
Ok, Thats not working for me, I can still see that protection overlay loading on top of the actual photo thus disabling you from clicking on it (as im sure you know), I did find something funny and i know these no right clicks and overlays are only deterants and wont save photos If anyone really wants them. but if your on a slow connection like i am with my laptop, you can actually beat that module to the punch, just hit refresh and you can right mouse click and get the original photo before the overlay gets a change to load on top....
Posts: 27300
Fixed a typo on the modules page to allow it to show on the list now.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 1857
Okay. I'll have to install and play around with the resize_protect module. I'm not totally sure what the overlay is or exactly what you're seeing. Likely won't get to it today though.
(And yes, deterrent only.)
Posts: 8
Thank you for this! I made this change using Grey Dragon theme and it worked perfectly.
Posts: 37
Handy little change, thanks!
Posts: 1
i use Gallery 3.0.4 and Grey Dragon Thema 3.2.2, and i changed the lines 66, 67, and 68 of my themes/greydragon/views/photo.html.php.
original version:
changed version:
additionally, to get the first image of an album if you click on the last image of that album, i added the following lines of code after line 117. (there the div-element, which has the id 'g-photo', has been closed.)
works perfectly fine...