Help Center Live Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2]   Go Down

Author Topic: Loosing Messages  (Read 19851 times)

spatter9999

  • Not too much to say...
  • *
  • Offline Offline
  • Posts: 3
Re: Loosing Messages
« Reply #15 on: March 08, 2008, 10:09:52 AM »

UPDATE:

I'm using the Bliss template... so I edited the file ../templates/Bliss/chat_send.tpl

I changed:
Code: [Select]
<input type="text" autocomplete="off" name="chat_box" id="chat_box" size="30" maxlength="150" onkeypress="parent....to:
Code: [Select]
<input type="text" autocomplete="off" name="chat_box" id="chat_box" size="30" maxlength="500" onkeypress="parent....
But it didn't work like I wanted.  It will now let the operator and end-user type up to 500 characters, BUT...
1) It pops up a message saying the message is too long and will be trucated.  (It truncates down to 300 characters)
2) It displays the new truncated 300 char message to the display of the person who typed it, but not to the other user

Nothing over 150 char seems to get written to the database and shown to the other person.

Please help... I have to get this thing running this weekend.
Logged

enkidu

  • Not too much to say...
  • *
  • Offline Offline
  • Posts: 4
Re: Loosing Messages
« Reply #16 on: November 24, 2008, 03:35:26 PM »

"bump" Can anybody please answer honestly to this question:  Can this problem (150 limit) be solved or not?

 Don't meant to be rude but. . .  chat application with 150 character limit?  :D

 ( by the way - search on this forum gives a random answers.  Feature or bug? )
« Last Edit: November 24, 2008, 03:59:32 PM by enkidu »
Logged

petro

  • Not too much to say...
  • *
  • Offline Offline
  • Posts: 1
Re: Loosing Messages
« Reply #17 on: November 25, 2008, 12:39:04 AM »

storing "yes" in a 4000 char length varchar field do not take 4000 bytes.   
Actually it requires 4 bytes.  

hxxp: dev.   mysql.   com/doc/refman/5.   0/en/char.   html

Quote from: HCL Admin link=topic=279.   msg1700#msg1700 date=1194953457
It looks like the code is trying to avoid a potential mysql error, and is a bit over zealous about it.     I'm trying to figure out a graceful way to do it that doesn't eliminate the ability to extend the limit.    

BTW that limit is there to prevent the database from becoming overly large.     If the field size is 4000 characters, even sending "yes" would take 4000 bytes of hard drive.     Some shared hosts might not be happy if you have 27 gigabytes of database.    :)
Logged

kirpi

  • Not too much to say...
  • *
  • Offline Offline
  • Posts: 3
    • www.kirpi.it
Re: Loosing Messages
« Reply #18 on: December 03, 2008, 01:12:38 PM »

> that limit is there to prevent the database
> from becoming overly large.         

I suggest that, if any limit is set, a counter is shown while the user is typing, which tells how many characters are left for the message.   Most probably there are many ways to achieve this[1].      

Luigi

----
[1] hxxp: www. quirksmode. org/dom/maxlength. html just being a mere example.      
« Last Edit: December 03, 2008, 04:14:27 PM by kirpi »
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.15 seconds with 18 queries.