禁闭中'; } // 3. 商家状态显示 $timeers = time(); $merchant = db_find_one('merchant', array('uid' => $uid, 'status' => 2)); if (!empty($merchant) && $merchant['endtime'] > $timeers) { $html .= ' 商家'; } // 4. AI 机器人徽章动态注入 if (!isset($GLOBALS['chuan_ai_uids'])) { $GLOBALS['chuan_ai_uids'] = array(); $ai_setting = kv_get('chuan_ai_comment_setting'); if (!empty($ai_setting) && !empty($ai_setting['ais'])) { foreach ($ai_setting['ais'] as $ai) { if (!empty($ai['uid'])) { $GLOBALS['chuan_ai_uids'][intval($ai['uid'])] = TRUE; } } } } if (isset($GLOBALS['chuan_ai_uids'][intval($uid)])) { $html .= ' '; $html .= ''; $html .= ''; $html .= 'AI'; } // 5. Verified member badge (username nearby) logic $v_level = ($user_row && !empty($user_row['v'])) ? intval($user_row['v']) : 0; if ($v_level > 0) { $settings = setting_get('till_verified_member_setting'); if (!empty($settings)) { global $route, $thread; $show_badge = false; if ($route == 'index' || $route == 'forum') { $show_badge = !empty($settings['v_show_thread_list_inc_username_before']); } elseif ($route == 'user') { $show_badge = !empty($settings['v_show_user_profile_username_after']); } elseif ($route == 'my') { $show_badge = !empty($settings['v_show_my_common_username_after']); } elseif ($route == 'thread') { if (!empty($thread) && $uid == $thread['uid']) { $show_badge = !empty($settings['v_show_thread_username_before']) || !empty($settings['v_show_thread_user_username_after']); } else { $show_badge = !empty($settings['v_show_post_list_inc_username_after']); } } else { $show_badge = !empty($settings['v_show_header_nav_username_after']); } if ($show_badge) { if (!function_exists('v_show_badge')) { include_once _include(APP_PATH . 'plugin/Chuan_v_apply/model/v.func.php'); } if (function_exists('v_show_badge')) { $badge_html = v_show_badge($v_level, $user_row['v_title'], $settings); if (!empty($badge_html)) { $html .= ' ' . $badge_html; } } } } } // 6. 已佩戴勋章显示 $badge_on = function_exists('chuan_plugin_is_on') ? chuan_plugin_is_on('Chuan_badge') : is_file(APP_PATH.'plugin/Chuan_badge/conf.json'); if($badge_on) { if(!function_exists('chuan_badge_equipped_html') && is_file(APP_PATH.'plugin/Chuan_badge/model/chuan_badge.func.php')) { include_once _include(APP_PATH.'plugin/Chuan_badge/model/chuan_badge.func.php'); } if(function_exists('chuan_badge_equipped_html')) { $html .= chuan_badge_equipped_html($uid); } } return $html; } } ?>