Script for toast notifications. Supports Notyf and SweetAlert2 (must be installed). You can also set miniShop3, FetchIt, or AjaxForm to reuse those components’ notifications (if installed).
Fired before a comment is created. Receives $data — the array submitted from the form. You may modify and return it with $modx->event->returnedValues = $data;
rcOnAfterCreateComment
Fired after a comment is created. Receives $object — the new comment object.
resComments
Nested comments with pagination for MODX 3 resources.
Key features
System settings
Supports Notyf and SweetAlert2 (must be installed). You can also set miniShop3, FetchIt, or AjaxForm to reuse those components’ notifications (if installed).
{assets_url}components/rescomments/js/web/default.min.js{assets_url}components/rescomments/css/web/default.min.cssSet
allto show the tab for every template; leave empty to hide it.createdby).rc_tpl_email_authorrc_tpl_email_managerrc_tpl_email_userresComments snippet
Renders comments for a resource and loads the required scripts and styles. Call it uncached:
With Fenom:
With pdoPage:
Snippet properties (override system settings).
0— logged-in only).[[%rescomments_block_title]][[%rescomments_add]][[%rescomments_reply]]name, email, text, agreecomment_subjectOnly top-level comments are shown. If there are replies, their count and an “Expand” button are shown.
{"createdon":"DESC"}rc_tpl_commentrc_tpl_wrapperrc_tpl_formrc_tpl_deleterc_tpl_replies_info[[++emailsender]][[++site_name]]rc_tpl_email_authorrc_tpl_email_managerrc_tpl_email_userChunks support standard MODX tags and Fenom. Bundled templates are styled for Bootstrap.
Plugin events
Receives
$data— the array submitted from the form.You may modify and return it with
$modx->event->returnedValues = $data;$object— the new comment object.