|
TypingErrors<< Random Quote | Cookbook-V1 | Reduce Band Width >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
GoalCorrect typical typing errors in a Wiki page automatically. I am pretty bad in synchronizing my left and right hand fingers, so are many others. Thus, a number of words would frequently be typed wrong, and it would be nice if there would be a way to automate corrections. This is not a spell checker. SolutionThe extension implements an automatic replacement of strings (idea: typical typing errors) when a page is either saved or previewed. Error corrections can either be defined in an array ( The array would be defined like: $SpellWords['worng']=>'wrong';
$SpellWords['gloabl']=>'global';
$SpellWords['Oracel']=>'Oracle';
To achieve the same by the Wiki page, simply add equivalences line by line. Blank lines and lines without a "=" are ignored (and can be used as comments). Example worng=wrong
gloabl=global
Oracel=Oracle
The values need not be complete words. Note that the script takes care NOT to apply the replacements to THIS page (it would be a short fun). DiscussionThe script intercepts the InstallationDownload the file Attach:spellcorrect.php and install it into your The Wiki page containing the replacements defaults to Detailed instructions are contained in the script. See AlsoHistoryFirst version 2004-Sep-??. Tested and heavily used with pmwiki-1.0.11 Comments & BugsSince this is straight character string replacement, entries should be selected carefully. ContributorsCopyrightJust the same as PmWiki, naturally. pmwiki-2.2.38 -- Last modified by {{tpahl}}
|