ZenitH-AT / learningspace

Accommodation Website Project (ITSP200)
GNU General Public License v3.0
0 stars 1 forks source link

Live chat system #13

Closed ZenitH-AT closed 6 years ago

ZenitH-AT commented 6 years ago

I am going to be working on a live chat system.

The setup will allow for students to click the live chat sticky and type messages.

On the admin side, there will be a column on the left listing all the users' chats, which the admin can enter and reply to.

LiveZilla has a relatively easy to implement solution (see this demo), but it might be easier to just implement something using node.js, so ill look into that for a bit.

ZenitH-AT commented 6 years ago

This seems like a viable solution for a much simpler live chat system. I tried to implement a test of it, but it didn't work.

I installed npm packages based on the package.json file in the code given and used a Redis server for Windows. I had to move the html test files into the public folder and alter their style sheet and script links a bit but I got it to display and interact correctly.

However, the admin interface doesn't log in and the user interface live chat window closes whenever they fill out the form.

I'll look into this a bit further today but if I can't get it working I'll need to use LiveZilla, which is a shame because this is so much smaller and perfectly matches our needs.

ZenitH-AT commented 6 years ago

The sticky now only shows when the user is logged in. See here

ZenitH-AT commented 6 years ago

Okay, the live chat now works properly on its own, but there is an issue with chat.js (it doesn't display the live chat on the website). I had to edit my httpd.conf file to get it to connect as well.

ZenitH-AT commented 6 years ago

This was fixed by adjusting the student client and admin client javascript files. Old:

var socket = io();

New:

var socket = io('http://localhost:8088', {path: '/socket.io'});