1.8.x Tính Năng: Clipboard Image to PM

Preview

Tác giả: Nitje

Phiên bản: 0.0.3

Gửi lúc: 09/09/2025

Cập nhật lúc: 14/09/2025

User Profiles Communication
Mô tả
This is how the insertion works Paste:
Paste an image from the clipboard into the editor text box.
Upload: The plugin uploads the file.
Inline placement: At the exact last cursor position, the plugin places the placeholder [im-g] in the text.

Representation:
By clicking on Preview, it will then also be displayed.
In the text, the image is displayed inline.
Maximum size=10MB Automatic deletion from the image, after 14 days.
Scope: The plugin only responds to private.php

Installation
Upload plugin files to inc/plugins/.
Check the write permissions of the folders /jscripts and the /inc/tasks -> temporarily at 0757
Install & Activate in ACP.
Now reset the folder permissions to the previous setting
In ACP settings such as Maximum Size, Duration of Storage and DEBUG can be made. A task is created for cleanup.
Delete function for single or multiple file uploads for user added in usercp under messages clipboard attachments

Error Case & Permissions
If only the img tag_data_image_png_base64... it says, the plugin probably couldn't create the required scripts:

Check the write permissions of the jscripts folder in question and the /inc/tasks folder (the web server user must be allowed to write).
Procedure (practical example): Set the folder to 0757 for a short time, Install & Activate plugin, Reset rights.
Background: Your login user (e.g. ABC) may be different from the web server user (e.g. XYZ). The decisive factor is that XYZ has write permissions. 

Then deactivate and uninstall the plugin, and only now install and activate it. The order is crucial.



My test system (nginx and other versions not tested):


MyBB Version 1.8.39
PHP Version 8.3.12
SQL Engine: MySQLi 8.0.40

Apache/2.4.65 (unix) OpenSSL/3.5.1


If pasting doesn't work at all, meaning you can't even paste text, then it's the browser's fault, which requires an https connection to access the clipboard.


Uninstall
When disabling deletes only cleaning task! Uninstalling removes the plugin, the associated script and settings (clean for future updates).
Đây là cách hoạt động của chèn: Dán:

Dán hình ảnh từ khay nhớ tạm vào hộp văn bản trình chỉnh sửa.
Tải lên: Plugin tải tệp lên.
Vị trí nội tuyến: Tại vị trí con trỏ cuối cùng chính xác, plugin đặt trình giữ chỗ [im-g] trong văn bản.

Sự đại diện:
Bằng cách nhấp vào Xem trước, sau đó nó cũng sẽ được hiển thị.
Trong văn bản, hình ảnh được hiển thị cùng dòng.
Kích thước tối đa = 10MB Tự động xóa khỏi hình ảnh, sau 14 ngày.
Phạm vi: Plugin chỉ phản hồi private.php

Cài đặt
Tải tệp plugin lên inc/plugins/.
Kiểm tra quyền ghi của các thư mục /jscripts và /inc/tasks -> tạm thời tại 0757
Cài đặt & Kích hoạt trong ACP.
Bây giờ hãy đặt lại quyền thư mục về cài đặt trước đó
Trong cài đặt ACP như Kích thước tối đa, Thời lượng lưu trữ và DEBUG có thể được thực hiện. Một tác vụ được tạo để dọn dẹp.
Chức năng xóa để tải lên một hoặc nhiều tệp cho người dùng được thêm vào usercp trong tệp đính kèm khay nhớ tạm của tin nhắn

Trường hợp lỗi và quyền
Giá như hình ảnh tag_data_image_png_base64... Nó nói, plugin có thể không thể tạo các tập lệnh cần thiết:

Kiểm tra quyền ghi của thư mục jscripts được đề cập và thư mục /inc/tasks (người dùng máy chủ web phải được phép ghi).
Thủ tục (ví dụ thực tế): Đặt thư mục thành 0757 trong một thời gian ngắn, Cài đặt & Kích hoạt plugin, Đặt lại quyền.
Nền: Người dùng đăng nhập của bạn (ví dụ: ABC) có thể khác với người dùng máy chủ web (ví dụ: XYZ). Yếu tố quyết định là XYZ có quyền ghi. 

Sau đó, hủy kích hoạt và gỡ cài đặt plugin, và chỉ bây giờ cài đặt và kích hoạt nó. Thứ tự là rất quan trọng.



Hệ thống thử nghiệm của tôi (nginx và các phiên bản khác chưa được thử nghiệm):


Phiên bản MyBB 1.8.39
Phiên bản PHP 8.3.12
Công cụ SQL: MySQLi 8.0.40

Apache/2.4.65 (unix) OpenSSL/3.5.1


Nếu việc dán hoàn toàn không hoạt động, có nghĩa là bạn thậm chí không thể dán văn bản, thì đó là lỗi của trình duyệt, yêu cầu kết nối https để truy cập khay nhớ tạm.


Gỡ cài đặt
Khi Tắt chỉ xóa tác vụ dọn dẹp! Gỡ cài đặt sẽ xóa plugin, tập lệnh liên quan và cài đặt (sạch cho các bản cập nhật trong tương lai).