From c7f984723c4899a179b7c44ecc2ebdfd0251e4df Mon Sep 17 00:00:00 2001 From: Arcturus Date: Sat, 5 Oct 2024 05:32:51 +0900 Subject: [PATCH] edit readme and update eventhandler --- .../classes/event_handler.php | 192 +++++++++--------- README.md | 18 +- 2 files changed, 110 insertions(+), 100 deletions(-) diff --git a/AvocadoEdition_Light/classes/event_handler.php b/AvocadoEdition_Light/classes/event_handler.php index daba15c..2a72c08 100644 --- a/AvocadoEdition_Light/classes/event_handler.php +++ b/AvocadoEdition_Light/classes/event_handler.php @@ -16,153 +16,153 @@ class EventHandler */ protected static $gnuboardCompatibleList = [ // adm/editor_font.php - "amber.admin.editor_font_form_before" => "", // amber only - "amber.admin.editor_font_form_after" => "", // amber only + "amber.admin.editor_font_form_before" => "", // amber only + "amber.admin.editor_font_form_after" => "", // amber only // adm/editor_font_update.php - "amber.admin.editor_font_update_before" => "", // amber only - "amber.admin.editor_font_update_after" => "", // amber only + "amber.admin.editor_font_update_before" => "", // amber only + "amber.admin.editor_font_update_after" => "", // amber only // common.php - "gnuboard.loadlibs.after" => "", // amber only - "gnuboard.htmlprocess.before" => "common_header", - "gnuboard.htmlprocess.after" => "", // amber only + "gnuboard.loadlibs.after" => "", // amber only + "gnuboard.htmlprocess.before" => "common_header", + "gnuboard.htmlprocess.after" => "", // amber only // head.php - "gnuboard.head.before" => "pre_head", + "gnuboard.head.before" => "pre_head", // tail.php - "gnuboard.tail.before" => "", // amber only - "gnuboard.tail.after" => "", // amber only + "gnuboard.tail.before" => "", // amber only + "gnuboard.tail.after" => "", // amber only // tail.sub.php - "gnuboard.tail_sub" => "tail_sub", + "gnuboard.tail_sub" => "tail_sub", // adm/_common.php - "gnuboard.admin.load_common" => "admin_common", + "gnuboard.admin.load_common" => "admin_common", // adm/board_copy_update.php - "gnuboard.admin.board_copy_file" => "admin_board_copy_file", + "gnuboard.admin.board_copy_file" => "admin_board_copy_file", // adm/board_form_update.php - "gnuboard.admin.board_form_update" => "admin_board_form_update", + "gnuboard.admin.board_form_update" => "admin_board_form_update", // adm/board_form_before.php - "gnuboard.admin.board_form_before" => "adm_board_form_before", + "gnuboard.admin.board_form_before" => "adm_board_form_before", // adm/board_list_update.php - "gnuboard.admin.board_list_update" => "admin_board_list_update", + "gnuboard.admin.board_list_update" => "admin_board_list_update", // adm/boardgroup_form_update.php - "gnuboard.admin.boardgroup_form_update" => "admin_boardgroup_form_update", + "gnuboard.admin.boardgroup_form_update" => "admin_boardgroup_form_update", // adm/boardgroup_list_update.php - "gnuboard.admin.boardgroup_list_update" => "admin_boardgroup_list_update", + "gnuboard.admin.boardgroup_list_update" => "admin_boardgroup_list_update", // adm/cache_file_delete.php - "gnuboard.admin.cache_file_delete_before" => "adm_cache_file_delete_before", - "gnuboard.admin.cache_file_delete" => "adm_cache_file_delete", + "gnuboard.admin.cache_file_delete_before" => "adm_cache_file_delete_before", + "gnuboard.admin.cache_file_delete" => "adm_cache_file_delete", // adm/config_form_update.php - "gnuboard.admin.config_form_update" => "admin_config_form_update", + "gnuboard.admin.config_form_update" => "admin_config_form_update", // adm/contentformupdate.php - "gnuboard.admin.content_created" => "admin_content_created", - "gnuboard.admin.content_updated" => "admin_content_updated", - "gnuboard.admin.content_deleted" => "admin_content_deleted", + "gnuboard.admin.content_created" => "admin_content_created", + "gnuboard.admin.content_updated" => "admin_content_updated", + "gnuboard.admin.content_deleted" => "admin_content_deleted", // adm/member_form_update.php - "gnuboard.admin.member_form_update" => "admin_member_form_update", + "gnuboard.admin.member_form_update" => "admin_member_form_update", // adm/member_form.php - "gnuboard.admin.member_form_add" => "admin_member_form_add", - "gnuboard.admin.member_form_after" => "admin_member_form_after", + "gnuboard.admin.member_form_add" => "admin_member_form_add", + "gnuboard.admin.member_form_after" => "admin_member_form_after", // adm/member_list_update.php - "gnuboard.admin.member_list_update" => "admin_member_list_update", + "gnuboard.admin.member_list_update" => "admin_member_list_update", // adm/menu_list_update.php - "gnuboard.admin.menu_list_update" => "admin_menu_list_update", + "gnuboard.admin.menu_list_update" => "admin_menu_list_update", // adm/theme_update.php - "gnuboard.admin.theme_update" => "adm_theme_update", + "gnuboard.admin.theme_update" => "adm_theme_update", // adm/viewer_form_update.php - "gnuboard.admin.viewer_update" => "", // amber only + "gnuboard.admin.viewer_update" => "", // amber only // bbs/delete_all.php - "gnuboard.bbs.delete_all" => "bbs_delete_all", + "gnuboard.bbs.delete_all" => "bbs_delete_all", // bbs/delete_comment.php - "gnuboard.bbs.delete_comment" => "bbs_delete_comment", + "gnuboard.bbs.delete_comment" => "bbs_delete_comment", // bbs/delete.php - "gnuboard.bbs.delete" => "bbs_delete", + "gnuboard.bbs.delete" => "bbs_delete", // bbs/download.php - "gnuboard.bbs.download_file_header" => "download_file_header", + "gnuboard.bbs.download_file_header" => "download_file_header", // bbs/good.php - "gnuboard.bbs.good_before" => "bbs_good_before", - "gnuboard.bbs.increase_good_json" => "bbs_increase_good_json", - "gnuboard.bbs.increase_good_html" => "bbs_increase_good_html", - "gnuboard.bbs.good_after" => "bbs_good_after", + "gnuboard.bbs.good_before" => "bbs_good_before", + "gnuboard.bbs.increase_good_json" => "bbs_increase_good_json", + "gnuboard.bbs.increase_good_html" => "bbs_increase_good_html", + "gnuboard.bbs.good_after" => "bbs_good_after", // bbs/login_check.php - "gnuboard.member.login_check_before" => "member_login_check_before", - "gnuboard.member.login_session_before" => "login_session_before", - "gnuboard.member.login_check" => "member_login_check", + "gnuboard.member.login_check_before" => "member_login_check_before", + "gnuboard.member.login_session_before" => "login_session_before", + "gnuboard.member.login_check" => "member_login_check", // bbs/login.php - "gnuboard.member.login_tail" => "member_login_tail", + "gnuboard.member.login_tail" => "member_login_tail", // bbs/logout.php - "gnuboard.member.logout" => "member_logout", + "gnuboard.member.logout" => "member_logout", // bbs/member_leave.php - "gnuboard.member.leave" => "member_leave", + "gnuboard.member.leave" => "member_leave", // bbs/memo_delete.php - "gnuboard.memo.delete" => "memo_delete", + "gnuboard.memo.delete" => "memo_delete", // bbs/memo_form_update.php - "gnuboard.memo.form_update_before" => "memo_form_update_before", - "gnuboard.memo.form_update_after" => "memo_form_update_after", - "gnuboard.memo.form_update_failed" => "memo_form_update_failed", + "gnuboard.memo.form_update_before" => "memo_form_update_before", + "gnuboard.memo.form_update_after" => "memo_form_update_after", + "gnuboard.memo.form_update_failed" => "memo_form_update_failed", // bbs/memo.php - "gnuboard.memo.list" => "memo_list", + "gnuboard.memo.list" => "memo_list", // bbs/move_update.php - "gnuboard.bbs.move_copy" => "bbs_move_copy", - "gnuboard.bbs.move_update" => "bbs_move_update", + "gnuboard.bbs.move_copy" => "bbs_move_copy", + "gnuboard.bbs.move_update" => "bbs_move_update", // bbs/move.php - "gnuboard.bbs.move_html_footer" => "move_html_footer", + "gnuboard.bbs.move_html_footer" => "move_html_footer", // bbs/new_delete.php - "gnuboard.bbs.new_delete" => "bbs_new_delete", + "gnuboard.bbs.new_delete" => "bbs_new_delete", // bbs/password_check.php - "gnuboard.member.password_is_wrong" => "password_is_wrong", + "gnuboard.member.password_is_wrong" => "password_is_wrong", // bbs/password_lost_certify.php - "gnuboard.member.password_lost_certify_before" => "password_lost_certify_before", - "gnuboard.member.password_lost_certify_after" => "password_lost_certify_after", + "gnuboard.member.password_lost_certify_before" => "password_lost_certify_before", + "gnuboard.member.password_lost_certify_after" => "password_lost_certify_after", // bbs/password_lost2.php - "gnuboard.member.password_lost2_after" => "password_lost2_after", + "gnuboard.member.password_lost2_after" => "password_lost2_after", // bbs/qadelete.php - "gnuboard.bbs.qa_delete" => "qa_delete", + "gnuboard.bbs.qa_delete" => "qa_delete", // bbs/qadownload.php - "gnuboard.bbs.qa_download_file_header" => "qa_download_file_header", + "gnuboard.bbs.qa_download_file_header" => "qa_download_file_header", // bbs/qawrite_update.php - "gnuboard.bbs.qawrite_update" => "qawrite_update", + "gnuboard.bbs.qawrite_update" => "qawrite_update", // bbs/register_form_update.php - "gnuboard.member.register_form_update_before" => "register_form_update_before", - "gnuboard.member.register_form_update_valid" => "register_form_update_valid", - "gnuboard.member.register_form_update_send_mb_mail" => "register_form_update_send_mb_mail", - "gnuboard.member.register_form_update_send_admin_mail" => "register_form_update_send_admin_mail", - "gnuboard.member.register_form_update_send_certify_mail" => "register_form_update_send_certify_mail", - "gnuboard.member.register_form_update_after" => "register_form_update_after", + "gnuboard.member.register_form_update_before" => "register_form_update_before", + "gnuboard.member.register_form_update_valid" => "register_form_update_valid", + "gnuboard.member.register_form_update_send_mb_mail" => "register_form_update_send_mb_mail", + "gnuboard.member.register_form_update_send_admin_mail" => "register_form_update_send_admin_mail", + "gnuboard.member.register_form_update_send_certify_mail" => "register_form_update_send_certify_mail", + "gnuboard.member.register_form_update_after" => "register_form_update_after", // bbs/register_form.php - "gnuboard.member.register_form_before" => "register_form_before", - "gnuboard.member.register_form_after" => "register_form_after", + "gnuboard.member.register_form_before" => "register_form_before", + "gnuboard.member.register_form_after" => "register_form_after", // bbs/write_comment_update.php - "gnuboard.bbs.comment_update_after" => "comment_update_after", + "gnuboard.bbs.comment_update_after" => "comment_update_after", // bbs/write_update.php - "gnuboard.bbs.write_update_before" => "write_update_before", - "gnuboard.bbs.write_update_document_create" => "", // amber only - "gnuboard.bbs.write_update_document_update" => "", // amber only - "gnuboard.bbs.write_update_file_insert" => "write_update_file_insert", - "gnuboard.bbs.write_update_after" => "write_update_after", + "gnuboard.bbs.write_update_before" => "write_update_before", + "gnuboard.bbs.write_update_document_create" => "", // amber only + "gnuboard.bbs.write_update_document_update" => "", // amber only + "gnuboard.bbs.write_update_file_insert" => "write_update_file_insert", + "gnuboard.bbs.write_update_after" => "write_update_after", // bbs/write.php - "gnuboard.bbs.write" => "bbs_write", + "gnuboard.bbs.write" => "bbs_write", // lib/cache.lib.php - "gnuboard.set_cache_event" => "g5_set_cache_event", - "gnuboard.admin.cache_delete" => "adm_cache_delete", + "gnuboard.set_cache_event" => "g5_set_cache_event", + "gnuboard.admin.cache_delete" => "adm_cache_delete", // lib/common.lib.php - "gnuboard.goto_url" => "goto_url", - "gnuboard.alert" => "alert", - "gnuboard.alert_close" => "alert_close", - "gnuboard.html_purifier_config" => "html_purifier_config", - "gnuboard.sql_query_after" => "sql_query_after", - "gnuboard.delete_cache_latest" => "delete_cache_latest", - "gnuboard.delete_editor_thumbnail_before" => "delete_editor_thumbnail_before", - "gnuboard.delete_editor_thumbnail_after" => "delete_editor_thumbnail_after", - "gnuboard.member_delete_after" => "member_delete_after", + "gnuboard.goto_url" => "goto_url", + "gnuboard.alert" => "alert", + "gnuboard.alert_close" => "alert_close", + "gnuboard.html_purifier_config" => "html_purifier_config", + "gnuboard.sql_query_after" => "sql_query_after", + "gnuboard.delete_cache_latest" => "delete_cache_latest", + "gnuboard.delete_editor_thumbnail_before" => "delete_editor_thumbnail_before", + "gnuboard.delete_editor_thumbnail_after" => "delete_editor_thumbnail_after", + "gnuboard.member_delete_after" => "member_delete_after", // lib/mailer.lib.php - "gnuboard.mail_send_result" => "mail_send_result", + "gnuboard.mail_send_result" => "mail_send_result", // lib/thumbnail.lib.php - "gnuboard.is_animated_gif_after" => "is_animated_gif_after", + "gnuboard.is_animated_gif_after" => "is_animated_gif_after", // plugin/editor/cheditor5/imageUpload/upload.php - "gnuboard.cheditor_photo_upload" => "cheditor_photo_upload", + "gnuboard.cheditor_photo_upload" => "cheditor_photo_upload", // plugin/editor/smarteditor2/photo_uploader/popup/php/index.php - "gnuboard.smarteditor_photo_upload" => "smarteditor_photo_upload", + "gnuboard.smarteditor_photo_upload" => "smarteditor_photo_upload", // plugin/editor/cheditor5/imageUpload/delete.php // plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php - "gnuboard.delete_editor_file" => "delete_editor_file", + "gnuboard.delete_editor_file" => "delete_editor_file", ]; /** @@ -171,7 +171,7 @@ class EventHandler */ protected static $eventHandlers = []; protected static $performanceStopwatch = []; - + /** * script build start time of gnuboard5 * @var float @@ -227,7 +227,11 @@ class EventHandler { if (isset(self::$eventHandlers[$event])) { foreach (self::$eventHandlers[$event] as $callback) { - $callback->getAction(...$data); + if (empty($data)) { + $callback->getAction(); + } else { + $callback->getAction(...$data); + } } if (function_exists("run_event")) { diff --git a/README.md b/README.md index b0cd5a7..8fe9581 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,25 @@ # Avocado Amber -Avocado Amber : Original Character Personal Site by GUNUBOARD Custom + +Avocado Amber - GNUBoard Custom: Personal Homepage Tool ----------------------------- 이 프로그램은 개인 홈페이지 제작을 위해 -GNUBoard5 을 수정하여 만들어진 AvocadoEdition Light 를 수정한 버전입니다. +AvocadoEdition Light 의 구조를 바탕으로 GNUBoard 기능과 함께 재수정한 버전입니다. 이를 위해 전반적인 코드 수정이 이루어졌으며 원본 AvocadoEdition Light 의 기능을 유지했습니다. +- 아보카도 퍼스널과 대부분 호환됩니다. (문제가 있다면 알려주세요!) + ----------------------------- -## 기여 +## 오류 제보 -:thinking: github 등에서 migrate 이후 연합 기능 또는 `contact` at `drk.st` 로 의견을 보내주세요 +- [crepe](https://crepe.cm/@sharlayan) +- [mastodon](https://drk.st/@notice) +- [홈페이지](https://info.drk.st/about) + +중 하나 이상을 통해 오류 제보가 가능합니다. ----------------------------- @@ -20,5 +27,4 @@ GNUBoard5 을 수정하여 만들어진 AvocadoEdition Light 를 수정한 버 기존에 개조된 코드가 있다면 git을 이용해 병합하는 것을 추천합니다. -기존 코드를 크게 개조하지 않았다면 단순히 덮어 씌우는 것으로 옮길 수 있습니다. -버전을 변경하고 싶은 경우 별도로 문의해주세요 +버전 변경에 대한 의뢰도 가능합니다.