All Projects → AppLozic → Applozic Web Plugin

AppLozic / Applozic Web Plugin

Licence: bsd-3-clause
Javascript (jQuery) Real Time Chat & Messaging plugin

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Applozic Web Plugin

Bdialog
Extend the Bootstrap Modal features, making dialog more functions and easier to use, dialog type including modal, alert, mask and toast types
Stars: ✭ 174 (+128.95%)
Mutual labels:  notifications, jquery-plugin, jquery
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (+36.84%)
Mutual labels:  chat, notifications, messaging
Convform
A jQuery plugin that transforms a form into an interactive chat.
Stars: ✭ 141 (+85.53%)
Mutual labels:  chat, jquery-plugin, jquery
Element Rpm
Providing the Element messaging desktop client packaged for the Fedora, Red Hat(IBM), and OpenSUSE families of linux desktop operating systems.
Stars: ✭ 73 (-3.95%)
Mutual labels:  chat, messaging
Swiftype Search Jquery
Elastic Site Search jQuery search plugin
Stars: ✭ 74 (-2.63%)
Mutual labels:  jquery-plugin, jquery
Hummingbird Treeview
A powerful and fast jQuery treeview plugin
Stars: ✭ 50 (-34.21%)
Mutual labels:  jquery-plugin, jquery
Cryptocat
Secure chat software for your computer.
Stars: ✭ 1,011 (+1230.26%)
Mutual labels:  chat, messaging
Jquery Circle Progress
jQuery Plugin to draw animated circular progress bars
Stars: ✭ 1,065 (+1301.32%)
Mutual labels:  jquery-plugin, jquery
Imgviewer
jQuery plugin to zoom and pan images, even those with a size that is a percentage of their container
Stars: ✭ 50 (-34.21%)
Mutual labels:  jquery-plugin, jquery
Jquery.toaster
jQuery plugin for displaying customizable toast notifications via Bootstrap alerts
Stars: ✭ 74 (-2.63%)
Mutual labels:  jquery-plugin, jquery
Jtap
Tap Event for jQuery
Stars: ✭ 65 (-14.47%)
Mutual labels:  jquery-plugin, jquery
Cropper
⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
Stars: ✭ 7,825 (+10196.05%)
Mutual labels:  jquery-plugin, jquery
Swiftychat
SwiftUI Chat UI (Client) Framework & Documentation to get started!
Stars: ✭ 50 (-34.21%)
Mutual labels:  chat, messaging
Jalert
jQuery alert/modal/lightbox plugin
Stars: ✭ 73 (-3.95%)
Mutual labels:  jquery-plugin, jquery
Uploader
A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
Stars: ✭ 1,042 (+1271.05%)
Mutual labels:  jquery-plugin, jquery
Jcslider
🏂 A responsive slider jQuery plugin with CSS animations
Stars: ✭ 52 (-31.58%)
Mutual labels:  jquery-plugin, jquery
Cmd Resume
Web-based Command Line Resume
Stars: ✭ 55 (-27.63%)
Mutual labels:  jquery-plugin, jquery
Qmchatviewcontroller Ios
An elegant ready to go chat view controller for iOS applications
Stars: ✭ 75 (-1.32%)
Mutual labels:  chat, messaging
Jquery Lockfixed
jQuery lockfixed plugin
Stars: ✭ 69 (-9.21%)
Mutual labels:  jquery-plugin, jquery
Inputaccessoryview
Input Accessory View for Commenting and Chat User Interfaces built in Swift, if you like it please "☆"
Stars: ✭ 39 (-48.68%)
Mutual labels:  chat, messaging

Applozic-Web-Plugin

Overview

Open source Chat and Messaging SDK that lets you add real time chat and messaging in your mobile (android, iOS) applications and website.

Signup at https://www.applozic.com/signup.html to get the App ID.

Documentation: Applozic Web (Javascript) Chat & Messaging Plugin Documentation

Applozic comes with 2 ready to use UI layout

1. Full view

2. Sidebox

Applozic One to One and Group Chat SDK

Features:

One to one and Group Chat

Image capture

Photo sharing

File attachment

Location sharing

Push notifications

In-App notifications

Online presence

Last seen at

Unread message count

Typing indicator

Message sent, delivery report

Offline messaging

Multi Device sync

Application to user messaging

Customized chat bubble

UI Customization Toolkit

Cross Platform Support (iOS, Android & Web)

Getting Started

Applozic messaging jQuery plugin

A jQuery plugin to integrate messaging into your web page for real time communication between users via Applozic messaging platform and also to see your latest conversations and past chat history. Add Applozic messaging plugin into your web application :

Overview

Integrate messaging into your mobile apps and website without developing or maintaining any infrastructure.

Signup at https://www.applozic.com/signup.html to get the App ID.

Step 1: Add Plugin

Add the Applozic Chat plugin script before closing of </body> into your web page

<script type="text/javascript">
   (function(d, m){var s, h;       
   s = document.createElement("script");
   s.type = "text/javascript";
   s.async=true;
   s.src="https://apps.applozic.com/sidebox.app";
   h=document.getElementsByTagName('head')[0];
   h.appendChild(s);
   window.applozic=m;
   m.init=function(t){m._globals=t;}})(document, window.applozic || {});
</script>

Step 2: Login/Register user

Login or Register with userId and username Applozic will create a new user if the user doesn't exists. userId is the unique identifier for any user, it can be anything like email, phone number or uuid from your database. Add the below code just after Step 1.

<script type="text/javascript">
  window.applozic.init({
    appId: '<APP_ID>',      //Get your App ID from https://www.applozic.com
    userId: userId,                     //Logged in user's id, a unique identifier for user
    userName: username,                 //User's display name
    imageLink : '',                     //User's profile picture url
    email : '',                         //optional
    contactNumber: '',                  //optional, pass with internationl code eg: +13109097458
    desktopNotification: true,
    source: '1',                          // optional, WEB(1),DESKTOP_BROWSER(5), MOBILE_BROWSER(6)
    notificationIconLink: 'https://www.applozic.com/favicon.ico',    //Icon to show in desktop notification, replace with your icon
    authenticationTypeId: 1,          //1 for password verification from Applozic server and 0 for access Token verification from your server
    accessToken: '',                    //optional, leave it blank for testing purpose, read this if you want to add additional security by verifying password from your server https://www.applozic.com/docs/configuration.html#access-token-url
    locShare: true,
    googleApiKey: "AIzaSyDKfWHzu9X7Z2hByeW4RRFJrD9SizOzZt4",   // your project google api key 
    mapStaticAPIkey: "AIzaSyCWRScTDtbt8tlXDr6hiceCsU83aS2UuZw",
    googleMapScriptLoaded : false,   // true if your app already loaded google maps script
    autoTypeSearchEnabled : true,     // set to false if you don't want to allow sending message to user who is not in the contact list
    loadOwnContacts : false, //set to true if you want to populate your own contact list (see Step 4 for reference)
    onInit : function(response) {
       if (response === "success") {
          // login successful, perform your actions if any, for example: load contacts, getting unread message count, etc
       } else {
          // error in user login/register (you can hide chat button or refresh page)
       }
   },
   contactDisplayName: function(otherUserId) {
         //return the display name of the user from your application code based on userId.
         return "";
   },
   contactDisplayImage: function(otherUserId) {
         //return the display image url of the user from your application code based on userId.
         return "";
   },
   onTabClicked: function(response) {
         // write your logic to execute task on tab load
         //   object response =  {
         //    tabId : userId or groupId,
         //    isGroup : 'tab is group or not'
         //  }
   }
  });
</script>

It can also be called from any event, for example: on click of a button.

Note :

1) desktopNotification support only for chrome browser, notificationIconLink will be displayed in desktop notification.

2) By Default source is set to WEB(1).

Step 3: Initiate Chat

To initiate chat with another user using userId:

  $applozic.fn.applozic('loadTab', otherUserId);

Alternatively, you can add a chat button inside your web page using a tag and use 'userId' of the other user for data attribute "data-mck-id"

  <a  class="applozic-launcher" data-mck-id="PUT_OTHER_USERID_HERE" data-mck-name="PUT_OTHER_USER_DISPLAY_NAME_HERE">CHAT BUTTON</a>

To open the chat list:

  $applozic.fn.applozic('loadTab', '');

Step 4: Populate contact list

Javascript code to load contacts


// Contacts Array
 var contactsJSON = [{"userId": "USER_1", "displayName": "Devashish",
                          "imageLink": "https://www.applozic.com/resources/images/applozic_icon.png", // image url (optional)
                          "imageData" :"Base64 encoded image data"  // or image data (optional)
                          },
                         {"userId": "USER_2", "displayName": "Adarsh",
                          "imageLink": "https://www.applozic.com/resources/images/applozic_icon.png", // image url (optional)
                          "imageData" :"Base64 encoded image data"  // or image data (optional)
                         },
                         {"userId": "USER_3", "displayName": "Shanki",
                          "imageLink": "https://www.applozic.com/resources/images/applozic_icon.png",  // image url (optional)
                          "imageData" :"Base64 encoded image data"  // or image data (optional)
                         }
                      ];
                      
 // Function calling inside onInit(from #Step 2) after plugin initialize successfully
    onInit : function(response) {
       if (response === "success") {
          // calling function load contacts
           $applozic.fn.applozic('loadContacts', {"contacts":contactsJSON});
       } else {
          // error in user login/register (you can hide chat button or refresh page)
       }
   }
   
   //Set loadOwnContacts to true from Step 2
   loadOwnContacts : true,

NOTE- Call loadContacts function only after plugin initialize callback (see Step 2 onInit function for reference).

Step 5: Group Messaging

Group have 2 identifiers: groupId: Auto generated by Applozic clientGroupId (optional): In case if you already have group identifier on your applicaiton side, use clientGroupId in all functions.

Open group chat
 $applozic.fn.applozic('loadGroupTab', groupId);  // group Id returned in response to group create api  

Open group chat using Client Group Id

 $applozic.fn.applozic('loadGroupTabByClientGroupId',{'clientGroupId':clientGroupId});
Create Group
$applozic.fn.applozic('createGroup', {'groupName' : groupName,   // required
                                      'type' : 1,                // 1 for private , 2 for public, 5 for broadcast (required)
                                      'clientGroupId' : '',      // optional
                                      'users': [{ userId:userId1, 
                                                  displayName:'',
                                                  groupRole : 3  // (optional)  USER(0), ADMIN(1), MODERATOR(2), MEMBER(3)
                                                },
                                                { userId:userId2,
                                                  displayName:'',
                                                  groupRole :3  // (optional)  USER(0), ADMIN(1), MODERATOR(2), MEMBER(3)
                                                }
                                               ],
                                               'callback' : function(response){console.log(response);}}); 

Access level based on role of users in group :-

USER(0),               - Chat
ADMIN(1),              - Full access
MODERATOR(2)           - Add/remove users + Group Info update
MEMBER(3)              - Group Info update 

Add User to Group (only for Group Admin)
$applozic.fn.applozic('addGroupMember',{'groupId': groupId,
                                       'clientGroupId': clientGroupId, //use either groupId or clientGroupId
                                       'userId': userIdToAdd,
                                       'role' :  3,  // (optional)  USER(0), ADMIN(1), MODERATOR(2), MEMBER(3)
                                       'callback': function(response) {console.log(response);}
                                       });
Remove User from Group (only for Group Admin)
$applozic.fn.applozic('removeGroupMember',{'groupId': groupId,
                                         'clientGroupId' : clientGroupId, //use either groupId or clientGroupId
                                         'userId': userIdToRemove,         
                                         'callback': function(response) {console.log(response);}
                                         });
Leave Group
$applozic.fn.applozic('leaveGroup', {'groupId' : groupId,
                                    'clientGroupId' : clientGroupId, //use either groupId or clientGroupId
                                    'callback' :function(response){console.log(response);}
                                    });
Update Group
$applozic.fn.applozic('updateGroupInfo', {'groupId' : groupId
                                    'clientGroupId' : clientGroupId, //use either groupId or clientGroupId,
                                    'name' : groupName, // optional
                                    'imageUrl' : '',  //optional
                                    'users': [                      // required only if want to update user role
                                             {
                                               userId:userIdToUpdate, // required
                                               role:3,  // (required)    USER(0), ADMIN(1), MODERATOR(2), MEMBER(3)
                                             }],
                                    'callback' : function(response){console.log(response);}});
Get group list
$applozic.fn.applozic('getGroupList', {'callback':function (response) { //write your logic}});   

Sample response:

           {'status' : 'success' ,                 // or error
            'data': [ {'id': groupId,
                       'name' : groupName',
                       'type' : '2',               // 1,2 or 5   (private, public or broadcast)
                       'memberName':[],           // Array of group member ids
                       'adminName': '',           // Put group admin's userId
                       'removedMembersId' [],     // Array including removed or left members Id  
                       'unreadCount' : '10'       // total unread count of messages for current logged in user
                        }]    
                     }]
           }

Step 6: Context (Topic) based Chat

Add the following in window.applozic.init call:

 topicBox: true,
 getTopicDetail: function(topicId) {
        //Based on topicId, return the following details from your application
        return {'title': 'topic-title',      // Product title
                    'subtitle': 'sub-title',     // Product subTitle or Product Id
                    'link' :'image-link',        // Product image link
                    'key1':'key1' ,              // Small text anything like Qty (Optional)
                    'value1':'value1',           // Value of key1 ex-10 (number of quantity) Optional
                    'key2': 'key2',              // Small text anything like MRP (product price) (Optional)
                    'value2':'value2'            // Value of key2 ex-$100  (Optional)
                 };
 }

Add a chat button inside your web page using a tag and add the following:

Class Attribute - applozic-wt-launcher 
Data Attriutes  - mck-id, mck-name and mck-topicid
 mck-id      :  User Id of the user with whom to initiate the chat
 mck-name    :  Display name of the user with whom to initiate the chat
 mck-topicId :  Unique identifier for the topic/product 
<a  class="applozic-wt-launcher" data-mck-id="PUT_USERID_HERE" data-mck-name="PUT_DISPLAYNAME_HERE" data-mck-topicid="PUT_TOPICID_HERE">CHAT ON TOPIC</a>

File Structure

Applozic-Web-Plugin
  |--public
    |-- plugin
        |-- js
            |-- app  
                |-- sidebox  
                    |-- applozic.sidebox.js
                |-- fullview   
                    |-- applozic.fullview.js           
                |-- modules           
                    |-- api         
                        |-- applozic.api.js            - Backend chat Apis
                    |-- file
                        |-- applozic.file.js           - file related ui code
                    |-- group
                        |-- applozic.group.js          - group ui code
                    |-- message
                        |-- applozic.message.js        - message ui code
                    |-- notification
                        |-- applozic.notification.js   - notification ui code
                    |-- user
                        |-- applozic.user.js           - user ui code
                    |-- socket   
                        |--  applozic.socket.js        - Mqtt socket connection
                    |-- storage
                        |-- applozic.storage.js        - caching data
                    |-- video
                        |-- applozic.calling.js        - audio/videocall library
                |-- call
                    |-- mck-ringtone-service.js       - to play ringtone            
                    
                |-- crypto-js.4.0.min.js              - external library for Encryption
                |-- applozic.emojis.min.js            - external library for emojis
                |-- stomp.2.3.3.min.js                - external library for StompJs
                |-- applozic.widget.min.js            - external library for widgets
                |-- jquery.min.js                     - external library for jquery
                |-- locationpicker.jquery.min.js      - external library for location
                |-- twilio-video.js                   - audio/videocall library
                |-- viewer.js                         - external library files for Image/Video Preview
        |-- css
           |-- app
                |-- fullview 
                   |-- applozic.fullview.css          - fullview ui css 
                |-- sidebox   
                   |-- applozic.sidebox.css           - sidebox plugin css
                       
                |-- videocall.css   
       |-- images                                     - icons used in chat interface 
       |-- sample    
         |-- fullview.html                            - sample ui for fullview plugin
         |-- sidebox.html                             - sample ui for sidebox plugin
         
    |-- applozic.chat.min.js                            - minified file of applozic modules
|-- README.md

Note: Do not edit external libraries.

Documentation:

For UI customization, visit: Applozic Web (Javascript) Chat & Messaging Plugin Documentation

Help

We provide support over at StackOverflow when you tag using applozic, ask us anything.

Applozic is the best jquery chat plugin for instant messaging, still not convinced? Write to us at [email protected] and we will be happy to schedule a demo for you.

Free Javascript (jQuery) Chat Plugin

Special plans for startup and open source contributors, write to us at [email protected]

Github projects

Android Chat SDK https://github.com/AppLozic/Applozic-Android-SDK

Web Chat Plugin https://github.com/AppLozic/Applozic-Web-Plugin

iOS Chat SDK https://github.com/AppLozic/Applozic-iOS-SDK

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].