Discord聊天室 样版
2019年5月22日
修订 9
核心指标
评分
5
↑ 5
↓ 0
支持率
100%
总票数 5
Wilson 95% 下界
56.6%
在相同票数下更稳健的支持率估计
争议指数
0.000
评分趋势
加载图表中...
最近修订
1 / 4
最近投票
1 / 1
页面源码
源码字符数 10568文字字数 5180
+ 例子
[[include component:discord-chat-source |inc-source= --] ]]
[[include component:discord-chat-source |inc-user= --]
|user-id=one
|username=GOTO 20
|usericon=https://scp-wiki.wdfiles.com/local--files/component:discord-chat/GOTO20.png
|usercolor=#ff5e56
]]
[[include component:discord-chat-source |inc-user= --]
|user-id=two
|username=corvas
|usericon=https://scp-wiki.wdfiles.com/local--files/component:discord-chat/corvas.png
|usercolor=#60b9dc
]]
[[include component:discord-chat-source |inc-start= --] ]]
[[include component:discord-chat-source |inc-msg-start= --]
|user-id=one
|username=GOTO 20
|msg-time=今日 4:28 PM
]]
哟,Corvus,在吗?[[image https://scp-wiki.wdfiles.com/local--files/component:discord-chat/smug.svg class="emoji inline"]]
[[include component:discord-chat-source |inc-msg-end= --] ]]
[[include component:discord-chat-source |inc-msg-start= --]
|user-id=two
|username=Corvas
|msg-time=今日 4:28 PM
]]
呀
咋啦[[span class="at_mention"]]@GOTO 20[[/span]]
[[image https://scp-wiki.wdfiles.com/local--files/component:discord-chat/smug.svg class="emoji alone"]]
[[include component:discord-chat-source |inc-msg-end= --] ]]
[[include component:discord-chat-source |inc-new-msgs= --] ]]
[[include component:discord-chat-source |inc-msg-start= --]
|user-id=one
|username=GOTO 20
|msg-time=今日 4:29 PM
]]
这有张图
[[image https://scp-wiki.wdfiles.com/local--files/component:discord-chat/noodle.jpg link="http://scp-wiki-cn.wikidot.com/scp-4378" class="msgimage"]]
[[include component:discord-chat-source |inc-msg-end= --] ]]
[[include component:discord-chat-source |inc-attch= --]
|attch-id=attch-one
|user-id=one
|username=GOTO 20
|msg-time=今日 4:30 PM
|attchname=mv_sk1r.tar.gz
|attchsize=2.71 KB
|attchlink=http://scp-wiki-cn.wikidot.com/scp-2105
]]
[[include component:discord-chat-source |inc-attch= --]
|attch-id=attch-two
|user-id=two
|username=corvas
|msg-time=今日 5:20 PM
|attchname=butts.zip
|attchsize=512 MB
|attchlink=http://scp-wiki-cn.wdfiles.com/scp-4205
]]
[[include component:discord-chat-source |inc-end= --] ]]
@@ @@
[[collapsible show="+ 点此查看以上实例的代码" hide="- 隐藏代码"]]
>
> {{[[@@include component:discord-chat-source |inc-source= --@@] ]]}}
>
> {{[[@@include component:discord-chat-source |inc-user= --@@]}}
> {{|user-id=one}}
> {{|username=GOTO 20}}
> {{|usericon=@@https://scp-wiki.wdfiles.com/local--files/component:discord-chat/GOTO20.png@@}}
> {{|usercolor=#ff5e56}}
> {{]]}}
>
> {{[[@@include component:discord-chat-source |inc-user= --@@]}}
> {{|user-id=two}}
> {{|username=Corvas}}
> {{|usericon=@@https://scp-wiki.wdfiles.com/local--files/component:discord-chat/corvas.png@@}}
> {{|usercolor=#60b9dc}}
> {{]]}}
>
> {{[[@@include component:discord-chat-source |inc-start= --@@] ]]}}
>
> {{[[@@include component:discord-chat-source |inc-msg-start= --@@]}}
> {{|user-id=one}}
> {{|username=GOTO 20}}
> {{|msg-time=今日 4:28 PM}}
> {{]]}}
> {{哟,Corvus,在吗?[[@@image https://scp-wiki.wdfiles.com/local--files/component:discord-chat/smug.svg class="emoji inline"@@]]}}
> {{[[@@include component:discord-chat-source |inc-msg-end= --@@] ]]}}
>
> {{[[@@include component:discord-chat-source |inc-msg-start= --@@]}}
> {{|user-id=two}}
> {{|username=Corvas}}
> {{|msg-time=今日 4:28 PM}}
> {{]]}}
> {{呀 }}
> {{咋啦 [[@@span class="at_mention"]]@GOTO 20[[/span@@]]}}
> {{[[@@image https://scp-wiki.wdfiles.com/local--files/component:discord-chat/smug.svg }}class="emoji alone"@@]]}}
> {{[[@@include component:discord-chat-source |inc-msg-end= --@@] ]]}}
>
> {{[[@@include component:discord-chat-source |inc-new-msgs= --@@] ]]}}
>
> {{[[@@include component:discord-chat-source |inc-msg-start= --@@]}}
> {{|user-id=one}}
> {{|username=GOTO 20}}
> {{|msg-time=今日 4:29 PM}}
> {{]]}}
> {{这有张图}}
> {{[[@@image https://scp-wiki.wdfiles.com/local--files/component:discord-chat/noodle.jpg link="http://scp-wiki-cn.wdfiles.com/scp-4378" class="msgimage"@@]]}}
> {{[[@@include component:discord-chat-source |inc-msg-end= --@@] ]]}}
>
> {{[[@@include component:discord-chat-source |inc-attch= --@@]}}
> {{|attch-id=attch-one}}
> {{|user-id=one}}
> {{|username=GOTO 20}}
> {{|msg-time=今日 4:30 PM}}
> {{|attchname=mv_sk1r.tar.gz}}
> {{|attchsize=2.71 KB}}
> {{|attchlink=@@http://scp-wiki-cn.wdfiles.com/scp-2105@@}}
> {{]]}}
>
> {{[[@@include component:discord-chat-source |inc-attch= --@@]}}
> {{|attch-id=attch-two}}
> {{|user-id=two}}
> {{|username=corvas}}
> {{|msg-time=今日 5:20 PM}}
> {{|attchname=butts.zip}}
> {{|attchsize=512 MB}}
> {{|attchlink=@@http://scp-wiki-cn.wdfiles.com/scp-4205@@}}
> {{]]}}
>
> {{[[@@include component:discord-chat-source |inc-end= --@@] ]]}}
>
[[/collapsible]]
+ **使用方法**
> **该样版是//相当//复杂的,所以请完整地阅读下面引导。**
[[div_ class="step_container"]]
++ **步骤 1:**引用源代码
**该步骤只需执行一次**
加这个引用到你代码的顶部:
> {{[[@@include component:discord-chat-source |inc-source= --]@@]]}}
[[/div]]
[[div_ class="step_container"]]
++ **步骤 2:**添加用户
**该步骤只需执行一次**
你如果想要添加特定用户,到discord版块里,请添加以下引用块:
> {{[[@@include component:discord-chat-source |inc-user= --]@@}}
> {{|user-id=}}
> {{|username=}}
> {{|usericon=}}
> {{|usercolor=}}
> {{]]}}
**每个特定用户都需要其专属的用户板**
[[div_ class="help"]]
> 开始引用用户板 ↦
>
> 用户唯一指定ID //(请**勿**使用符号、数字、空格)// ↦
>
> 用户名 //(可以重复)// ↦
>
> 用户头像地址 ↦
>
> 用户名的颜色 //(支持 hex, rgb, rgba, hsl)// ↦
>
> 结束引用用户板 ↦
>
> {{[[@@include@@ component:discord-chat-source |inc-user= --]}}
>
> {{|user-id=one}}
>
> {{|username=GOTO 20}}
>
> {{|usericon=GOTO20.png}}
>
> {{|usercolor=#ff5e56}}
>
> {{]]}}
>
[[/div]]
[[/div]]
[[div_ class="step_container"]]
++ **步骤 3:**开始弄discord版块
添加下面的代码,到你想要开始模拟在discord盖楼的地方:
> {{[[@@include component:discord-chat-source |inc-start= --] ]]@@}}
[[/div]]
[[div_ class="step_container"]]
++ **第四步:**添加消息和/或附件
一旦所有用户被引用,那就可以添加消息和附件了。
消息和附件不能共存在同一版块,它们永远是分开的(ie.显示帖子的用户名和头像。)//
+++ **步骤 4.1:**添加消息
添加以下引用块到每个用户的消息中:
> {{[[@@include component:discord-chat-source |inc-msg-start= --@@]}}
> {{|user-id=}}
> {{|username=}}
> {{|msg-time=}}
> {{]]}}
> {{**内容在此**}}
> {{[[@@include component:discord-chat-source |inc-msg-end= --]@@ ]]}}
[[div_ class="help"]]
> 开始引用消息板 ↦
>
> 专属用户唯一ID //(和之前设置的一样)// ↦
>
> 与专属ID相关联的用户名 ↦
>
> 发消息的时间 ↦
>
> 结束对消息板起始的引用 ↦
>
> 内容在此
> 允许使用所有的维基语法 ↦
>
> 结束消息板整个的引用 ↦
>
> {{[[@@include :scp-wiki:component:discord-chat-source |inc-msg-start= --@@]}}
>
> {{|user-id=one}}
>
> {{|username=GOTO 20}}
>
> {{|msg-time=今日 4:28 PM}}
>
> {{]]}}
>
> {{呀
> 咋啦}}
>
> {{[[@@include :scp-wiki:component:discord-chat-source |inc-msg-end= --]@@ ]]}}
>
[[/div]]
+++ **步骤 4.2:** 添加附件
添加以下引用块到每个附件之中:
> {{[[@@include component:discord-chat-source |inc-attch= --@@]}}
> {{|attch-id=}}
> {{|user-id=}}
> {{|username=}}
> {{|msg-time=}}
> {{|attchname=}}
> {{|attchsize=}}
> {{|attchlink=}}
> {{]]}}
[[div_ class="help"]]
> 开始引用附件板 ↦
>
> 附件唯一指定ID //(请**勿**使用符号、数字、空格)// ↦
>
> 发送附件的特定用户的ID //(和先前设置的一样)// ↦
>
> 与特定用户ID相关的用户名 ↦
>
> 发送时间 ↦
>
> 显示附件名称 ↦
>
> 显示附件大小 ↦
>
> 点击时所链接的附件地址 //(没有链接时则留空)// ↦
>
> 结束信息板的引用 ↦
>
> {{[[@@include :scp-wiki:component:discord-chat-source |inc-attch= --@@]}}
>
> {{|attch-id=attch-one}}
>
> {{|user-id=one}}
>
> {{|username=GOTO 20}}
>
> {{|msg-time=05/14/2019}}
>
> {{|attchname=mv_sk1r.tar.gz}}
>
> {{|attchsize=2.71\a0KB}}
>
> {{|attchlink=https://scp-wiki-cn.wdfiles.com/scp-2105}}
>
> {{]]}}
>
[[/div]]
[[/div]]
[[div_ class="step_container"]]
++ **步骤 5:**结束discord版块
添加以下代码,到你想要结束模拟在Discord盖楼的地方:
> {{[[@@include component:discord-chat-source |inc-end= --] ]]@@}}
[[/div]]
[[div_ class="step_container"]]
------
++ **可以重复步骤3-5,让同一用户聊天时盖多个Discord楼**
------
++ **可选项目**
+++ 我会添加更多可选项目,如果有人请求和/或我想到的话
++ 添加图片
这里是个在消息内,添加图片的示例“”
> {{[[@@include component:discord-chat-source |inc-msg-start= --@@]}}
> {{|user-id=one}}
> {{|username=GOTO 20}}
> {{|msg-time=昨天 1:28 AM}}
> {{]]}}
> {{这里是图片}}
> {{[[@@image noodle.jpg link="http://scp-wiki-cn.wdfiles.com" class="msgimage"@@]]}}
> {{[[include component:discord-chat-source |inc-msg-end= --] ]]}}
* **{{class="msgimage"}} 必须被添加到图像中,才能使其正常工作。**
* **{{link="url"}}**也可以添加这个,使图片内含链接,以在点击时跳转到其他地方
++ 添加表情符号
这里有两个消息内含有表情符号的例子:
> {{[[@@include component:discord-chat-source |inc-msg-start= --@@]}}
> {{|user-id=one}}
> {{|username=GOTO 20}}
> {{|msg-time=上个月 9:15 PM}}
> {{]]}}
> {{哟,Corvus,在吗?[[@@image smug.svg class="emoji inline"@@]]}}
> {{[[include component:discord-chat-source |inc-msg-end= --] ]]}}
>
> {{[[@@include component:discord-chat-source |inc-msg-start= --@@]}}
> {{|user-id=two}}
> {{|username=Corvas}}
> {{]]}}
> {{呀}}
> {{咋啦}}
> {{[[@@image smug.svg class="emoji alone"@@]]}}
> {{[[include component:discord-chat-source |inc-msg-end= --] ]]}}
就如你看到的一样,这里有两种表情符号:
* 并排的表情符号 -- 由 {{class="emoji inline"}} 生成
* 独列的表情符号 -- 由 {{class="emoji alone"}} 生成
这些不是自动生成的,因此在你想要使用表情符号时,必须添加这些class类到图片代码中。
++ 添加新消息分割线
将以下代码,添加到你希望新消息分割线出现的位置
> {{[[@@include component:discord-chat-source |inc-new-msgs= --] ]]@@}}
++ 添加 @提及 样式
为了作个 @提及 样式,只需要将 @(用户名) 包裹在下面代码之中:
> {{[[@@span class="at_mention"@@]]@用户名[[@@/span@@]]}}.
[[/div]]
[[div_ class="step_container"]]
++ **如果你有任何问题或想法,请自便,在维基上发信息给我** ([[*User Woedenaz]]) **,或者在Discord上联系我** (Woedenaz#1111).
[[/div]]
[[module css]]
@import url("https://cdn.jsdelivr.net/gh/Nu-SCPTheme/Black-Highlighter@gh-pages/css/min/normalize.min.css");
@import url("https://cdn.jsdelivr.net/gh/Nu-SCPTheme/Black-Highlighter@gh-pages/css/min/black-highlighter.min.css");
h1, h2 {
text-align: center;
}
.step_container {
margin: 0.5rem 0;
border: 1px solid #999;
padding: 1em;
}
.help {
display: flex;
align-content: stretch;
padding-top: 1em;
border-top: 1px dashed #999;
}
.help blockquote {
margin: 0;
font-size: 85%;
}
.help blockquote > p {
display: flex;
flex-wrap: wrap;
align-items: center;
align-content: center;
margin-right: 0;
min-height: 2rem;
margin: 0;
}
.help blockquote > p * {
margin: 0 0.1rem;
height: 100%;
}
.help blockquote:nth-of-type(1) {
width: 50%;
background: transparent;
border: unset;
box-shadow: unset;
text-align: right;
margin-right: 0;
padding: 0;
}
.help blockquote:nth-of-type(1) > p {
justify-content: flex-end;
}
.help blockquote:nth-of-type(2) {
margin-left: 1em;
width: 50%;
}
#page-content > .collapsible-block {
display: block;
text-align: center;
padding: 0.75em;
background-color: lightgrey;
border-top: 0.125rem dashed slategrey;
border-bottom: 0.125rem dashed slategrey;
}
#page-content > div.collapsible-block > div.collapsible-block-unfolded > div.collapsible-block-content {
text-align:left;
}
[[/module]]