Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Plugin: Keyboard Navigation  (Read 38715 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Plugin: Keyboard Navigation
« on: January 06, 2009, 05: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.
« Last Edit: January 10, 2009, 11:02:45 am by eenemeenemuu »
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: Plugin: Keyboard Navigation
« Reply #1 on: January 07, 2009, 01:18:37 am »

Great!  :)
Logged

Scias

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Plugin: Keyboard Navigation
« Reply #2 on: January 08, 2009, 01:09:18 am »

Sounds great, going to give it a whirl now. Thanks for the nice Plugin ;)
Logged

Scias

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Plugin: Keyboard Navigation
« Reply #3 on: January 10, 2009, 10:41:25 am »

Is it intended to only work for logged in Users? If not, that is what i am seeing currently. :(
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Plugin: Keyboard Navigation
« Reply #4 on: January 10, 2009, 11:03:39 am »

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

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

Scias

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Plugin: Keyboard Navigation
« Reply #5 on: January 18, 2009, 12:32:27 am »

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 :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Plugin: Keyboard Navigation
« Reply #6 on: January 18, 2009, 12:40:48 am »

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: [Select]
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
  • **
  • Offline Offline
  • Posts: 86
Re: Plugin: Keyboard Navigation
« Reply #7 on: January 28, 2009, 06:14:51 am »

Awesome. Thank you very much ;)
Logged

Heroe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 124
    • abroadbg.com
Re: Plugin: Keyboard Navigation
« Reply #8 on: April 01, 2009, 06:48:57 pm »

The plugin don't seems to work for me :(
abroadbg.com
user:test
pass:123654
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: Plugin: Keyboard Navigation
« Reply #9 on: April 01, 2009, 09: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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Plugin: Keyboard Navigation
« Reply #10 on: April 02, 2009, 07: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 frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 124
    • abroadbg.com
Re: Plugin: Keyboard Navigation
« Reply #11 on: April 02, 2009, 12:39:20 pm »

I uninstall the plugin :) Timos-Welt is right i dont need at because i us enlarge it.
Thanks guys
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Plugin: Keyboard Navigation
« Reply #12 on: June 09, 2009, 06: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: [Select]
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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Plugin: Keyboard Navigation
« Reply #13 on: June 09, 2009, 08:05:50 am »

I never thought about using other keys than the arrow keys ;)

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 novice
  • *
  • Offline Offline
  • Posts: 21
Re: Plugin: Keyboard Navigation
« Reply #14 on: September 02, 2009, 03: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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Plugin: Keyboard Navigation
« Reply #15 on: September 02, 2009, 04:04:03 pm »

Open codebase.php, find
Code: [Select]
$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: [Select]
$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 novice
  • *
  • Offline Offline
  • Posts: 21
Re: Plugin: Keyboard Navigation
« Reply #16 on: September 02, 2009, 04: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
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Plugin: Keyboard Navigation
« Reply #17 on: September 06, 2009, 01:26:11 pm »

I never thought about using other keys than the arrow keys ;)

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
 

Page created in 0.038 seconds with 20 queries.