Hello,
Is it possible to navigate from image to image by using left/right arrow keys? About the same way as in Facebook. I currently have a fresh install with the default plugins only. Hopefully this is possible to achieve without any extra plugins. Couldn't get it to work i Fx 3.0 at least.
Comments
1. HTML: Using access keys within : http://en.wikipedia.org/wiki/Access_keys
2. Javescript: Using eventhandlers (onKeydown etc): http://www.w3schools.com/jsref/jsref_events.asp
Insert this code snippet in the file: "zenphoto/themes/default/image.php" just before the tag "</head>",
- ------8<------
<!-- JavaScript code to support arrow key shortcuts for navigation -->
<!-- Jorge Matias <jdsm@ist.utl.pt> [24-May-2011] -->
<script type="text/javascript">
document.onkeydown = checkKeycode
function checkKeycode(e) {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
switch(keycode)
{
case 37:
<?php if (hasPrevImage()) echo "window.location =\"".html_encode(getPrevImageURL())."\";\n"; else echo "void(0);\n"; ?>
break;
case 39:
<?php if (hasNextImage()) echo "window.location =\"".html_encode(getNextImageURL())."\";\n"; else echo "void(0);\n"; ?>
break;
}
}
</script>
- ------>8------
Jorge
I did search for it here Acrylian, but all I found was this thread. I'm probably just a newbie...