Добавлено: отправка сообщений по Ctrl+Enter
Open GenericControls.template.php, find:
<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" rows="', $editor_context['rows'], '" cols=" ', $context['browser']['is_ie8'] ? '600' : $editor_context['columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '" style="width: ', $editor_context['width'], '; height: ', $editor_context['height'], '; ', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '">', $editor_context['value'], '</textarea>
replace with:
<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" rows="', $editor_context['rows'], '" cols=" ', $context['browser']['is_ie8'] ? '600' : $editor_context['columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '" style="width: ', $editor_context['width'], '; height: ', $editor_context['height'], '; ', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '" onkeypress="if(event.keyCode==10 || (event.ctrlKey && event.keyCode==13)) {submit();}">', $editor_context['value'], '</textarea>
Then open Display.template.php, find:
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '"></textarea>
replace with:
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '" onkeypress="if(event.keyCode==10 || (event.ctrlKey && event.keyCode==13)) {submit();}"></textarea>
Open Modifications.english.php and paste to end:
// Ctrl+Enter for Quick/Full reply form
$txt['shortcuts'] = 'shortcuts: hit ctrl+enter to submit/post or alt+p to preview';
$txt['shortcuts_firefox'] = 'shortcuts: hit ctrl+enter to submit/post or shift+alt+p to preview';
Open Post.english.php and paste to end too:
// Ctrl+Enter for Quick/Full reply form
$txt['shortcuts'] = 'shortcuts: hit ctrl+enter to submit/post or alt+p to preview';
$txt['shortcuts_firefox'] = 'shortcuts: hit ctrl+enter to submit/post or shift+alt+p to preview';
Взято отсюда -
http://www.simplemachines.org/community/index.php?topic=412538.0