下载表情包解压放在biaoqing文件夹
[hide]
[button color=" #2486b9" url="https://xbg.lanzouj.com/ixyIX03sk94f"]蓝奏云[/button]
[/hide]

教程

打开Shortcode.php在合适的位置添加如下代码

        $content = preg_replace_callback('/\:\$\(\s*(.*?)\s*\)/is',
            array('feature', 'parseNiangBiaoqingCallback'), $content);
        $content = preg_replace_callback('/\:\%\(\s*(.*?)\s*\)/is',
            array('feature', 'parseBilibiliBiaoqingCallback'), $content);

打开feature.php在合适的位置添加如下代码

    /**
     * 2233娘表情回调函数
     *
     * @return string
     */
    public static function parseNiangBiaoqingCallback($match): string
    {
        return '<img class="biaoqing niang" src="' . ('' . customcdn . 'owo/biaoqing/niang/') . str_replace('%', '', urlencode($match[1])) . '.png" >';
    }
    /**
     * 小电视表情回调函数
     *
     * @return string
     */
    public static function parseBilibiliBiaoqingCallback($match): string
    {
        return '<img class="biaoqing bilibili" src="' . ('' . customcdn . 'owo/biaoqing/bilibili/') . str_replace('%', '', urlencode($match[1])) . '.png" >';
    }

打开style.css在最底部添加如下代码

.OwO .biaoqing.niang {
    margin-bottom: -0.125rem;
    min-height: 3.5rem;
    height: 1em;
}
.OwO .biaoqing.bilibili {
    margin-bottom: -0.125rem;
    min-height: 2.5rem;
    height: 1em;
}
.comment_excerpt img.biaoqing.niang, .cross-excerpt img.biaoqing.niang {
  margin-bottom: -0.125rem;
  min-height: 3.5rem;
  height: 1em;
}
.comment_excerpt img.biaoqing.bilibili, .cross-excerpt img.biaoqing.bilibili {
  margin-bottom: -0.125rem;
  min-height: 3rem;
  height: 1em;
}

如果你的表情框溢出了可以在style.css添加以下代码

.OwO .OwO-body .OwO-bar {
  width: 100%;
  height: 30px;
  border-top: 2px solid #ddd;
  background: #fff;
  border-radius: 0 0 4px 4px;
  white-space: nowrap;
  overflow-y: hidden;
}

打开OwO.json在合适的位置添加如下代码:

    "2233娘": {
    "type": "image",
    "container": [
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E7ACACE4B880.png",
            "data": ":~(2233娘_第一)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_第一"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E697A0E8AFAD.png",
            "data": ":~(2233娘_无语)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_无语"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E59090E9AD82.png",
            "data": ":~(2233娘_吐魂)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_吐魂"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E5A794E5B188.png",
            "data": ":~(2233娘_委屈)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_委屈"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E593ADE6B3A3.png",
            "data": ":~(2233娘_哭泣)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_哭泣"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E98381E997B7.png",
            "data": ":~(2233娘_郁闷)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_郁闷"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E59BB0E68391.png",
            "data": ":~(2233娘_困惑)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_困惑"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E7949FE6B094.png",
            "data": ":~(2233娘_生气)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_生气"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E59083E6838A.png",
            "data": ":~(2233娘_吃惊)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_吃惊"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E6B197.png",
            "data": ":~(2233娘_汗)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_汗"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E5A4A7E7AC91.png",
            "data": ":~(2233娘_大笑)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_大笑"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E5969DE6B0B4.png",
            "data": ":~(2233娘_喝水)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_喝水"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E880B6.png",
            "data": ":~(2233娘_耶)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_耶"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E58D96E8908C.png",
            "data": ":~(2233娘_卖萌)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_卖萌"
        },
        {
            "icon": "/assets/owo/biaoqing/niang/2233E5A898_E79691E997AE.png",
            "data": ":~(2233娘_疑问)",/* 把~替换成$ */
            "css": "niang",
            "text": "2233娘_疑问"
        }
    ]
},
    "小电视": {
    "type": "image",
    "container": [
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E78B97.png",
            "data": ":~(tv_狗)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_狗"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E4BAB2E4BAB2.png",
            "data": ":~(tv_亲亲)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_亲亲"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E581B7E7AC91.png",
            "data": ":~(tv_偷笑)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_偷笑"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E5868DE8A781.png",
            "data": ":~(tv_再见)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_再见"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E586B7E6BCA0.png",
            "data": ":~(tv_冷漠)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_冷漠"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E58F91E68092.png",
            "data": ":~(tv_发怒)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_发怒"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E58F91E8B4A2.png",
            "data": ":~(tv_发财)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_发财"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E58FAFE788B1.png",
            "data": ":~(tv_可爱)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_可爱"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E59090E8A180.png",
            "data": ":~(tv_吐血)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_吐血"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E59186.png",
            "data": ":~(tv_呆)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_呆"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E59195E59090.png",
            "data": ":~(tv_呕吐)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_呕吐"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E59BB0.png",
            "data": ":~(tv_困)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_困"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E59D8FE7AC91.png",
            "data": ":~(tv_坏笑)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_坏笑"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E5A4A7E4BDAC.png",
            "data": ":~(tv_大佬)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_大佬"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E5A4A7E593AD.png",
            "data": ":~(tv_大哭)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_大哭"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E5A794E5B188.png",
            "data": ":~(tv_委屈)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_委屈"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E5AEB3E7BE9E.png",
            "data": ":~(tv_害羞)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_害羞"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E5B0B4E5B0AC.png",
            "data": ":~(tv_尴尬)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_尴尬"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E5BEAEE7AC91.png",
            "data": ":~(tv_微笑)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_微笑"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E6809DE88083.png",
            "data": ":~(tv_思考)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_思考"
        },
        {
            "icon": "/assets/owo/biaoqing/bilibili/tv_E6838AE59093.png",
            "data": ":~(tv_惊吓)",/* 把~替换成% */
            "css": "bilibili",
            "text": "tv_惊吓"
        }
    ]
},
Typecho Pigeon主题添加2233娘&小电视表情包

https://blog.sdgou.cc/archives/169.html

作者

白鸽

发布时间

2022-04-26

许可协议

CC BY-SA 4.0