Jump to content

Letter/word Homophones


Recommended Posts

Has there been a recent mod to the site where the letter that follows "Q" in the alphabet is replaced with "are" and the letter that follows "T" is replaced with "you"?  Presumably, this is to curb SMS-speak.  As much as I dislike the incomprehensible, awkward writing of these products of American public schools and media, this mod makes it really hard to, say, type an MSDOS CR/LF in "\r\n" notation (see?).  I've also seen the bb-code be broken by this, notably the underline (although not in this case it seems).

Link to comment
https://forums.phpfreaks.com/topic/52534-letterword-homophones/
Share on other sites

<?php
print_r($phrases = array(
'Ur 2 cool!',
'The proper DOS/Win line terminator is \r\n.',
'RU seeing this?',
'[u]Underlined[/u]',
"Multi-line r\n\tor r"
));

echo'<hr>';
// Currently it seems to be implemented as follows:
print_r(preg_replace(
array(
	'/\bur\b/i',
	'/\bru\b/i',
	'/\bu\b/i',
	'/\br\b/i'),
array(
	'you are',
	'are you',
	'you',
	'are'),
$phrases)
);
echo'<hr>';
// But this is less aggressive:
print_r(preg_replace(array(
	'/(?<=\s|^)ur(?=\s|$)/im',
	'/(?<=\s|^)ru(?=\s|$)/im',
	'/(?<=\s|^)u(?=\s|$)/im', // This is supposed to be the letter that comes after T
	'/(?<=\s|^)r(?=\s|$)/im'), // This is supposed to be the letter that comes after Q
array(
	'you are',
	'are you',
	'you',
	'are'),
$phrases)
);
?>

 

It even does it in code tags?!  Stupid!

Link to comment
https://forums.phpfreaks.com/topic/52534-letterword-homophones/#findComment-260079
Share on other sites

It is not a mod. Abbreviated words that are commonly used in txt speak are being converted into full English. It is using the built in word censor that comes with SMF.

 

I will have word with the Admins about this too. Especially if is breaking BBCodes.

Link to comment
https://forums.phpfreaks.com/topic/52534-letterword-homophones/#findComment-260113
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.