vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=264)
-   -   Access Keys for Submit and Preview? (https://vborg.vbsupport.ru/showthread.php?t=321590)

dyepost 01-25-2016 08:40 PM

Access Keys for Submit and Preview?
 
The members of my forum have asked that I add Alt-s and alt-p keyboard shortcuts to the forum. I have been searching for a solution and did a search here and cannot find. Not sure if I am using the right search string or what.

What I did find was this link http://www.vbulletin.com/forum/forum...t-s-for-submit

Which seems straight forward enough except I am not sure which templates I need to modify. Additionally, that is a really old post and possibly not relevant to me. I tried doing a search in the templates and still can't seem to find where to modify this code.

My forum www.crunktimes.net is using a new and default install (except for Tapatalk) of VB5.1.10. Can anyone tell me where in VB5 I need to modify code to add access keys for submit and preview?

Replicant 01-25-2016 08:54 PM

Javascript may be a viable issue to bind your keyboard events to the submit and preview functions since they are javascript events as well.

dyepost 01-25-2016 09:14 PM

Ah, then I have some learning to do it seems.

noypiscripter 04-24-2016 05:30 AM

You don't need Javascript to set accesskey which is just an HTML attribute that automatically generates a keyboard shortcut (e.g. ALT+accesskey or ALT+SHIFT+accesskey).

To do this without modifying existing templates, do it via Replacement Variable Manager (AdminCP > Style > Replacement Variable Manager > Add New Replacement Variable)

For Post and Post Reply buttons:
Search for Text: js-content-entry-submit"
Replace with Text: js-content-entry-submit" accesskey="p"

For Preview button:
Search for Text: js-content-entry-preview"
Replace with Text: js-content-entry-preview" accesskey="r"

Change the accesskey characters as desired.


All times are GMT. The time now is 01:56 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.01627 seconds
  • Memory Usage 1,714KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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