Xcomm3x

Xcomm3x1 min readPage 3 of 11
On this page 4

Outputs the comment form and initialises the JS configuration (window.Xcomm3xConfigs, one entry per block).

Important: the snippet must be on the same page as XcommThread. It is the one that passes JS all chunk names for AJAX rendering of new and edited comments.

Parameters

ParameterDefaultDescription
resource[[*id]]ID of the resource the comments belong to
block_keydefaultBlock key (allows several threads on one page)
tplxcomm3x_post_formComment form chunk
outerTpl(none)Wrapper chunk around the form. Placeholders: [[+content]], [[+resource_id]], [[+block_key]]
guestFieldsTplxcomm3x_guest_fieldsName/email fields chunk for guests
replyFormTplxcomm3x_reply_formReply form chunk (loaded via AJAX when “Reply” is clicked)
editFormTplxcomm3x_edit_formEdit form chunk (loaded via AJAX when “Edit” is clicked)
commentTplxcomm3x_comment_itemComment chunk for AJAX rendering after posting/editing
replyBtnTplxcomm3x_reply_btn“Reply” button chunk for AJAX rendering
editBtnTplxcomm3x_edit_btn“Edit” button chunk for AJAX rendering
deleteBtnTplxcomm3x_delete_btn“Delete” button chunk for AJAX rendering

Call — default theme

[[Xcomm3x]]

Call — Bootstrap 5

[[!Xcomm3x?
  &tpl=`xcomm3x_bs5_post_form`
  &guestFieldsTpl=`xcomm3x_bs5_guest_fields`
  &replyFormTpl=`xcomm3x_bs5_reply_form`
  &editFormTpl=`xcomm3x_bs5_edit_form`
  &commentTpl=`xcomm3x_bs5_comment_item`
  &replyBtnTpl=`xcomm3x_bs5_reply_btn`
  &editBtnTpl=`xcomm3x_bs5_edit_btn`
  &deleteBtnTpl=`xcomm3x_bs5_delete_btn`
]]

Call — UIKit 3

[[!Xcomm3x?
  &tpl=`xcomm3x_uk3_post_form`
  &guestFieldsTpl=`xcomm3x_uk3_guest_fields`
  &replyFormTpl=`xcomm3x_uk3_reply_form`
  &editFormTpl=`xcomm3x_uk3_edit_form`
  &commentTpl=`xcomm3x_uk3_comment_item`
  &replyBtnTpl=`xcomm3x_uk3_reply_btn`
  &editBtnTpl=`xcomm3x_uk3_edit_btn`
  &deleteBtnTpl=`xcomm3x_uk3_delete_btn`
]]