The Joomla content plugin has an option to send an email to admin users when a new article is submitted via the frontend
This needs to be converted to use the mail templates do that it can be customised and styled just as all other emails sent by Joomla. Currently its just a plain text email
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Feature
|
I think this entire block should be removed from content plugin Joomla.php so that action log mail template is used.
// Messaging for new items
$default_language = ComponentHelper::getParams('com_languages')->get('administrator');
$debug = $this->getApplication()->get('debug_lang');
foreach ($users as $user_id) {
if ($user_id != $user->id) {
// Load language for messaging
$receiver = $this->getUserFactory()->loadUserById($user_id);
$lang = Language::getInstance($receiver->getParam('admin_language', $default_language), $debug);
$lang->load('com_content');
$message = [
'user_id_to' => $user_id,
'subject' => $lang->_('COM_CONTENT_NEW_ARTICLE'),
'message' => sprintf($lang->_('COM_CONTENT_ON_NEW_CONTENT'), $user->get('name'), $article->title),
];
$model_message = $this->getApplication()->bootComponent('com_messages')->getMVCFactory()
->createModel('Message', 'Administrator');
$model_message->save($message);
}
}
Why would you use the actionlog template. This is nothing to do with that
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-10-14 09:51:07 |
Closed_By | ⇒ | alikon |
@LadySolveig can you direct me on which steps to take to solve this?