Author Topic: Chat invitation pop up after x seconds on page  (Read 6507 times)

0 Members and 1 Guest are viewing this topic.

Afrit

  • Jr. Member
  • **
  • Posts: 3
Chat invitation pop up after x seconds on page
« on: May 29, 2015, 02:06:17 PM »
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
« Last Edit: May 29, 2015, 02:08:11 PM by Afrit »

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: Chat invitation pop up after x seconds on page
« Reply #1 on: May 29, 2015, 02:37:02 PM »
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

  • Jr. Member
  • **
  • Posts: 3
Re: Chat invitation pop up after x seconds on page
« Reply #2 on: May 29, 2015, 09:41:43 PM »
Thank you very much Dmitriy! I'm going to look at those projects.