ZigZagK的博客
自定义MDUI2333的评论表情框
2019年7月22日 01:05
Typecho
查看标签

吐槽

由于网友的鞭策……我决定处理一下这个大坑……

本来想做个插件,发现根本没有教程……所以就使用了常规的Json版配置。

配置指南

图示

下面的某些参数所在位置可以在这张图上找:

QAQTAB

目录结构

|--MDUI2333
|  |--img
|     |--QAQ
|        |--QAQ.json
|        |--第一套表情
|        |--第二套表情
|        |--.....

其中QAQ.json是配置文件,然后若干个文件夹存着若干套表情。

配置格式

纯文字

{
    "name":{
        "type":"text",
        "title":"",
        "content":[
            {"text":"","tip":""},
            {"text":"","tip":""},
            ......
        ]
    }
}

紧密型纯文字(显示的时候更加紧密)

{
    "name":{
        "type":"textclose",
        "title":"",
        "content":[
            {"text":"","tip":""},
            {"text":"","tip":""},
            ......
        ]
    }
}

其中name是这套表情的名称(最好只使用英文数字并尽量短,用一些特殊字符可能会引起玄学问题),title是这套表情的标题(显示在表情框上方)。

content{"text":"","tip":""}表示一个表情,其中text表示表情的内容,tip表示鼠标悬浮时显示的文字(如上图中的“奥妙重重”)。

PS:实际上必要的只有text,所以最简可以写成{"text":""}

图片

{
    "name":{
        "type":"picture",
        "title":"",
        "width":"",
        "height":"",
        "content":[
            {"id":"","path":"","tip":"","width":"","height":""},
            {"id":"","path":"","tip":"","width":"","height":""},
            ......
        ]
    }
}

其中name是这套表情的名称以及文件夹名称(最好只使用英文数字并尽量短,用一些特殊字符可能会引起玄学问题),title是这套表情的标题(显示在表情框上方),width是这套表情的宽(px),height是这套表情的高(px)。

content{"id":"","path":"","tip":"","width":"","height":""}表示一个表情,其中id表示表情的编号(其实可以不用数字,用于表情解析),path表示表情的相对目录/img/QAQ/name/path),tip表示鼠标悬浮时显示的文字(如上图中的“奥妙重重”)。width表示表情的宽(优先于整套表情的width),height表示表情的高(优先于整套表情的height)。

PS:实际上必要的只有idpath,所以最简可以写成{"id":"","path":""}

表情解析指的是将:name+id:(+表示字符串相加)解析为图片路径,因此一旦确定了id不能随意更换

默认配置

目前MDUI2333自带了一套文字表情和三套图片表情,默认配置如下,可供参考:

UPD:新增了一部分QQ表情包QwQ

{
    "ywz":{
        "type":"text",
        "title":"OwO",
        "content":[
            {"text":"QwQ","tip":"QwQ"},
            {"text":"|´・w・)ノ","tip":"Hi"},
            {"text":"ヾ(≧∇≦*)ゝ","tip":"开心"},
            {"text":"(☆w☆)","tip":"星星眼"},
            {"text":"(╯‵□′)╯︵┴─┴","tip":"掀桌"},
            {"text":"┬─┬ ノ( ' - 'ノ)","tip":"放好桌子"},
            {"text":" ̄﹃ ̄","tip":"流口水"},
            {"text":"(/w\)","tip":"捂脸"},
            {"text":"୧(๑•̀⌄•́๑)૭","tip":"加油"},
            {"text":"⌇●﹏●⌇","tip":"吓死宝宝惹"},
            {"text":"(ฅ´w`ฅ)","tip":"已阅留爪"},
            {"text":"(╯°A°)╯︵○○○","tip":"去吧大师球"},
            {"text":"φ( ̄∇ ̄o)","tip":"太萌惹"},
            {"text":"(ó﹏ò。)","tip":"我受到了惊吓"},
            {"text":"Σ(っ °Д °;)っ","tip":"什么鬼"},
            {"text":"(。•ˇ‸ˇ•。)","tip":"哼"},
            {"text":"(⊙0⊙)","tip":"目瞪狗呆"}
        ]
    },
    "tieba":{
        "type":"picture",
        "title":"贴吧",
        "content":[
            {"id":"9","path":"9.png","tip":"滑天下之大稽"},
            {"id":"26","path":"26.png","tip":"我的滑稽会冒汗"},
            {"id":"1","path":"1.png","tip":""},
            {"id":"2","path":"2.png","tip":""},
            {"id":"3","path":"3.png","tip":""},
            {"id":"4","path":"4.png","tip":""},
            {"id":"5","path":"5.png","tip":""},
            {"id":"6","path":"6.png","tip":""},
            {"id":"7","path":"7.png","tip":""},
            {"id":"8","path":"8.png","tip":""},
            {"id":"10","path":"10.png","tip":""},
            {"id":"11","path":"11.png","tip":""},
            {"id":"12","path":"12.png","tip":""},
            {"id":"13","path":"13.png","tip":""},
            {"id":"14","path":"14.png","tip":""},
            {"id":"15","path":"15.png","tip":""},
            {"id":"16","path":"16.png","tip":""},
            {"id":"17","path":"17.png","tip":""},
            {"id":"18","path":"18.png","tip":""},
            {"id":"19","path":"19.png","tip":""},
            {"id":"20","path":"20.png","tip":""},
            {"id":"21","path":"21.png","tip":""},
            {"id":"22","path":"22.png","tip":""},
            {"id":"23","path":"23.png","tip":""},
            {"id":"24","path":"24.png","tip":""},
            {"id":"25","path":"25.png","tip":""}
        ]
    },
    "qq":{
        "type":"picture",
        "title":"QQ",
        "width":"35",
        "height":"35",
        "content":[
            {"id":"1","path":"1.gif","tip":""},
            {"id":"2","path":"2.gif","tip":""},
            {"id":"3","path":"3.gif","tip":""},
            {"id":"4","path":"4.gif","tip":""},
            {"id":"5","path":"5.gif","tip":""},
            {"id":"6","path":"6.gif","tip":""},
            {"id":"7","path":"7.gif","tip":""},
            {"id":"8","path":"8.gif","tip":""},
            {"id":"9","path":"9.gif","tip":""},
            {"id":"10","path":"10.gif","tip":""},
            {"id":"11","path":"11.gif","tip":""},
            {"id":"12","path":"12.gif","tip":""},
            {"id":"13","path":"13.gif","tip":""},
            {"id":"14","path":"14.gif","tip":""},
            {"id":"15","path":"15.gif","tip":""},
            {"id":"16","path":"16.gif","tip":""},
            {"id":"17","path":"17.gif","tip":""},
            {"id":"18","path":"18.gif","tip":""},
            {"id":"19","path":"19.gif","tip":""},
            {"id":"20","path":"20.gif","tip":""},
            {"id":"21","path":"21.gif","tip":""},
            {"id":"22","path":"22.gif","tip":""},
            {"id":"23","path":"23.gif","tip":""},
            {"id":"24","path":"24.gif","tip":""}
        ]
    },
    "orz":{
        "type":"picture",
        "title":"Orz",
        "content":[
            {"id":"1","path":"1.png","tip":"啥?"},
            {"id":"2","path":"2.png","tip":"恐惧"},
            {"id":"3","path":"3.png","tip":"倍感压力"},
            {"id":"4","path":"4.png","tip":"WHAT???"},
            {"id":"11","path":"11.png","tip":"无奈.jpg"},
            {"id":"16","path":"16.png","tip":"快吃药"},
            {"id":"5","path":"5.png","tip":"生无可恋.jpg"},
            {"id":"6","path":"6.gif","tip":"Orz"},
            {"id":"14","path":"14.png","tip":"没有"},
            {"id":"10","path":"10.png","tip":"向大佬低头"},
            {"id":"7","path":"7.png","tip":"递茶"},
            {"id":"12","path":"12.png","tip":"奥妙重重"},
            {"id":"8","path":"8.png","tip":"惊恐无比"},
            {"id":"9","path":"9.png","tip":"或许这就是大佬"},
            {"id":"13","path":"13.gif","tip":"以头抢桌尔"},
            {"id":"15","path":"15.png","tip":"一脸懵逼"}
        ]
    }
}

最后(广告)

总算填掉了一个大坑啦QAQ!大家快来用MDUI2333啊。

版权声明:本博客所有文章除特别声明外,均采用 CC BY 4.0 CN协议 许可协议。转载请注明出处!
请不要发毫无意义或内容不文明的评论。与本文无关评论请发留言板!
2019-08-30 17:17:50ohmyga
2019-08-30 17:17:50

神 ZigZagK 神 恐惧

访客
2019-08-30 19:13:11ZigZagK
2019-08-30 19:13:11
@ohmyga 

很多代码都是您那里搞来的呀

博主
2019-08-30 19:15:37ohmyga
2019-08-30 19:15:37
@ZigZagK 

惊恐无比 但功能比我的强多啦

访客
2019-07-24 12:46:15初夏阳光
2019-07-24 12:46:15

啊哈,舒服!不过QQ表情居然没有滑稽! 没有

访客
2019-07-24 12:49:09ZigZagK
2019-07-24 12:49:09
@初夏阳光 

贴吧这里有了我就没加了

博主
2019-07-24 12:54:23初夏阳光
2019-07-24 12:54:23
@ZigZagK 

不一样哒,QQ的滑稽跟贴吧滑稽味道不一样的 奥妙重重

访客