[Phpfreechat-svn] SF.net SVN: phpfreechat: [756] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-09-12 14:23:41
|
Revision: 756 http://svn.sourceforge.net/phpfreechat/?rev=756&view=rev Author: kerphi Date: 2006-09-12 07:23:29 -0700 (Tue, 12 Sep 2006) Log Message: ----------- Improve the max_text_len handeling Modified Paths: -------------- trunk/src/client/pfcgui.js trunk/src/phpfreechat.class.php Modified: trunk/src/client/pfcgui.js =================================================================== --- trunk/src/client/pfcgui.js 2006-09-12 14:14:00 UTC (rev 755) +++ trunk/src/client/pfcgui.js 2006-09-12 14:23:29 UTC (rev 756) @@ -386,7 +386,7 @@ inputwords.setAttribute('id', 'pfc_words'); inputwords.setAttribute('type', 'text'); inputwords.setAttribute('title', pfc.res.getLabel("Enter your message here")); - inputwords.setAttribute('maxlength', pfc_max_text_len - 25); + inputwords.setAttribute('maxlength', pfc_max_text_len); inputcontainer.appendChild(inputwords); // command container : <div id="pfc_cmd_container"> Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-09-12 14:14:00 UTC (rev 755) +++ trunk/src/phpfreechat.class.php 2006-09-12 14:23:29 UTC (rev 756) @@ -270,7 +270,11 @@ function PreFilterMsg($msg) { $c =& pfcGlobalConfig::Instance(); - $msg = utf8_substr($msg, 0, $c->max_text_len); + if (preg_match("/^\[/i",$msg)) + // add 25 characteres if the message starts with [ : means there is a bbcode + $msg = utf8_substr($msg, 0, $c->max_text_len+25); + else + $msg = utf8_substr($msg, 0, $c->max_text_len); $msg = phpFreeChat::FilterSpecialChar($msg); // $msg = phpFreeChat::FilterSmiley($msg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |