Avatar

Saving posting drafts, spell-checker (General)

by Peter, Abingdon VA USA, Saturday, May 24, 2008, 09:33 (4942 days ago) @ ralphdn

[*]Spell-checker: My users are understandably unwilling to copy their entire message text over to other software to check spelling, is a feature like this potentially within the realm of mlf?

WBOSS from http://dontpokebadgers.com/spellchecker/ works nicely. Download and install per instructions. mlf modifications are as follows:

Modify templates/default/main.tpl by adding the following to the HEAD section:

 
{literal}
<script src="/speller/spellChecker.js"></script>
<script>function openSpellChecker() 
{  
var text1 = document.postingform.subject; 
var text2 = document.postingform.tags;
var text3 = document.postingform.text;
var speller = new spellChecker( text1, text2, text3 ); 
speller.openChecker();
}
</script>
{/literal}
 

Modify templates/default/posting.tpl.inc starting at line ~203

 
<td colspan="2"><input type="submit" name="save_entry" value="{#message_submit_button#}" title="{#message_submit_title#}" tabindex="8" onclick="return is_postingform_complete('{$smarty.config.error_no_name|escape:"url"}','{$smarty.config.error_no_subject|escape:"url"}','{if $settings.empty_postings_possible==0}{$smarty.config.error_no_text|escape:"url"}{/if}'{if $terms_of_use_agreement},'{$smarty.config.terms_of_use_agree_error_posting|escape:"url"}'{/if})" />&nbsp;<input type="submit" name="preview" value="{#message_preview_button#}" title="{#message_preview_title#}" tabindex="9" onclick="return is_postingform_complete('{$smarty.config.error_no_name|escape:"url"}','{$smarty.config.error_no_subject|escape:"url"}','{if $settings.empty_postings_possible==0}{$smarty.config.error_no_text|escape:"url"}{/if}'{if $terms_of_use_agreement},'{$smarty.config.terms_of_use_agree_error_posting|escape:"url"}'{/if})" />&nbsp;<input type="button" value="Check Spelling" onClick="openSpellChecker();"/>&nbsp;<img id="throbber-submit" style="visibility:hidden;" src="templates/{$settings.template}/images/throbber_submit.gif" alt="" width="16" height="16" /></td>
 

The code added above is

<input type="button" value="Check Spelling" onClick="openSpellChecker();"/>&nbsp;

Try it here: http://appbbs.com/mlf/index.php?mode=posting

--
peter arthur martin


Complete thread:

 RSS Feed of thread

powered by my little forum