Arty
Well-known member
That function doesn't use XenForo email templates. You need this add-on: https://xenforo.com/community/resources/email-users-html-emails.5147/ACP/users/Email users
That function doesn't use XenForo email templates. You need this add-on: https://xenforo.com/community/resources/email-users-html-emails.5147/ACP/users/Email users
<?php
namespace SonnieMail;
class Listener
{
public static function templatePostRender(\XF\Template\Templater $templater, $type, $template, &$output)
{
if ($type !== 'email') {
return;
}
$output = strtr($output, [
':smilie1:' => 'replacement',
':smilie2:' => 'another replacement',
]);
}
}
$config['development']['enabled'] = true;
php cmd.php xf-addon:create
better:put SonnieMail in first field, Listener in second field
SonnieMail\Listener
(class name) in the first and templatePostRender
(function name) in the second That's how it may work.cd /path/to/your/xf2/installation
.php cmd.php xf-addon:create
.This resource has been deleted by XenForo Ltd. in line with our resource housekeeping criteria.
We use essential cookies to make this site work, and optional cookies to enhance your experience.