clearlove2.1
1{
2 "name": "官方身份守卫",
3 "version": "1.0.0",
4 "author": "ClearLove",
5 "description": "使用指定昵称发帖时必须验证后台管理员账号,帖子显示自定义标识,防止冒充官方身份",
6 "requires": "2.0.0",
7 "config": [
8 {
9 "key": "nicknames",
10 "label": "专享昵称",
11 "type": "textarea",
12 "default": "官方,公告",
13 "help": "使用这些昵称发帖时需验证后台账号,多个用逗号或换行分隔"
14 },
15 {
16 "key": "badge",
17 "label": "帖子标识",
18 "type": "text",
19 "default": "官方",
20 "help": "验证通过的帖子在昵称后显示的徽章文字"
21 },
22 {
23 "key": "message",
24 "label": "失败提示",
25 "type": "text",
26 "default": "该昵称为官方专享,请验证管理员账号后发布"
27 }
28 ],
29 "hooks": [
30 {
31 "hook": "compose_guard",
32 "type": "guard",
33 "nicknames": "{config:nicknames}",
34 "require": "admin",
35 "label": "{config:badge}",
36 "message": "{config:message}"
37 },
38 {
39 "hook": "footer_html",
40 "type": "html",
41 "html": "<style>.post-badge{box-shadow:0 1px 6px rgba(255,123,169,.45)}</style>"
42 }
43 ]
44}