PDA

View Full Version : Access Keys for Submit and Preview?


dyepost
01-25-2016, 08:40 PM
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/customizing-vbulletin/vbulletin-templates-graphics-styles/8365-alt-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.