เบื้องต้นผมลอง
- core.modify_submit_post_data
- core.posting_modify_submit_post_after
โค้ด: เลือกทั้งหมด
if ($event['mode'] == 'delete') {
}
Moderator: mindphp, ผู้ดูแลกระดาน
โค้ด: เลือกทั้งหมด
if ($event['mode'] == 'delete') {
}
โค้ด: เลือกทั้งหมด
/**
* This event allows to modify the conditions for the post deletion
*
* @event core.handle_post_delete_conditions
* @var int forum_id The id of the forum
* @var int topic_id The id of the topic
* @var int post_id The id of the post
* @var array post_data Array with the post data
* @var bool is_soft The flag indicating whether it is the soft delete mode
* @var string delete_reason Description for the post deletion reason
* @var bool force_delete_allowed Allow the user to delete the post (all permissions and conditions are ignored)
* @var bool force_softdelete_allowed Allow the user to softdelete the post (all permissions and conditions are ignored)
* @var string perm_check The deletion mode softdelete|delete
* @since 3.1.11-RC1
*/
โค้ด: เลือกทั้งหมด
if (confirm_box(true))
{
....
}
สามารถทำงานได้ครับeange08 เขียน: ↑27/01/2023 11:08 am ส่วนลบโพสต์ ต้องดู event ในไฟล์ functions_posting.php จะมีส่วนการลบโพสต์ ลองดูที่ event นี้ดูค่ะต้องเช็คตัว checkbox ควบคู่ด้วยฟังกชั่นนี้โค้ด: เลือกทั้งหมด
/** * This event allows to modify the conditions for the post deletion * * @event core.handle_post_delete_conditions * @var int forum_id The id of the forum * @var int topic_id The id of the topic * @var int post_id The id of the post * @var array post_data Array with the post data * @var bool is_soft The flag indicating whether it is the soft delete mode * @var string delete_reason Description for the post deletion reason * @var bool force_delete_allowed Allow the user to delete the post (all permissions and conditions are ignored) * @var bool force_softdelete_allowed Allow the user to softdelete the post (all permissions and conditions are ignored) * @var string perm_check The deletion mode softdelete|delete * @since 3.1.11-RC1 */
โค้ด: เลือกทั้งหมด
if (confirm_box(true)) { .... }
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 101