Version: , by TAW (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 03-21-2001
Last Update: Never
Installs: 0
No support by the author.
Here is the very much better version 1.1
Here is the basic code
Replace #KEY# with what key you want
Copy and paste if you want more in the same fashion
Give me some feedback
Place this code into headinclude template
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var key = new Array(); // Define key launcher pages here
key['#KEY#'] = "URL FOR THIS BUTTON";
key['#KEY#'] = "URL";
key['#KEY#'] = "URL";
key['#KEY#'] = "URL";
function getKey(keyStroke) {
isNetscape=(document.layers);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.location = key[i];
}
document.onkeypress = getKey;
// End -->
</script>
That has to be placed into the <head>
Heres my example...
Code:
<!-- Begin
var key = new Array(); // Define key launcher pages here
key[' '] = "index.php";
key['f] = "search.php";
key['e'] = "javascript:history.go(-1);";
key['w'] = "usercp.php";
function getKey(keyStroke) {
isNetscape=(document.layers);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.location = key[i];
}
document.onkeypress = getKey;
// End -->
</script>
Pressing spacebar takes you to Homepage of forums
f takes you to search
e goes to the last page
w goes to the profile section
Soon to come.... The number buttons to quickly go to a forum
ie - pressing one goes to forumdisplay.php?forumod=1
AND
this is my favorite
Shift + number..... eg ! (shift1)
Goes to newthread.php?forumid=1
Anymore suggestions?
NOTE: Be sure to tell your members by something in header or footer otherwise idle keyboard smashing sessions will get them very confused :-P
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
It only uses javascript though, so I am not sure an automatic, updating one would be possible, although I will make a nice looking editable table and a popup
Problem with popup is that people close popups quickly if they havent clicked a link to them
I wouldn't make it so you can use ALT-key combinations for several reasons.....
1. Not all computers have ALT Keys.
2. It will interfere with accessibility rules created in the HTML/XHTML standard, especially the "ACCESSKEY" attribute which uses the ALT key as a qualifier. You can try this by pressing ALT-S to submit a message here in these forums.
3. You could most likely create a conflict with the menuing system of the browser.
The only problem with making it so you can use this for going to forums is most communities have more than 10 forums. According to vBulletin, SPF has over 50 different forums, though some forums have been deleted and don't actually exist anymore. I have been to communities with over 150 different forums. A better solution might be to add "accesskey="J" to your Forum Jump Box and that simple keypress will select it then all your members to select a forum using their arrow keys.