vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Keyboard Navigator (CTRL+Arrows shortcuts) (https://vborg.vbsupport.ru/showthread.php?t=207550)

Vitaly 03-05-2009 10:00 PM

Keyboard Navigator (CTRL+Arrows shortcuts)
 
1 Attachment(s)
vb 4.x version here

This hack adds some keyboard shortcuts for accelerated navigation. Very convenient, when you browse forum without mouse (notebook with touchpad and so on).

Current shortcuts:
  • Ctrl + Left - previous page (current page - 1)
  • Ctrl + Right - next page (current page + 1)
  • Ctrl + Up - 1 level up.
  • (!) Ctrl + Down - Go to next unread thread in current forum (only for registered forum members)
Demo: http://forum.rcdesign.ru/f22/ (without CTRL+DOWN for guests)

(!) "Next Unread" is taken from end (the most old unread thread). Reason is simple - that makes less returns, since top threads are updated very often.

PS. As you can see from screenshot, only Ctrl + Left/Right have visual helpers. If someone have good idea how to show, that Ctrl+ Up/Down are working too - feel free to share.

This mod is developped here: http://github.com/rcdesign/vb-keyboard_navigator . Patches are welcome.

History

0.6
- Redirects for moved threads caused error for CTRL+Down

0.5
- added lock when cursor focus is in edit area
- removed CTRL+HOME shortcut (uncomment in template, if really need it)

0.4
- added Ctrl+Down

0.2, 0.3
- Small JS fixes
- Nice helpers in pagebar (see screenshot)

0.1
- First Public Release

jonah1892 03-06-2009 08:32 PM

first post :D

interesting mod, ill be trying it on my localhost before i put it on my live site

DieselMinded 03-06-2009 09:34 PM

anyone installed this yet?

GhoHan 03-06-2009 09:37 PM

Good Idea sir
Thank you very2 much
i will try this ..

Vitaly 03-06-2009 10:13 PM

Ups... it was broken in IE, sorry :) . Please, reupload with new JS file (first post updated).

PS. I'm not strong in javascript. So, your experienced advices are always welcome :)

Vitaly 03-07-2009 02:53 PM

Undated to v0.2

1. Simplifyed JS
2. Nice texts in pagebar ( "<- Ctrl" and "Ctrl ->", see new screenshot ).

Thinking about "what to do with Ctrl + Down". Next unread thread in current forum? Is it convenient use-case?

jambo_1969 03-07-2009 03:48 PM

Installed and Uninstalled.

Ctrl up the only one reporting an action.

Vitaly 03-07-2009 04:06 PM

Jambo, refresh page wiith CTRL+F5. Probably, your browser cached old JS file.

You can check here: http://forum.rcdesign.ru - all buttons are ok.

jambo_1969 03-07-2009 04:14 PM

Tar muchly - reinstalled :D

xuanhuy238 03-08-2009 03:51 AM

i don't use shortcut of previous and next pages

dvbusuario 03-09-2009 05:30 AM

Quote:

Originally Posted by xuanhuy238 (Post 1762962)
i don't use shortcut of previous and next pages

Me too!

Vitaly 03-14-2009 05:48 AM

1 Attachment(s)
Everybody welcome to test new version 0.4 !

What's chaged:
  • No uploads needed (desided to include javascript in template)
  • CTRL + DOWN hotkey (not for guests) !!! - Move to new unread thread in current forum. If no new thread - then go up to thread list.
How CTRL + DOWN work.

The most old unread thread taken from current forum. Then user redirected to first unread post in that thread.

Why oldest thread, not newest?

Usability question. Still not desided, what is better. It seems, that top threads are updated more often. So, if you navigate from start, more "come back" happens. IMHO, that's a bit irritating.

How to install:
  1. Make shure, that "readed posts" are tracked in database (forum setting).
  2. Just import product.

Vitaly 03-17-2009 04:17 PM

Fixed some bugs in 0.4 pre-release and released new 0.4 version (first post). Ctrl+Down added enougth functionality to browse forum with shortcuts.

Enjoy!

As you can see from screenshot, only Ctrl + Left/Right have visual helpers. If someone have good idea how to show, that Ctrl+ Up/Down are working too - feel free to shre.

Jasem 03-24-2009 02:12 PM

Great job, thank you!

installed

Vitaly 08-04-2009 06:15 AM

I've added all shortcuts lock, when user edit text in any input or textarea field.

That prevents conflicts, when user wish to move cursor on word left/right, but is redirected to another page instead.

Dr. Bantham 08-09-2009 12:45 PM

Great mod!

The latest version introduces a conflict with cyb Chatbox. The "Message..." prompt will not disappear as it should when activating the input box.

Vitaly 08-09-2009 04:56 PM

Try to comment out (or delete) this block:

HTML Code:

var c = document.getElementsByTagName('input');
for (var i=0; i<c.length; i++) {
    if (c[i].type == 'text') {
        c[i].onfocus = onFocusHandler;
        c[i].onblur = onBlurHandler;
    }
}

in template kbd_nav_block.

Zi55 01-16-2010 04:37 AM

I install it in my forum , but only the CTRL Up/down is working Left and right not working at all
.l try it also in test forum , the same thing happen
Thanks

TK1990 02-24-2010 11:45 AM

Quote:

Originally Posted by Zi55 (Post 1957128)
I install it in my forum , but only the CTRL Up/down is working Left and right not working at all
.l try it also in test forum , the same thing happen
Thanks

Same here.

Vitaly 02-24-2010 11:58 AM

1. vB version ?
2. Skin ?

Please check. that Ctrl -> and <- Ctrl were added as on screenshot from description.

netwind 10-11-2010 03:27 AM

If anybody need work it with vb3.6, just update template 'pagenav'.
This hack need rel="next" and rel="prev" like in modern vb versions.


All times are GMT. The time now is 08:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01159 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete