I've been using the Microsoft Ergonomic 4000 keyboard for about a week now, and decided it's not for me. The wrist rest is uncomfortable, and I've discovered that my right hand has been cheating on one particular vi key stroke (it's the "b" to go back a word), and I just can't undo 20 years of muscle memory.
I've spent the better part of a Sunday afternoon now, searching for what to try next, and I can't decide. Here are the options. What do you think?
<?php
$node = node_load(1443);
$edit = $_POST;
$choice = $edit['choice'];
$vote = $_POST['vote'];
if (isset($choice) && isset($node->choice[$choice])) {
if ($node->allowvotes) {
// Record the vote by this user or host.
if ($user->uid) {
db_query('INSERT INTO {poll_votes} (nid, chorder, uid) VALUES (%d, %d, %d)', $node->nid, $choice, $user->uid);
}
else {
db_query("INSERT INTO {poll_votes} (nid, chorder, hostname) VALUES (%d, %d, '%s')", $node->nid, $choice, $_SERVER['REMOTE_ADDR']);
}
// Add one to the votes.
db_query("UPDATE {poll_choices} SET chvotes = chvotes + 1 WHERE nid = %d AND chorder = %d", $node->nid, $choice);
$node->allowvotes = FALSE;
$node->choice[$choice]['chvotes']++;
cache_clear_all();
drupal_set_message(t('Your vote was recorded.'));
}
else {
drupal_set_message(t("You are not allowed to vote on this poll."), 'error');
}
}
if ($node->allowvotes) {
if ($_POST['op'] == t('Vote')) {
poll_vote($node);
}
print preg_replace(
array(
'/ThinkPad UltraNav/',
'/Apple Keyboard/',
'/Evoluent Ergonomic/',
'/Luxeed Dynamic Pixel LED Keyboard/',
'/Das Keyboard/',
),
array(
'<a href="http://www-307.ibm.com/pc/support/site.wss/MIGR-45868.html">ThinkPad UltraNav</a> - I\'m accustomed to typing on the ThinkPad, but in a desktop, I\'d prefer to NOT have the touchpad',
'<a href="http://store.apple.com/us/product/MB110LL/A">Apple</a> - gets lots of rave reviews, but I\'m not a Mac user',
'<a href="http://www.evoluent.com/kb1.html">Evoluent Ergonomic</a> - interesting design that lets righties get to the mouse easier',
'<a href="http://www.luxeed.com/product_01.php">Luxeed Dynamic Pixel LED Keyboard</a> - cool, but I\'m not really considering it, just thought I\'d throw it in so others could see it',
'<a href="http://daskeyboard.com">Das Keyboard</a> - would have to go with the "Ultimate" for the geek factor.',
),
drupal_get_form('poll_view_voting', $node, FALSE)
);
}
else {
print poll_view_results($node, FALSE, FALSE, FALSE);
if (isset($node->vote) && $node->vote > -1 && user_access('cancel own vote')) {
print drupal_get_form('poll_cancel_form', $node->nid);
}
}
?>
Voting results