October 18, 2011 in Feedback
When this feature is enabled the topic titles are changed automatically regardless of whether they are actually all uppercase or not. I searched the tracker for this, it was reported as a bug back in January 2009 and the answer given was that it's working as intended. If that is so then I humbly suggest that the intent was wrong and that it should be changed. My board is in French and in our language we don't capitalize every word, the behavior of this feature forces me to choose between letting my members shout in titles or have every topic title in my forum spelled wrong.
I'm not asking that the system becomes language aware and changes topic titles to be spelled properly based on the forum/member language. I just wish that this feature would only change the when they're are actually all capitalized.
I think it's acceptable that "CECI EST MON SUJET" becomes "Ceci Est Mon Sujet" although it's still not correct in french. I do however think that if someone writes "Ceci est mon sujet", which is the correct spelling, it shoulnd't be turned into "Ceci Est Mon Sujet".
While this post is rather old I have just run across this problem with brand name spelling, which must be exact.
I decided to post the fix here for anyone who may need it. Note that I am running on version 3.4.4 so if you already have 3.4.5 the line numbers may be off a bit.
Insert a new global function 'IPSText::isShouting' to '/admin/sources/base/core.php' at line 4325:
* Add shout checking
static public function isShouting($str)
preg_match_all('/[a-z]/', $str, $matches);
$ltot = count($matches);
preg_match_all('/[A-Z]/', $str, $matches);
$utot = count($matches);
if ($utot > $ltot && (($ltot / $utot) <= 0.25))
change line 4326 in 'admin/applications/forums/modules_public/ajax/topics.php':
if ($this->settings['etfilter_shout'] && IPSText::isShouting($title))
change line 1361 in 'admin/applications/forums/modules_public/moderate/moderate.php':
change line 469 in 'admin/applications/forums/sources/classes/post/classPost.php':
change line 1143 in 'admin/applications_addon/ips/blog/sources/classes/post/blogPost.php':
The 'IPSText::isShouting' function will identify the text as shouting if 75% or more of the characters are uppercase. You can tweak this and it probably should be added as a system setting for easy modification. I presented this as a core change in the hope that it would be added into the base code.
I hope someone finds this useful...
This topic is now archived and is closed to further replies.
Started 1 hour ago
Started October 4
Started October 13, 2016