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:
v2.0.3 BETA 16th Dec 2020
OSSN >= v5.6
OssnMessages >= 5.4
OssnServices >= 6.4
Private Network >= 5.4
FREE key from https://developers.giphy.com
FREE Channels app-key from www.pusher.com
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.
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
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
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.
Version history can be found in this Google Doc
WebChat Version History
Hi Peer
File transfer, images etc are not yet implemented, but it's very easy to install if you want to take a look at it.
Kev
Hi Kevin B,
is it possible to install your chat on my page ?
I am looking for a messenger like the one you build, file transfer, image and text.
Great messenger you build !!
Kind Regards, Peer
@Christian Gicquel I have checked the page template, and it is likely the same problem that cause the siteurl - I hadn't used the URL extension function of the ossnthem_url().
In the next update, the favicon should be fixed.
Doh! Of course it does. That's why it has the extend URL parameter! Thanks for pointing that out. I'll amend tonight.
With regards the odd error... I'll try to reproduce it tonight with minimal steps and if I can reproduce it easily, I'll share the steps.
Yes, instead of a hardcoded
href="/home"
it has to be
href="<?php echo ossn_site_url('home'); ?>"
I still have no idea which way you're getting different output w -> w/o template, though
I've changed the pagehandler back to original now like
function chat_api(){
// echo ossn_plugin_view('webchat/chat_api');
$content = ossn_plugin_view('webchat/chat_api');
error_log('--------------------- IN --' . ossn_loggedin_user()->username . '---------------------------------------');
error_log($content);
$title = 'Chat_API';
$return = ossn_view_page($title, $content, 'chat_api_template');
// echo ossn_view_page($title, $content, 'chat_api_template');
error_log('-------------------- OUT --' . ossn_loggedin_user()->username . '--------------------------------------');
error_log($return);
echo $return;
}
and my error_log shows no difference
[13-Nov-2020 12:21:40 Europe/Berlin] --------------------- IN --honey---------------------------------------
[13-Nov-2020 12:21:40 Europe/Berlin] {"success":false,"message":"Failed"}
[13-Nov-2020 12:21:40 Europe/Berlin] -------------------- OUT --honey--------------------------------------
[13-Nov-2020 12:21:40 Europe/Berlin] {"success":false,"message":"Failed"}
Actually, I didn't expect anything else, because you're passing $content to that page and you're returning $content from that page. There's no magic in between. :)
Thats great feedback, thank you Christian.
so far the only functionality that has been implemented is sending and receiving of messages. The settings/add files etc are placeholders for the functions as they are implemented over the coming weeks.
I'll have to look into the site_url - I assumed it would be the root path of the site, as opposed to the server host. If I can find the right variable to hook into, it'll be a seamless fix, but if not, I may add an Admin page so that this can be customised per site.
Favicon - interesting, i'll investigate thanks.
Apologies, as i'm just english speaking I hadn't added any other languages. I'll probably duplicate the EN one to all the different languages, and then if people can provide specific translations I can update the component.
As for the other labels not using the language file, that's a good point. I'll make sure that as I implement those functions, i'll ensure it makes use of the language files.
Hi,
Sorry, I didn't read all of the posts.
I installed component 1.3.2 and let you know about some issues.
- the "settings" and "add files" actions are inoperative
- the "home" path is wrong. In my case, the path to ossn web chat is https: //my.domain/ossn/webchat but the path leads to https: //my.domain/webchat
- The personalized favicon is lost in favor of the generic ossn favicon
I added an ossn.fr.php file simply like this:
$fr = array(
'webchat' => 'Web Chat',
'com:webchat:menu' => 'Web Chat',
);
ossnregisterlanguages('fr', $fr);
Finally, with "Add contact" "Settings" and "Write your message" we see that the component does not refer to the chosen global language.
I needed to see firstly what CallAPI was receiving from OSSNAPI, and then see what it was passing back to the page. It was worth doing, as that's how I found the discrepancy :). But it works perfectly with the chattemplate page enabled, but returns a 1 when only using the plugin view.
If you then remove the chat template page, using just plugin view - do you still get the html?
I only added logging to troubleshoot this issue - it doesn't stay there :)
I'm sorry Kevin, but I can't follow.
First of all I don't understand why you are logging inside of CallAPI?
I mean this results in thousends of notifs and it must be a pain to sort out that few message requests !?!
If I'm interested what the message call returns,
I'm doing a error_log('messages ' . ossn_dump($listMessages));
on line 74 and that's it.
And actually I'm getting a correct Object here, filling the html structure below and being echoed back to line 282 of webchat_page.php leaving the finalizing job to be done by jquery.