Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 01:04:18 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Maintenance release cpg1.4.25 - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix an issue with http uploads that could occur in particular versions of PHP.The fix is not security-critical, so if your gallery is running fine with cpg1.4.23 or cpg1.4.24 you don't need to upgrade. If you are running an older version than cpg1.4.23, you must update to this latest version as soon as possible because of the security impact (the past few maintenance releases before cpg1.4.24 all were security-related).
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Plugin: Keyboard Navigation  (Read 6958 times)
0 Members and 1 Guest are viewing this topic.
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« on: January 06, 2009, 04:56:53 pm »

With this plugin you can navigate to the previous/next picture, go back to the thumbnail page and switch the file info details via the keyboard arrows.

* cpg1.4.x_plugin_keyboard_navigation_v1.1.zip (1.79 KB - downloaded 369 times.)
« Last Edit: January 10, 2009, 10:02:45 am by eenemeenemuu » Logged

Timos-Welt
Dev Team member
****
Gender: Male
Germany Germany

Posts: 450



WWW
« Reply #1 on: January 07, 2009, 12:18:37 am »

Great!  Smiley
Logged
Scias
Coppermine regular visitor
**
Posts: 82


« Reply #2 on: January 08, 2009, 12:09:18 am »

Sounds great, going to give it a whirl now. Thanks for the nice Plugin Wink
Logged
Scias
Coppermine regular visitor
**
Posts: 82


« Reply #3 on: January 10, 2009, 09:41:25 am »

Is it intended to only work for logged in Users? If not, that is what i am seeing currently. Sad
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #4 on: January 10, 2009, 10:03:39 am »

Thanks for your report. I haven't tested it only while I was logged in Wink

Please see my first post. With version 1.1 it should work for all users.
Logged

Scias
Coppermine regular visitor
**
Posts: 82


« Reply #5 on: January 17, 2009, 11:32:27 pm »

Oh, i apologize for bugging you once again, but one of the Visitors mentioned a good idea, is that will there be a way to change the functions of the Keys? For example, instead of the DOWN ARROW KEY, opening the Information, it could instead scroll down a small amount with each hit, or be held down to continue scrolling?

This would be a excellent addition, though i was unsure if this was thought of yet, so i just thought i'd pass the idea by, this Plugin has a good future to it Smiley
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #6 on: January 17, 2009, 11:40:48 pm »

instead of the DOWN ARROW KEY, opening the Information, it could instead scroll down a small amount with each hit, or be held down to continue scrolling?

Open codebase.php and delete lines 52-56:
Code:
if(Tastencode == 40)
{
blocking('picinfo','yes', 'block');
return false;
}
The rest should be done by the browser (tested with Firefox).
Logged

Scias
Coppermine regular visitor
**
Posts: 82


« Reply #7 on: January 28, 2009, 05:14:51 am »

Awesome. Thank you very much Wink
Logged
Heroe
Coppermine regular visitor
**
Gender: Male
Bulgaria Bulgaria

Posts: 99


WWW
« Reply #8 on: April 01, 2009, 05:48:57 pm »

The plugin don't seems to work for me Sad
abroadbg.com
user:test
pass:123654
Logged
Timos-Welt
Dev Team member
****
Gender: Male
Germany Germany

Posts: 450



WWW
« Reply #9 on: April 01, 2009, 08:40:54 pm »

You're using EnlargeIt! which comes with its own keyboard navigation (and uses the same JS key listener). It doesn't make much sense to me to combine it with eenemeenemuu's plugin?!?
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #10 on: April 02, 2009, 06:51:43 am »

You're using EnlargeIt! which comes with its own keyboard navigation (and uses the same JS key listener). It doesn't make much sense to me to combine it with eenemeenemuu's plugin?!?
I've nothing to add.

I visited your website and keyboard navigation (with EnlargeIt!) works fine for me.
Logged

Heroe
Coppermine regular visitor
**
Gender: Male
Bulgaria Bulgaria

Posts: 99


WWW
« Reply #11 on: April 02, 2009, 11:39:20 am »

I uninstall the plugin Smiley Timos-Welt is right i dont need at because i us enlarge it.
Thanks guys
Logged
TranzNDance
Dev Team member
****
Gender: Female
United States United States

Posts: 6138



WWW
« Reply #12 on: June 09, 2009, 05:24:41 am »

Thanks for this useful plugin, eenemeenemuu! I edited the code to add the ability to use the same shortcuts that gmail uses, in case anyone is interested in implementing it, too:

in codebase.php
Code:
if(Tastencode == 37 || Tastencode == 75 || Tastencode == 80) //left arrow or k or p
window.location = document.getElementById('prev').href;
if(Tastencode == 39 || Tastencode == 74|| Tastencode == 78) //right arrow or j or n
window.location = document.getElementById('next').href;
if(Tastencode == 38 || Tastencode == 85) //up arrow or u
window.location = document.getElementById('thumb').href;
if(Tastencode == 40 || Tastencode == 79) //down arrow or o
{
blocking('picinfo','yes', 'block');
return false;
}
Logged

Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #13 on: June 09, 2009, 07:05:50 am »

I never thought about using other keys than the arrow keys Wink

If desired, it should not be very hard to add a config page where the admin (or maybe each user itself) can choose his/her preferred keys.

Thoughts?
Logged

kryspin
Coppermine newbie

Posts: 19


« Reply #14 on: September 02, 2009, 02:58:42 pm »

Hi,
I just installed the plugin and arrows up and down work just fine, but arrows left and right don't seem to work at all (nothing happens, when pressed). Am I doing something wrong? The site is foto.stulc.cz. I would be grateful for help.
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #15 on: September 02, 2009, 03:04:03 pm »

Open codebase.php, find
Code:
$html = str_replace('><img src="'.$location.'images/prev.gif"', ' accesskey="b" id="prev"><img src="'.$location.'images/prev.gif"', $html);
$html = str_replace('><img src="'.$location.'images/next.gif"', ' accesskey="n" id="next"><img src="'.$location.'images/next.gif"', $html);
and replace with
Code:
$html = str_replace('><img src="'.$location.'images/nav_left.gif"', ' accesskey="b" id="prev"><img src="'.$location.'images/nav_left.gif"', $html);
$html = str_replace('><img src="'.$location.'images/nav_right.gif"', ' accesskey="n" id="next"><img src="'.$location.'images/nav_right.gif"', $html);


BTW: You are running an old version of Coppermine with a lot of security vulnerabilities. Upgrade to the latest version immediately!
Logged

kryspin
Coppermine newbie

Posts: 19


« Reply #16 on: September 02, 2009, 03:12:46 pm »

Thank you so much. Now it works like miracle.

I know I should upgrade, but I made a lot of mods (all from this forum) to the code and I don't really want to loose them. But I know I'll have to do it soon anyway.
Logged
papukaija
Contributor
***
Posts: 32


« Reply #17 on: September 06, 2009, 12:26:11 pm »

I never thought about using other keys than the arrow keys Wink

If desired, it should not be very hard to add a config page where the admin (or maybe each user itself) can choose his/her preferred keys.

Thoughts?
A config page for admins might be useful. User based config page should be admin configurable.
Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.043 seconds with 19 queries.