This will allow you to create custom icons for your forums.
You can specify a path to your forum's custom icon by going to the ACP => Forum Management => Edit Forum.
When installed, it will alter the
forums table to add a column called
myforumicon, which will be used for the custom icon of your forum.
When activated, modifications to your
forumbit_depth2_forum template will be made. It uses the following code to replace templates:
Code:
function myforumicons_activate()
{
require_once MYBB_ROOT."inc/adminfunctions_templates.php";
find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote("id=\"mark_read_{\$forum['fid']}\"></span>")."#i", "id=\"mark_read_{\$forum['fid']}\" {\$forum['myforumicon_override']}></span>{\$forum['myforumicon']}");
}
This allows the plugin to generate an icon for the forum and hide the default icon. When an icon is not set, the default will be used.
If you have any questions/concerns, please let me know.
Enjoy!
Điều này sẽ cho phép bạn tạo các biểu tượng tùy chỉnh cho diễn đàn của mình.
Bạn có thể chỉ định đường dẫn đến biểu tượng tùy chỉnh của diễn đàn bằng cách đi tới ACP => Quản lý diễn đàn => Chỉnh sửa diễn đàn.
Khi được cài đặt, nó sẽ thay đổi
Diễn đàn để thêm một cột có tên là
Diễn đàn của tôibiểu tượng, sẽ được sử dụng cho biểu tượng tùy chỉnh của diễn đàn của bạn.
Khi được kích hoạt, các sửa đổi đối với
forumbit_depth2_forum mẫu sẽ được thực hiện. Nó sử dụng mã sau để thay thế các mẫu:
Chức năng myforumicons_activate()
{
require_once MYBB_ROOT." inc / adminfunctions_templates.php";
find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote("id=\"mark_read_{\$forum['fid']}\"></span>")." #i", "id=\"mark_read_{\$forum['fid']}\" {\$forum['myforumicon_override']}></span>{\$forum['myforumicon']}");
}
Điều này cho phép plugin tạo biểu tượng cho diễn đàn và ẩn biểu tượng mặc định. Khi một biểu tượng không được đặt, mặc định sẽ được sử dụng.
Nếu bạn có bất kỳ câu hỏi / thắc mắc nào, xin vui lòng cho tôi biết.
Hưởng!