• Page 1 of 1
  • 1
uCause Community » Trash & Archives » Forum » Check the limit of characters in your forum post
Check the limit of characters in your forum post
AnimorphDate: Thursday, 2011-06-30, 3:27 PM | Message # 1
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(


1.go to CP ---> Design ---> Design management (templates) ---> Forum ---> New Message Form and Find:

Code
$ _MESSAGE $


Replace it with this:

Code
<div onKeyUp="chklen()">$_MESSAGE$</div><div class="BGcount"><div style="float:left;padding-top:4px;">Characters left:</div><div align="right" style="padding:2px;"><input name="fcounter" type="text" class="codeButtons" size="6" value="40000" readonly="true"></div></div>


2.go to CP ---> Design ---> Design management (templates) ---> Forum ---> General appearance of forum pages --->paste after this:
Code

<script type="text/javascript">
  function chklen() {
  max_limit=40000;
   
  str = document.addform.message.value;
  len = str.length;
   
  if (len > max_limit) {
  str = str.substring(0,max_limit);
  len = str.length;
  document.addform.message.value = str;}
   
  document.addform.fcounter.value = (max_limit - document.addform.message.value.length);
   
  while ( document.addform.fcounter.value<0) {
  document.addform.message.value = str.substring(0,len-1);
  str = document.addform.message.value;
  len = str.length;
  document.addform.fcounter.value = (max_limit - document.addform.message.value.length);}}
  </script>
Attachments: 7565976.jpg(114.3 Kb)
 
0 Thanked you For This Useful Post:
HermesDate: Thursday, 2011-06-30, 4:54 PM | Message # 2
Member
Group: Senior Members
Messages: 455
Awards: 7
Reputation: 8
Status: :-(
Good job Animorph, smile
 
0 Thanked you For This Useful Post:
jackassDate: Thursday, 2011-06-30, 6:38 PM | Message # 3
Member
Group: Senior Members
Messages: 262
Awards: 4
Reputation: 8
Status: :-(
Animorph, very useful, Thanks!

 
0 Thanked you For This Useful Post:
Maczo12310Date: Thursday, 2011-06-30, 7:00 PM | Message # 4
Member
Group: Senior Members
Messages: 987
Awards: 12
Reputation: 11
Status: :-(
Good job Animorph. Looking nice.


Visit my Graphic forum board on uCause !!!
 
0 Thanked you For This Useful Post:
Silence-PrayerDate: Sunday, 2011-07-03, 10:17 PM | Message # 5
uCause Co-Admin
Group: Senior Members
Messages: 519
Awards: 21
Reputation: 17
Status: :-(
Really Useful !!

uCause is the Best
 
0 Thanked you For This Useful Post:
uCause Community » Trash & Archives » Forum » Check the limit of characters in your forum post
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers