Welcome to Geeklog Wednesday, May 22 2013 @ 04:34 AM EDT
|
||||||||
![]() |
Forum Index > Support > Plugin Support |
New Topic
|
Post Reply
|
help me with JQchat |
|||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
I have installed jQchat, and modify its appearance, font and background basically, but I have three things that do not look good:
1.- My site is in spanish and I can not insert a character "ñ". How can I fix this? 2.- I add a button to accept the typed text, so it is not functioning the chat from the browser on a mobile phone for example and there are users who like to send a button submit. 3.- How can I make the chat show history or at least allows to show more blogs in the block. My web site is www.huracannaranja.cl. Best regards from Chile |
||||||
|
|||||||
| suprsidr |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 12/29/04 Posts: 552 |
1.- My site is in spanish and I can not insert a character "ñ". How can I fix this? What happens when you do? does it get replaced? This chat is clientside/browser based. We're not doing anything special with localization here. But maybe the emoticon script is filtering it out? Try commenting out public_html/jQchat/process.php lines ~120 - 121: PHP Formatted Code $em = new Emoticon(); $message = $em->apply($message); to: PHP Formatted Code //$em = new Emoticon(); //$message = $em->apply($message); You will lose emoticons but at least we'll know if that's where we're breaking localization. add a button to accept the typed text geeklog/plugins/functions.inc line ~243 in function phpblock_jQchat_block: PHP Formatted Code <textarea id="sendie" maxlength="350"></textarea> to: PHP Formatted Code <textarea id="sendie" maxlength="350"></textarea> <input type="submit" style="width:100%;-moz-border-radius:3px;-webkit-border-radius:3px;" value="Send Chat" onclick="chat.send(jQuery(\'#sendie\').val());jQuery(\'#sendie\').val(\'\');return false;"/> How can I make the chat show history or at least allows to show more blogs in the block. process.php again line ~137: PHP Formatted Code for ($i = ($count < 6)?0:$count-5; $i < $count; $i++) {to: PHP Formatted Code for ($i = 0; $i < $count; $i++) {-s FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com |
||||||
|
|||||||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
When someone inserts a "ñ" or "Ñ" in chat area, this display this characters "ñ "
This; 159 // $em = new Emoticon(); 160 // $message = $em->apply($message); These lines are the 159 and 160 in my file process.php, but is the same. I need to fix it, because this chat so I can not use on my webpage. What do you think could be the problem? I'll try the other answers you left me |
||||||
|
|||||||
| suprsidr |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 12/29/04 Posts: 552 |
I'm the absolute worst at localization. I don't know the mechanics at all.
Could it possibly be the encoding of the flat file(chat.txt) the messages are stored in? Anybody? -s FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com |
||||||
|
|||||||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
My file siteconfig.php
$_CONF['path'] = '/../huracan/'; $_CONF['path_system'] = $_CONF['path'] . 'system/'; $_CONF['default_charset'] = 'utf-8'; $_CONF_FCK['imagelibrary'] = '/images/library'; // Useful Stuff if (!defined('LB' define('LB',"\n" } if (!defined('VERSION' define('VERSION', '1.6.0' } ?> |
||||||
|
|||||||
| Dirk |
|
||||||
![]() ![]() ![]() ![]() ![]() Admin ![]() Status: offline ![]() Registered: 01/12/02 Posts: 13027 |
I'm not familiar with the code involved here. But it the website is running utf-8 and the text file is written as utf-8, then I would think it should work.
When you open the text file in a text editor that knows about utf-8, do the special characters display correctly? bye, Dirk |
||||||
|
|||||||
| suprsidr |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 12/29/04 Posts: 552 |
Ok, with some hints from Tom and Dirk - let's try to encode this chat.txt:
process.php: basically anywhere you see fwrite(fopen.... we need to wrap the text in utf8_encode() example: PHP Formatted Code fwrite(fopen($_CONF['path_data'].$file, 'a'), "<span class=\"".$nickname."\">".$nickname." ".ltrim(date('h:i:s A'), 0)."</span>".$breaking_character.$message);to: PHP Formatted Code fwrite(fopen($_CONF['path_data'].$file, 'a'),utf8_encode("<span class=\"".$nickname."\">".$nickname." ".ltrim(date('h:i:s A'), 0)."</span>".$breaking_character.$message));You'll need to head to jQchat admin and delete blockchat.txt and chat.txt If this does not work, I'll have to re-work the way they get created to add the necessary headers. -s FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com |
||||||
|
|||||||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
Quote by: Dirk I'm not familiar with the code involved here. But it the website is running utf-8 and the text file is written as utf-8, then I would think it should work. You mean the file blockchat.txt? this is an Ñ or ñ(text inserted in chat area). in the block chat, it looks so this is an Ã? or ñ in /path/site_huracan/data/blockchat.txt it look like this; <span class="zorro_chilote">zorro_chilote 5:20:24 PM</span><br />this is an Ã<91> or ñ This file I edit with Vi. You can view it, edit it with vi and gedit, it looks the same |
||||||
|
|||||||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
Quote by: suprsidr Ok, with some hints from Tom and Dirk - let's try to encode this chat.txt: PHP Formatted Code fwrite(fopen($_CONF['path_data'].$file, 'a'), "<span class="".$nickname."">".$nickname." ".ltrim(date('h:i:s A'), 0)."</span>".$breaking_character.$message);to: PHP Formatted Code fwrite(fopen($_CONF['path_data'].$file, 'a'),utf8_encode("<span class="".$nickname."">".$nickname." ".ltrim(date('h:i:s A'), 0)."</span>".$breaking_character.$message));You'll need to head to jQchat admin and delete blockchat.txt and chat.txt If this does not work, I'll have to re-work the way they get created to add the necessary headers. -s I changed process.php as you tell me, I also delete blockchat.txt and chat.txt, but not work to me. I did not understand this part "You'll need to head to jQchat admin", could you explain me, please. Thanks you. |
||||||
|
|||||||
| suprsidr |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 12/29/04 Posts: 552 |
I'll have time to look at it further tonight.
-s FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com |
||||||
|
|||||||
| suprsidr |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 12/29/04 Posts: 552 |
Finally got a second to look at this.
public_html/jQchat/process.php line~111: to: -s FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com |
||||||
|
|||||||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
After the earthquake we experienced here in Chile, I'm back in search of solving this problem
unfortunately the solution did not work, $message = htmlentities(strip_tags($_POST['message'])); to $message = strip_tags($_POST['message']); Still does not work insert ñ or accented characters such as ó. Thanks you. |
||||||
|
|||||||
| suprsidr |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 12/29/04 Posts: 552 |
Hope all is well for you in Chile
Really? it worked for me. Please try my dev sample. If that works, I'll zip that up for you. -s FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com |
||||||
|
|||||||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
well I tried your example and walk of wonders, but trust me for my not work. What choice do I have?
I'm okay, just a little tired with all the stress that is generated with this situation, fortunately nothing happened to me with the earthquake, but the country has not been well and many people affected, homeless, dead, that was brutal |
||||||
|
|||||||
| suprsidr |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 12/29/04 Posts: 552 |
I've updated the archive w/ the version from my dev site.
http://www.flashyourweb.com/filemgmt/index.php?id=33 -s FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com |
||||||
|
|||||||
| manowar |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster Status: offline ![]() Registered: 11/07/07 Posts: 81 |
worked!!
Thanks you. un millon de gracias |
||||||
|
|||||||
| Content generated in: 3.60 seconds |
|
|
|