Video có ở:
https://octobercms.com/blog/post/building-a-blog-and-forum
Các plugin sử dụng là của RainLab
Khi post bài, plugin forum : plugins\
ainlab\\forum\\components\\Topic.php
có hàm TopicModel::checkThrottle, để chống user spam bài viết:
if (TopicModel::checkThrottle($member)) {
throw new ApplicationException('Please wait a few minutes before posting another topic.');
}
anh em có thể spam bằng cách, signup 1 user và lấy ra được userId, thường là 1 cho user đầu tiên, rồi sửa code trên thành
if ($member->id != 1 && TopicModel::checkThrottle($member)) {
throw new ApplicationException('Please wait a few minutes before posting another topic.');
}
Trên 4rum, mặc định nội dung ren ra từ mã markdown, khá là tù, ae có thể ren nội dung html thuần cho 1 số user đặc biệt (userId == 1) như sau:
Sửa file: plugins\
ainlab\\forum\\components\\topic\\post.htm
Tìm đoạn:
{{ post.content_html|raw }}
Và sửa thành:
{% if post.member_id == '1' %}
{{ post.content|raw }}
{% else %}
{{ post.content_html|raw }}
{% endif %}
Cấu hình trên VPS cho ai chưa quen:
https://websiteforstudents.com/install-lavalite-cms-on-ubuntu-16-04-18-04-18-10-with-apache2-php-7-2/
Nói chung ai chán WordPress có thể thử qua....