WebChat 2.0.3 BETA Download 2.0.3b

5.0
gb Kevin B 3 years ago

screenshot

This component adds a mobile-first, individually styled web chat module to OSSN. You need the Pusher Channels service for realtime updates.

You'll want to add the link to the main menu AND/OR redirect logins directly to WebChat using the Component Admin page:
Enable menu link and redirect

Latest Update

v2.0.3 BETA 16th Dec 2020

  • Feature request: Do not clear the message input field when you send a GIPHY
  • Changed component to store settings in the "site settings" rather than "component settings". Once set, these details will no longer need be input after ever install/upgrade.
  • Fixed incorrect case in ID name of ossn_com.xml
  • Moved "Web Chat" link to the "Links" section for better compatibility with OSSN standard installation.

Pre-Requisites:

OSSN >= v5.6
OssnMessages >= 5.4
OssnServices >= 6.4
Private Network >= 5.4

API Keys

GIPHY for animated GIFs that can be added to messages

FREE key from https://developers.giphy.com

Pusher - For the live chat feature

FREE Channels app-key from www.pusher.com

DEMO

https://kjbtech.co.uk/ossn
Demo site is running ossn 5.6, GreenByGreen theme and only has Private Network, API Services and WebChat components installed.

Near future updates

Add ossn credit
Message status dialog
Online status for group members
Block message content of blocked users
Hide blocked users from create new chat dialog
User is typing...
MP4 video uploads
Limits on number of images/videos people can upload
Allow to share images directly from profile
Add type to message table GIPHY, info, photo, profile image etc.
Implement OSSN blocked users
Migrate chat_api to ossn actions
Implement mobile notifications

TIDYING UP

Decide on consistent naming convention throughout. Is it Groups / Chats / WebChat etc. Need to keep language consistent throughout.
Remove ALL error_log / console.log and debug responses
Finish tidying up code and commenting (if I have time to kill)
CSS animations / transitions to make the experience feel more app-like.
Sounds for sending/receiving messages
White border on giphy thumbnail selection
change giphy default search as it keeps failing

NICE TO HAVES:

Encryption and Presence / Private Pusher Channels
Public/Private groups (to plan)
Voice and Video calls
Public Webcam broadcasts / channels
User Search by distance/gender etc
Who looked at me?
View and manage profile / galleries
View and post to walls

I'd be grateful for feedback on how I could improve the component. Any bugs or issues please also report here.

Older updates

Version history can be found in this Google Doc
WebChat Version History

Comments
Indonesian Arsalan Shah Replied 3 years ago

This is and the green by green is most discussed products here 😊😊 I like both things.

gb Kevin B Replied 3 years ago

Hi John,

Thanks for the update. I've been doing most of my testing on localhost - but now testing on a live domain i've discovered the same plus more issues with the PWA setup. I'll concentrate on getting PWA support working properly...

For now, i've set the home button to return to OSSN because I thought it would be useful if you are flipping between the two. I may have to create an admin panel so you can choose whether the home button should appear, or whether perhaps just a logo... or something else community suggested?

The incoming messages may be part of the issues i've just discovered with going to a live domain.

I've also discovered CORS issues (as I dont use www. as a prefix on my domain), as well as hard coded links that arent working when OSSN is installed in /ossn rather than the root.

Today i'll hopefully get most of these issues resolved.

Thanks again
Kev

us John Miller Replied 3 years ago

Ok, I deleted the old component, cleared cache and still didn't work.
I then uninstalled the site app (which will not install again) and opened in Chrome.
The PWA for the webchat added to homescreen and sends messages via the chat component, but will not show incoming messages in webchat screen.
Also (maybe?) Worth mentioning, the home icon at top center directs to main site, within the webchat PWA.

gb Kevin B Replied 3 years ago

Possibly ;)

Using the API felt like a no brainer. It was easy to start coding without really knowing OSSN... But the more I become familiar with OSSN I think I'll continue switching. Almost finished pagination :D

German Michael Zülsdorff Replied 3 years ago

Ah yeah!
That's an interesting twist away from the API back to direct calls.
I'm curious whether the other functions will follow ...

German Michael Zülsdorff Replied 3 years ago

Congrats!
I'm looking forward to check 1.3.7 !

gb Kevin B Replied 3 years ago

Cracked it!!!! Comparing the parsed form data, I noticed my version was only sending new line (\n) and not a carriage return (\r). So it was something to do with cUrl. Theres probably a very clever way to fix this, but the following code in the chat_api converts the \n to \r\n and now everything works!!!

$nl2br = str_ireplace(array("\r\n","\r","\n",'\r','\n'),'<br />', input("message"));
$message = str_ireplace(array('<br /><br />','<br />'),'\r\n', $nl2br);

So tonight I can move on to other stuff :)

I'll do another update tonight with the new French locale (thanks Christian) and the fixed formatting issue. :)

gb Kevin B Replied 3 years ago

Lol yes sorry. I was a bit flustered. I have some ideas and I'm confident it's to do with how I prepared the curl options. I'll report back if I struggle, but I think the OSSN side of things is fine, it's just my coding ;)

German Michael Zülsdorff Replied 3 years ago

@Kevin
it's a little hard to follow your latest report without accompanying code ;)

gb Kevin B Replied 3 years ago

Hi Christian, thanks for doing that. I have an email I use publicly - revvin at hotmail dot com. Feel free to post it there and i'll add it to the component.

For anyone else thinking about my encoding issue - I believe I need to configure my curl post using data-binary. I'll be investigating that later and I think I can probably resolve the issue :)

Component

Developer: Kevin
License GPL v2
Type: Communication
Requires Ossn Version : 5.5
Latest Version: 2.0.3b
Last Updated 3 years ago
Repository Url View Repository

Versions