Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Hi guys.
I have a question. mi LHC is install with nodejshelper, this extension have activated use_publish_notifications in nodejshelper_config.tpl.php
[== PHP ==]
<?php
$nodeJsHelperSettings = array (
'prefix' => 'https://',
'host' => 'xxxxx',
'port' => ':81',
'secure' => true,
'use_cdn' => true, // Should we use google provided socket.io.js library?, if you are using older version set it to false
'use_publish_notifications' => true,
'redis' => array (
'scheme' => 'tcp',
'host' => '127.0.0.1',
'port' => 6379,
),
'instance_id' => 0, // Set erLhcoreClassInstance::getInstance()->id for automated hosting extension support
);
?>
And use_publish_notifications in settings.js is true
[== JavaScript ==]
var settings = {}
/**
* Should we use publish notifications?
* Redis have to be running on 127.0.0.1 and 6379 port.
* Set false to disable
* */
settings.use_publish_notifications = true;
// If you will be using only web application set this to true, will save some resource
settings.ignore_desktop_client = false;
settings.redis = {};
settings.redis.port = 6379;
settings.redis.host = '127.0.0.1';
settings.redis.options = {};
But my client generate AJAX request to get checkchatstatus and syncuser.
Is normal?
Thanks.
Last edited by xalupeao (2014-11-25 08:20:05)
Offline
For check status request it's normal before chat is accepted by operator.
As for sync user, these should be gone as soon chat is accepted by operator.
Also chat fallbacks to default ajax request if it fails to connect to NodeJs.
Offline
Hello.
I have the same problem.
I installed NodeJs and Redis, so installed npm socket.io, npm redis. After that I configured settings.js
var settings = {}
/**
* Should we use publish notifications?
* Redis have to be running on 127.0.0.1 and 6379 port.
* Set false to disable
* */
settings.use_publish_notifications = true;
// If you will be using only web application set this to true, will save some resource
settings.ignore_desktop_client = false;
settings.redis = {};
settings.redis.port = 6379;
settings.redis.host = '127.0.0.1';
settings.redis.options = {};
settings.web = {};
settings.debug = {};
/**
* Set path where socket.io is located, it can be also just socket.io
* */
settings.socketiopath = '/usr/local/lib/node_modules/socket.io';
/**
* Set your settings
* */
settings.web.host = "XXX.XXX.XXX.XXX"; //My real IP
settings.web.port = 31129;
/**
* Enable debug output
* */
settings.debug.output = true;
module.exports = settings;
and nodejshelper_config.tpl.php
<?php
$nodeJsHelperSettings = array (
'prefix' => 'http://',
'host' => 'livechat.site.com', // My real hostname
'port' => ':31129',
'path' => '',
'secure' => false,
'use_cdn' => true, // Should we use google provided socket.io.js library?, if you are using older version set it to false
'use_local_socket_io_js' => false, // Load socket.io.js file from local filesystem. If use_cdn and use_local_socket_io_js will be false, system will try to load socket.io.js file from node server
'use_publish_notifications' => true,
'redis' => array (
'scheme' => 'tcp',
'host' => '127.0.0.1',
'port' => 6379,
),
'instance_id' => 0, // Set erLhcoreClassInstance::getInstance()->id for automated hosting extension support
);
?>
and added nodejshelper as extension to settings.ini.php
'extensions' =>
array (
0 => 'nodejshelper',
),
After I try to run server.js
# nodejs server.js
In console I see
nodejs server.js
LHC Server listening on XXX.XXX.XXX.XXX:31129
Debug enabled - true
And nothing else... I don't see new messages in console when I write to chat. I see many GET AJAX Request from browser (like on screenshot in post #1). What I do wrong? May be I need to configure something in Chat Admin Panel?
Last edited by dmitry_stas (2016-01-29 11:39:17)
Offline
OMG... I'm an idiot I thought that "server extensions folder" = "root folder". And only after I looked at the php code and saw
$callbackFile = $instance->SiteDir . '/extension/' . $ext . '/callbacks/close_chat.php';
I got it After moving 'nodejshelper' folder into 'extension' folder it worked fine
Last edited by dmitry_stas (2016-01-29 18:52:12)
Offline
dmitry_stas thank you for your report and feedback!
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline