Mibew Messenger Community

General => Support => Topic started by: manal on December 30, 2015, 06:57:39 AM

Title: Visitors data through server event
Post by: manal on December 30, 2015, 06:57:39 AM
When a vistor starts a chat event in mibew how to capture the vistors data through the code.I have refferred the http://docs.mibew.org/development/server-side-events.html but did not get much idea for the same.
Title: Re: Visitors data through server event
Post by: scalior on December 31, 2015, 08:12:06 PM
Please provide more context. What do you want to accomplish? Are you developing a plugin?

Eyong
Title: Re: Visitors data through server event
Post by: manal on January 01, 2016, 06:37:57 AM
Yes want to track and capture data of the vistor who just starts his/her chat.Need To develop a seperate plugin?

Actually the scenario is that while the visitor starts his/her thread want to insert data in our site.So how to do that?
Title: Re: Visitors data through server event
Post by: scalior on January 01, 2016, 10:47:35 PM
If I understand your requirements correctly I believe you will need to develop a plugin that intercepts events from Mibew and posts them to your server. A good starting point will be the RealBan plugin. You can take a look at the run() method in here to see how to attach listeners for the various events.
https://github.com/Mibew/real-ban-plugin/blob/master/Plugin.php#L55

Also, if you were talking about sending some data from your server to the chat window (e.g. pre-populating the username and email) this thread could be helpful. https://mibew.org/forums/index.php/topic,191805.msg198390.html

I have also started a Plugin Developers Lounge (https://mibew.org/forums/index.php/topic,191972.0.html) to provide an environment for plugin developers to share ideas. If you go down the route of developing the plugin yourself feel free to post in there.

Eyong