1.Installation #

To install the plugin, follow these steps:

i. From WordPress Dashboard navigate to Plugins > Add New > Upload Plugin
ii. Click on “Choose File” and select the plugin zip. Click on “Install Now”
iii. The plugin will be installed, click on “Activate Plugin”

Congratulations! The plugin in installed. Now if you will visit the front end, you can see the chat widget appear.

Yes No

2.Backend Settings #

This is a screenshot of Backend Settings:

backend1
1. Primary Color: This is the main color of the widget. Adjust it to match your webpage’s theme color.

2. Chat text color: This is the color of chat text. Default to white, but if your primary color is light then you’d want to change the text color to something dark.

3. Chat Refresh Interval:

4. Height of the Chat list(px): As the name suggest, this is the height of the chat list.

5. User Avatar: This is an interesting one.
You get 3 options:

i. Gravatar: User’s email is fetched from his Gravatar.com display pic.

ii. Meta: Use this option if you have saved the URL of user’s profile pic in meta. If you select this option then you must define the meta key also

backend2

iii. BuddyPress: This option is available only if BuddyPress is installed. If this option is selected then user’s BuddyPress profile picture will be visible on the chat list.

Another option to edit the friend’s avatar is to use wpnik_chat_friends Filter

6. Friends: By default, all the user’s on the website are visible on the chat list. If you want only BuddyPress friends to be visible on the chat list then you can select BuddyPress here.

backend3

If you want to implement a custom logic to show the list of users you can do so using the  wpnik_chat_friends Filter

Yes No

3.Hooks and filters #

Filter: wpnik_chat_friends

Description: Can be used to modify the Friends data before showing on the front end.

Example:

 

Filter: wpnik_user_name

Description: Can be used to change name of certain site member.

Example:

Filter: wpnik_user_profile_pic

Description: Can be used to modify user’s profile picture

Example:

 

Yes No

4.PHP API FUNCTIONS #

Function: wpnik_chat_send_msg( $to , $msg , $from );

Description: Sends a message

Params:

$to: INTEGER The ID of user to whom the message is to be sent.

$msg: STRING The message to be sent

$from: INTEGER The ID of user who is sending the message.

 

Yes No

5.JS API #

Function: wpnikchat_openwindow($user_id)

Description: Opens the chat window for specific user.

Params

$user_id: INTEGER The user/friend/member for whom chat window is to be open.

Yes No

6.Support #

Thank you for using this plugin. If you have any question or you’re stuck somewhere feel free to shoot me a mail here: mrpramodjodhani@gmail.com 

Yes No