General > Support
Chat invitation pop up after x seconds on page
(1/1)
Afrit:
Hi,
I would like to alter mibew so that the chat invitation pop up pops up after the user has been on the same page for x seconds.
Can someone please direct me to which classes I should look in to change this?
I'm new to mibew and don't really know what all the classes do.
I'm using mibew 2.0.1.
Thanks in advance.
-Afrit
Dmitriy Simushev:
Hi,
I believe you can create a server-side Mibew plugin which will invite visitors after checking some conditions (pages visited, time spent on site, etc...).
To start with plugins take a look at Boilerplate plugin (https://github.com/Mibew/boilerplate-plugin). Also you definitely should take a look at Events::VISITOR_TRACK event (http://docs.mibew.org/development/server-side-events.html#visitor-events). It could be useful.
An example of simple auto-invitation logic can be seen here: https://github.com/JustBlackBird/aggressive-messaging/blob/master/Bug/Mibew/Plugin/Aggressive/Plugin.php#L109-L130 . The code is outdated and has to be rewritten but it can be the starting point for you.
Afrit:
Thank you very much Dmitriy! I'm going to look at those projects.
Navigation
[0] Message Index
Go to full version