Pages (2):    1 2
Member
Member
sbillard   04-08-2010, 22:14
#21

There is no way to get code automatically included in the theme other than the addPluginScript(). You could provide a function that emits the code, but the theme user would have to place a call to the function in his script in the appropriate place.

I am not sure why there is a difference in the behavior, though. The code above (as I read it) should [b]always[/b] load a new page, not a simply a new picture. That is what you get from the getNextImageURL() and getPrevImageURL() functions.

If you want to just load the image you would have to have Javascript that modified the Html

Administrator
Administrator
acrylian   05-08-2010, 08:42
#22

@huogas: No, no side effects, it's just a matter of how a theme is setup.

I agree if you don't want to load the page you have to write some js code for that. It is possible but can't hardly be generalize as it is HTML dependend (since you probably don't want only the image to change but the title, desc, arrows etc as well).

Member
Member
Laurent   05-08-2010, 19:25
#23

Thanks for your answer.
Here is the new code :

`

`
I'll try to do it with a function.

Laurent

Member
Member
huogas   05-08-2010, 20:59
#24

Laurent

What is the main difference with the previous code ?

Thanks

Gaston

Member
Member
Laurent   06-08-2010, 09:31
#25

When you're writing a comment for a photo, and if you made a spelling mistake, for example you use the left or right arrow to correct this. With the first code, the picture change ... not really good !
With the second code, you can use the keyboard arrow in a comment area.

Laurent

Member
Member
huogas   06-08-2010, 10:45
#26

Thanks Laurent.

It's just sad, you could have done a new game: try to catch the end of your comments before the picture changes... ;-)

Gaston

Member
Member
Laurent   06-08-2010, 15:08
#27

I made the plugin. You're right Sbillard is was simple ;-)
So you can see it in action on my site : http://www.latitudes-photos.com

You can download and have information at this page :
http://www.latitudes-photos.com/keyboardnav

But, my english is very poor so can someone can make a better translation please :-)

Thanks
Laurent

Member
Member
huogas   06-08-2010, 15:25
#28

Looks good. By the way, very very nice site and pictures.

Thanks Laurent

Gaston
ps: your english looks ok to me... ;-)

Administrator
Administrator
acrylian   06-08-2010, 16:16
#29

The English description is not that bad...;-). But maybe you should mention which keys you actually can use.

Will add an entry to our extensions section soon.

Member
Member
Laurent   06-08-2010, 17:27
#30

Thanks Acrylian.
I have update the description and a on witch version i have test it.

Laurent

Administrator
Administrator
acrylian   07-08-2010, 09:49
#31

Laurent, you might want to submit your site to the showcase.

Member
Member
huogas   07-08-2010, 12:01
#32

I second the proposal of Malte (maybe not for the same reasons).
Really a nice one.

Felicitations!

Gaston

Member
Member
Laurent   07-08-2010, 14:58
#33

@huogas:I apologize, i didn't see your answer before. Thanks a lot for the compliment.

@acrylian: Ok, for the showcase. Could you do it for me ?

Going to greece this evening, maybe i'll come back with good picture ... maybe.

Regards
Laurent

Administrator
Administrator
acrylian   07-08-2010, 16:12
#34

Laurent, sure, I have to do it anyway, normally we just don't add them without submission. I will add a screenshot of your site then. Have a nice trip.

Member
Member
Laurent   08-08-2010, 09:05
#35

Reply from Greece now.
Thanks a lot acrylian

Regards
Laurent

Member
Member
huogas   08-08-2010, 14:34
#36

In order to get the best of this function, I had to :
-use an anchor just over the image and
-modify slightly the plugin code to branch to the anchor (for not taking any "prime space" in the window):

window.location=nextURL+"#topimage
window.location=prevURL+"#topimage

Was there a more elegant way of getting that result ?

Thanks

Gaston

Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.