menu ZigZagK的博客
account_circle

正在努力加载中QAQ

自定义MDUI2333的评论表情框
apps Typecho
local_offer 查看标签
comment 6 条评论

吐槽

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

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

配置指南

图示

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

QAQTAB

目录结构

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

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

配置格式

纯文字

{
    "name":{
        "type":"text",
        "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协议 许可协议。转载请注明出处!
名称不能为空
email
邮箱不能为空,请填写正确格式
link
网址请用http://或https://开头
message
评论不能为空
资瓷Markdown和LaTeX数学公式
sentiment_very_satisfied
    2019-08-30 17:17:50ohmyga
    keyboard_arrow_down
    2019-08-30 17:17:50

    神 ZigZagK 神

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

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

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

        但功能比我的强多啦

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

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

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

      贴吧这里有了我就没加了

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

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

        remove_red_eye
        访客
keyboard_arrow_up