add emoticon_list and emoticon_list_update event

This commit is contained in:
Amberstone 2024-10-05 13:23:37 +09:00
parent 3a09727b1f
commit 56c3c3d237
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
4 changed files with 19 additions and 4 deletions

View file

@ -203,4 +203,6 @@ if ($config['cf_point_term'] > 0) {
return true; return true;
} }
</script><?php </script><?php
EventHandler::triggerEvent("amber.admin.emoticon_list_after");
include_once './admin.tail.php'; include_once './admin.tail.php';

View file

@ -12,6 +12,8 @@ $count = count($_POST['chk']);
if (!$count) if (!$count)
alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.'); alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.');
EventHandler::triggerEvent("amber.admin.emoticon_list_update_before");
for ($i = 0; $i < $count; $i++) { for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김 // 실제 번호를 넘김
$k = $_POST['chk'][$i]; $k = $_POST['chk'][$i];
@ -31,4 +33,6 @@ for ($i = 0; $i < $count; $i++) {
@unlink(G5_PATH . $row['me_img']); @unlink(G5_PATH . $row['me_img']);
} }
EventHandler::triggerEvent("amber.admin.emoticon_list_update_after");
goto_url('./emoticon_list.php?' . $qstr); goto_url('./emoticon_list.php?' . $qstr);

View file

@ -17,6 +17,8 @@ $group_code = null;
$primary_code = null; $primary_code = null;
$count = count($_POST['code']); $count = count($_POST['code']);
EventHandler::triggerEvent("amber.admin.menu_list_update_before");
for ($i = 0; $i < $count; $i++) { for ($i = 0; $i < $count; $i++) {
$_POST = array_map_deep('trim', $_POST); $_POST = array_map_deep('trim', $_POST);
if (preg_match('/^javascript/i', preg_replace('/[ ]{1,}|[\t]/', '', $_POST['me_link'][$i]))) { if (preg_match('/^javascript/i', preg_replace('/[ ]{1,}|[\t]/', '', $_POST['me_link'][$i]))) {
@ -70,6 +72,7 @@ for ($i = 0; $i < $count; $i++) {
me_use = '" . sql_real_escape_string(strip_tags($_POST['me_use'][$i])) . "', me_use = '" . sql_real_escape_string(strip_tags($_POST['me_use'][$i])) . "',
me_depth = '{$me_depth}', me_depth = '{$me_depth}',
me_parent = '{$me_parent}'"; me_parent = '{$me_parent}'";
sql_query($sql); sql_query($sql);
} }

View file

@ -16,11 +16,16 @@ class EventHandler
*/ */
protected static $gnuboardCompatibleList = [ protected static $gnuboardCompatibleList = [
// adm/editor_font.php // adm/editor_font.php
"amber.admin.editor_font_form_before" => "", // amber only "amber.admin.editor_font_form_before" => "",
"amber.admin.editor_font_form_after" => "", // amber only "amber.admin.editor_font_form_after" => "",
// adm/editor_font_update.php // adm/editor_font_update.php
"amber.admin.editor_font_update_before" => "", // amber only "amber.admin.editor_font_update_before" => "",
"amber.admin.editor_font_update_after" => "", // amber only "amber.admin.editor_font_update_after" => "",
// adm/emoticon_list_update.php
"amber.admin.emoticon_list_update_before" => "",
"amber.admin.emoticon_list_update_after" => "",
// adm/emoticon_list.php
"amber.admin.emoticon_list_after" => "",
// common.php // common.php
"gnuboard.loadlibs.after" => "", // amber only "gnuboard.loadlibs.after" => "", // amber only
"gnuboard.htmlprocess.before" => "common_header", "gnuboard.htmlprocess.before" => "common_header",
@ -63,6 +68,7 @@ class EventHandler
// adm/member_list_update.php // 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 // adm/menu_list_update.php
"amber.admin.menu_list_update_before" => "", // amber only
"gnuboard.admin.menu_list_update" => "admin_menu_list_update", "gnuboard.admin.menu_list_update" => "admin_menu_list_update",
// adm/theme_update.php // adm/theme_update.php
"gnuboard.admin.theme_update" => "adm_theme_update", "gnuboard.admin.theme_update" => "adm_theme_update",