This method works in Mozilla Firefox 0.9.3 and IE 6. It is a javascript method based on a script from this page:
[url="http://www.mediacollege.com/internet/javascript/form/limit-characters.html"]http://www.mediacollege.com/internet/javas...characters.html[/url]
I haven't tested it very thoroughly but it worked on my test site and it worked for other webmasters. I don't think it will interfere with any of the MKPortal javascript functions but I'm not making any guarantees. Of course if your users disable javascript it won't work. Backup your files before you make changes.
FIND in /mkportal/modules/urlobox/index.php:
[quote]
REPLACE WITH:
[quote]
(Maximum characters: 50)
You have 50'> characters left.
You have 50'> characters left.
Replace the occurences of the number "50" in red with the number of characters that you want to allow.
FIND: /mkportal/templates/*/tpl_main.php (function view_header):
[quote]<script language="JavaScript" type="text/javascript" src="{$js}">[/quote]
ADD BELOW:
[quote]<script language="javascript" type="text/javascript">
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum - limitField.value.length;
}
}
[/quote]
-=DKC=-













