echo $lang[MSG_SPELL_INTRO];?>
echo $lang[MSG_LANG]." : ";?>
$text = $writebodytext;
$writebodytext = trim($writebodytext);
$writebodytext = ereg_replace("[\r\n]", " ", $writebodytext);
getusersession($id, $user, $config);
$fpath = getfolderpath($user);
$spelltext=($htmlopener?html_entity_decode(strip_tags(str_replace("<"," <",$writebodytext))):$writebodytext);
$result = spellcheck("CHECK|$mylang", $spelltext, $fpath);
$words = explode(";", $result);
if ($result)
{
$index = 0;
for ($i=0; $i < count($words); $i++) if ($words[$i])
{
$pos = strpos($text, $words[$i]);
if ($pos)
{
$word = substr($text, 0, $pos);
if ($word)
{
echo "";
if($htmlopener) $word=html_entity_decode(eregi_replace("<((br)|(p)|(/p))[^>]*>","\r\n",strip_tags($word,'
')));
echo nl2br(htmlspecialchars($word));
$index++;
}
}
$text = substr($text, $pos + strlen($words[$i]), strlen($text) - strlen($words[$i]) - $pos);
$Sresult = $words[$i].';'.spellcheck("SUGGEST|$mylang", $words[$i], $fpath);
$Swords = explode(";", $Sresult);
echo "
";
$index++;
}
}
if ($text)
{
echo "";
$text=trim(strip_tags($text)); //+nl2br
if($text) echo $text;
}
?>
|