• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Pasting large message in chat gets cuts off

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
5 posts • Page 1 of 1

Postby vegasb2k » Wed Dec 15, 2010 6:12 am

PFC Version: 1.3
PHP Version: 5

Shared or Dedicated Hosting: Shared (Hostgator Reseller)
Link to your website: jagmediagroup.com/knock/

Are you able to reproduce the issue on the official demo (http://www.phpfreechat.net/demo)?
Yes, same issue.

Have you set any parameters?
If so, please include your entire code, using the [code ] and[/code ] tags (without the space).

Code: Select all
<?php

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Knock Knock Command Center";
$params["nick"] = "";  // setup the initial nickname
$params['firstisadmin'] = false;
//$params["isadmin"] = false; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$params['admins'] = array('Raybe46'  => '2knocks',
                          'WhiteRhino' => 'knock123');
$params[max_msg] = 5;
$params["timeout"] = 6000000;
$params['max_text_len'] = 400000;
$params['skip_proxies'] = array('noflood');
$chat = new phpFreeChat( $params );


?>

What is the issue you are experiencing in detail?

I am copying a text message from one site and pasting it into the chat message bar. When I submit the chat message, it cuts off the text after a short bit. (Not a text length setting issue). I thought there may be hidden code in the text, so I pasted it into notepad first, recopied it, re pasted it and same thing. I am hoping you may know what is causing this and a way to make it work. Its kind of important to us.

Here is the text of one sampe message causing an issue:

Code: Select all
Scouting at (705,539)
Dec 14, 07:47 PM
Report No: 6666136
Scouting Report
    Name   Count
No Units
    Name   Count
   Spiked Barrier   756
    Building   Levels
    Farm   9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
    Sawmill   7, 5, 5, 5, 5
    Quarry   7, 6, 6
    Mine   8, 7
    Resource   Quantity
   Food   826,574
   Wood   345,946
   Stone   679,170
   Ore   12,081
Research   Levels
Fertilizer   9
Logging   6
Stoneworking   7
Mining   8
Geometry   7
Eagle Eyes   8
Poisoned Edge   8
Metal Alloys   8
Featherweight Powder   5
Magical Mapping   5
Alloy Horseshoes   8
Fletching   8
Shrinking Powder   6
Healing Potions   5
Giant's Strength   7
Battle Report - Victory
Attackers (Valkyrie2) - (208,2)Winner
    Troops   Fought   Survived
   Scout   1   1
Defenders (rsayloriii)
No Troops Defended

This is all that shows up in the chat:
Code: Select all
Scouting at (705,539) Dec 14, 07:47 PM Report No: 6666136 Scouting Report

Are you seeing any error messages, such as javascript errors?
No error messages, just limited text in the message.


Thank you in advance for any help!

Greg
vegasb2k
New member
 
Posts: 3
Joined: Wed Dec 15, 2010 5:57 am
Top

Postby OldWolf » Wed Dec 15, 2010 7:19 am

I would inspect the text bar element and see if it has a setting for the length of the text... it's possible it does, or that the browser is imposing one.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby vegasb2k » Wed Dec 15, 2010 7:41 am

Thanks for the quick reply.

It doesn't appear to be browser dependent as I have tried different browser and computers (IE and FF). And I can see the entire text in the message bar before I submit and I can hand type a message just as long and it will show up and work.

It seems as if it is picking up 'hard returns' somehow or something that is triggering it.

I don't know if there is a way (or parameter) to overlook these possibilities.

(Sorry if I don't know the exact terminology, just the concept. I seem to be good at isolating the issue, just don't know what else to look for on the other side).
vegasb2k
New member
 
Posts: 3
Joined: Wed Dec 15, 2010 5:57 am
Top

Postby vegasb2k » Wed Dec 15, 2010 10:31 pm

Well, I found a temporary fix to the problem.

I can pastes the copied text into the tool at http://www.textfixer.com/tools/remove-white-spaces.php and choose to 'replace both multiple whitespaces and tabs with a single space' and then paste the clean text into chat and it works just fine.

Now just wondering if someone knows how to have the chat software ignore the tabs/whitespaces and still show the entire text.

Thanks again
vegasb2k
New member
 
Posts: 3
Joined: Wed Dec 15, 2010 5:57 am
Top

Postby OldWolf » Fri Dec 17, 2010 9:42 am

To be frank, no, you're going to just have to dig into the code to find where it handles the output and figure out what it's not liking. :/
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 19 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub