UBB.Dev
Posted By: JoshPet Who needs a spell checker? - 09/14/2003 9:03 PM
Aoccdrnig to a rscheearch at an Elingsh uinervtisy, it deosn't mttaer in
waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht teh
frist and lsat ltteer is at the rghit pclae. The rset can be a toatl mses
and you can sitll raed it wouthit a porbelm. Tihs is bcuseae we do not raed
ervey lteter by it slef but the wrod as a wlohe.
Posted By: Dave_L_dup1 Re: Who needs a spell checker? - 09/14/2003 9:22 PM
Taht mkeas sesne. I wnoedr if tihs is hrad for a non-nvitae Egnilsh sepkaer to raed.
Posted By: JoshPet Re: Who needs a spell checker? - 09/14/2003 10:21 PM
I forsee a new april fools day mod.
Posted By: TonyN Re: Who needs a spell checker? - 09/14/2003 10:55 PM
Looks to me like it's already Apiirl foool's dayay! Tony
Posted By: slayer60 Re: Who needs a spell checker? - 09/15/2003 3:53 PM
Wlel if you hvae no ccnocneise tehn you can put ltetres in any odrer you wnat. Or if you are jsut czray.
Posted By: msula Re: Who needs a spell checker? - 09/15/2003 5:28 PM
Hey Josh, did you get this from a post on my site? I had two people post about this over the weekend Or was it one of those forward emails that had it?

It is knid of naet tohguh!
Posted By: Ian_W Re: Who needs a spell checker? - 09/15/2003 6:56 PM
manes I can saerwe wthiuot the bepleer aciivnattig

Not sure if you would be able to read supercalifragelisticexpialidocious if those letters were rearranged
Posted By: JoshPet Re: Who needs a spell checker? - 09/16/2003 1:28 AM
it was posted on my board.... through it was cool.
Posted By: msula Re: Who needs a spell checker? - 09/16/2003 3:21 AM
wow.. that post was posted on my site again for the 4th time in 2 days. Must be showing up in people's in-boxes or something, I never see so many reposts
Posted By: Zackary Re: Who needs a spell checker? - 09/16/2003 3:11 PM
Ended up on my site yesterday too... that's just funny.
Posted By: AKD96 Re: Who needs a spell checker? - 09/16/2003 4:46 PM
Whoa! That's freakin' trippy! I read Josh' post just like it was all spelled correctly - no problems at all!
Posted By: JoshPet Re: Who needs a spell checker? - 09/16/2003 6:01 PM
That's because that's how I usually type.
Posted By: navaho Re: Who needs a spell checker? - 09/18/2003 2:49 AM
ya'll are typing like me now.
Posted By: Gardener Re: Who needs a spell checker? - 09/22/2003 8:40 PM
Here ya go:

Open upp addpost.php and find the following lines:
Code
<br />// -------------------------------------------<br />// If Markup is on the we format the markup code<br />   if ( ($Markup == "On") && ( ($convert == "markup") || ($convert == "both") ) ){<br />      $Body = $html -> do_markup($Body);<br />   }<br />


Add these lines ABOVE:
Code
<br />// -----------------------------------------------------<br />// Letter scrambler hack (requires PHP 4.3.0 or greater)<br />   //$scramble = get_input("scramble", "post");<br />   if ($scramble == "on") {<br />      $allwords = preg_split("/\b/", $Body);<br />      while (list($key, $val) = each($allwords)) {<br />         if (preg_match("/^(\w)(.+)(\w)$/", $val, $letters)) {<br />            $NewBody .= $letters[1] . str_shuffle($letters[2]) . $letters[3];<br />         } else {<br />            $NewBody .= $val;<br />         }<br />      }<br />      $Body = $NewBody;<br />   }<br /><br />// End of letter scrambler hack<br />


Now, in templates/default/newpost.tmpl find these lines:
Code
<br /><br /><br />$emailselect<br />


REPLACE them with these:
Code
<br /><br /><br />UBBTPRINT;<br />if ($user['U_Status'] == "Administrator") {<br />   echo '<input type="checkbox" name="scramble" /> Scramble letters in words?<br /><br />';<br />}<br />echo <<<UBBTPRINT<br />$emailselect<br />


That should be it, admins should now have a checkbox to allow them to automatically scramble new posts.
Posted By: TonyN Re: Who needs a spell checker? - 09/22/2003 10:03 PM
well......I dunno about scrambling the admin posts....they already seem scrambled enough to some of us! Tony

(sorry...couldn't resist kidding you guys, Josh et al, who are amazingly helpful)
Posted By: Gardener Re: Who needs a spell checker? - 09/23/2003 5:26 PM
Well, maybe the scrambler makes the posts more sensible then? =]

The reason I only wanted admins to be able to use it is because otherwise every second post would be scrambled probably.

I also noticed that it didn't work quite as well in Swedish for some reason. Possibly because words are often joined making very long words.
Posted By: AKD96 Re: Who needs a spell checker? - 09/24/2003 12:56 PM
LOL. That's a great idea Gardener! I'll have to give it a try!
© UBB.Developers