Mibew Messenger Community

General => Support => Topic started by: leandro2219 on June 15, 2018, 12:38:05 PM

Title: Offline Email show referrer field
Post by: leandro2219 on June 15, 2018, 12:38:05 PM
Hi All,

Is there any way to show on the "offline email" that is sent to the admin, the referrer field or the page where the visitor is asking?

Thanks.
Title: Re: Offline Email show referrer field
Post by: faf on June 16, 2018, 11:36:23 AM
There is no simple way to do that.

In my opinion the most affordable (but a little bit complicated) way is to create a special plugin that should handle the \Mibew\EventDispatcher\Events::THREAD_CREATE (https://docs.mibew.org/development/server-side-events.html#thread-events) event and check the thread state (is should be Thread::STATE_LEFT). Then you could duplicate the mailing with your own mail template and custom fields.
Title: Re: Offline Email show referrer field
Post by: faf on June 27, 2018, 09:20:55 PM
BTW, just realized that probably one could also make use of the 'info' field in the standard "leave message" form. It can be done by writing a plugin that utilizes \Mibew\EventDispatcher\Events::WIDGET_RESPONSE_ALTER (https://docs.mibew.org/development/server-side-events.html#widget-events) event.