ress评论区添加个夸夸功能
发布时间:2025-11-04 05:18:25 作者:玩站小弟
我要评论
前言用夸夸功能替代传统的论区评论一言,将它们分开使用,添加先看看效果图,个夸再考虑使用不使用!夸功CSS代码css代码我已经打包好了,论区你们下载放到哪都行,添加只要你们知道路径,个夸或者把css代码拿出来放到你想放的夸功地方!Funcitons代码代码放到functions里方便,论区哪怕再更新也不怕代码该放到哪!添加老规矩评论拿代码,个夸拒绝白嫖!夸功下面这个链接是论区夸人的随机句子API,你们可以修改成你们的添加,也可以用我的个夸!https://www.xiunobbs.vip/api/sqapi.php?code=yiyan 下面的svg是图标需要图标库的链接<svg class="icon kuakua-icon" aria-hidden="true"><use xlink:href="#icon-kuakua"></use></svg> 图标库链接,如已经添加就需要更新!<script src="https://at.alicdn.com/t/font_2827587_zt5tfqudn5.js"></script> 这里只是指出,并不需要做什么,重要的还是下面那个functions代码!//夸夸功能 functionkuakua(){ echo<link rel="stylesheet" type="text/css" href="https://www.xiunobbs.vip/css/kuakua.css"> <a class="but btn-input-expand input-image mr6" id="kuakua" href="javascript:;"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-kuakua"></use></svg><span class="hide-sm">夸夸</span> </a> <div class="kuakua-div" style="width: 9999px;height: 99999px;background: #000;z-index: 1031;position: fixed;top: 0;left: 0;opacity: .6;display:none"></div> <div class="kuakua-first-box"> <div class="kuakua-ei"> <span class="kuakua-close" title="关闭"> <div> <svg fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="close" class="sc-eCImPb iRFNEp"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path d="M7.99 7.99L1 1l6.99 6.99L1 14.98l6.99-6.99zm0 0L15 15 7.99 7.99 14.98 1 7.99 7.99z" stroke="currentColor"></path></g></svg> </div> </span> <div> <div class="kuakua-column"> <section class="kuakua-headerIcon"><svg class="icon kuakua-icon" aria-hidden="true"> <use xlink:href="#icon-kuakua"></use></svg> </section> <span size="16" color="black4" class="kuakua-headerTitle">夸夸</span> </div> </div> <div style="position: relative;display: block;"> <div> <section class="kuakua-modal-body"> <section class="kuakua-contentBox"> <span size="18" color="black4" class="kuakua-comment">还有吗!没看够!</span> <button type="button" class="kuakua-cancelBtn">换一换</button> </section> <button type="button" class="kuakua-confirmBtn">夸夸TA</button> </section> </div> </div> </div> </div> <script> $(function(){ $(".kuakua-cancelBtn").click(function() { $.getJSON("https://www.xiunobbs.vip/api/sqapi.php?code=yiyan",function(data){ $(".kuakua-comment").html(data.text); $("#comment").text(data.text); }); }); }); $(".kuakua-confirmBtn").click(function() { $("#submit").trigger("click"); $(".kuakua-first-box").hide(150);//隐藏速度 $(".kuakua-div").hide(150);//隐藏速度 }); $("#kuakua").click(function (e) {// /*阻止冒泡事件*/ $(".kuakua-first-box").show(150);//显示速度 $(".kuakua-div").show(150);//显示速度 $.getJSON("https://www.xiunobbs.vip/api/sqapi.php?code=yiyan",function(data){ $(".kuakua-comment").html(data.text); $("#comment").text(data.text); }); e = window.event || e; if (e.stopPropagation) { e.stopPropagation(); } else { e.cancelBubble = true; } }); $(".kuakua-close").click(function () { $(".kuakua-first-box").hide(150);//隐藏速度 $(".kuakua-div").hide(150);//隐藏速度 $("#comment").text(""); }); </script>; } //夸夸功能 function kuakua(){ echo<link rel="stylesheet" type="text/css" href="https://www.xiunobbs.vip/css/kuakua.css"> <a class="but btn-input-expand input-image mr6" id="kuakua" href="javascript:;"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-kuakua"></use></svg><span class="hide-sm">夸夸</span> </a> <div class="kuakua-div" style="width: 9999px;height: 99999px;background: #000;z-index: 1031;position: fixed;top: 0;left: 0;opacity: .6;display:none"></div> <div class="kuakua-first-box"> <div class="kuakua-ei"> <span class="kuakua-close" title="关闭"> <div> <svg fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="close" class="sc-eCImPb iRFNEp"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path d="M7.99 7.99L1 1l6.99 6.99L1 14.98l6.99-6.99zm0 0L15 15 7.99 7.99 14.98 1 7.99 7.99z" stroke="currentColor"></path></g></svg> </div> </span> <div> <div class="kuakua-column"> <section class="kuakua-headerIcon"><svg class="icon kuakua-icon" aria-hidden="true"> <use xlink:href="#icon-kuakua"></use></svg> </section> <span size="16" color="black4" class="kuakua-headerTitle">夸夸</span> </div> </div> <div style="position: relative;display: block;"> <div> <section class="kuakua-modal-body"> <section class="kuakua-contentBox"> <span size="18" color="black4" class="kuakua-comment">还有吗!没看够!</span> <button type="button" class="kuakua-cancelBtn">换一换</button> </section> <button type="button" class="kuakua-confirmBtn">夸夸TA</button> </section> </div> </div> </div> </div> <script> $(function(){ $(".kuakua-cancelBtn").click(function() { $.getJSON("https://www.xiunobbs.vip/api/sqapi.php?code=yiyan",function(data){ $(".kuakua-comment").html(data.text); $("#comment").text(data.text); }); }); }); $(".kuakua-confirmBtn").click(function() { $("#submit").trigger("click"); $(".kuakua-first-box").hide(150);//隐藏速度 $(".kuakua-div").hide(150);//隐藏速度 }); $("#kuakua").click(function (e) {// /*阻止冒泡事件*/ $(".kuakua-first-box").show(150);//显示速度 $(".kuakua-div").show(150);//显示速度 $.getJSON("https://www.xiunobbs.vip/api/sqapi.php?code=yiyan",function(data){ $(".kuakua-comment").html(data.text); $("#comment").text(data.text); }); e = window.event || e; if (e.stopPropagation) { e.stopPropagation(); } else { e.cancelBubble = true; } }); $(".kuakua-close").click(function () { $(".kuakua-first-box").hide(150);//隐藏速度 $(".kuakua-div").hide(150);//隐藏速度 $("#comment").text(""); }); </script>; } //夸夸功能 function kuakua(){ echo<link rel="stylesheet" type="text/css" href="https://www.xiunobbs.vip/css/kuakua.css"> <a class="but btn-input-expand input-image mr6" id="kuakua" href="javascript:;"> <svg class="icon" aria-hidden="true"><use xlink:href="#icon-kuakua"></use></svg><span class="hide-sm">夸夸</span> </a> <div class="kuakua-div" style="width: 9999px;height: 99999px;background: #000;z-index: 1031;position: fixed;top: 0;left: 0;opacity: .6;display:none"></div> <div class="kuakua-first-box"> <div class="kuakua-ei"> <span class="kuakua-close" title="关闭"> <div> <svg fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="close" class="sc-eCImPb iRFNEp"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path d="M7.99 7.99L1 1l6.99 6.99L1 14.98l6.99-6.99zm0 0L15 15 7.99 7.99 14.98 1 7.99 7.99z" stroke="currentColor"></path></g></svg> </div> </span> <div> <div class="kuakua-column"> <section class="kuakua-headerIcon"><svg class="icon kuakua-icon" aria-hidden="true"> <use xlink:href="#icon-kuakua"></use></svg> </section> <span size="16" color="black4" class="kuakua-headerTitle">夸夸</span> </div> </div> <div style="position: relative;display: block;"> <div> <section class="kuakua-modal-body"> <section class="kuakua-contentBox"> <span size="18" color="black4" class="kuakua-comment">还有吗!没看够!</span> <button type="button" class="kuakua-cancelBtn">换一换</button> </section> <button type="button" class="kuakua-confirmBtn">夸夸TA</button> </section> </div> </div> </div> </div> <script> $(function(){ $(".kuakua-cancelBtn").click(function() { $.getJSON("https://www.xiunobbs.vip/api/sqapi.php?code=yiyan",function(data){ $(".kuakua-comment").html(data.text); $("#comment").text(data.text); }); }); }); $(".kuakua-confirmBtn").click(function() { $("#submit").trigger("click"); $(".kuakua-first-box").hide(150);//隐藏速度 $(".kuakua-div").hide(150);//隐藏速度 }); $("#kuakua").click(function (e) {// /*阻止冒泡事件*/ $(".kuakua-first-box").show(150);//显示速度 $(".kuakua-div").show(150);//显示速度 $.getJSON("https://www.xiunobbs.vip/api/sqapi.php?code=yiyan",function(data){ $(".kuakua-comment").html(data.text); $("#comment").text(data.text); }); e = window.event || e; if (e.stopPropagation) { e.stopPropagation(); } else { e.cancelBubble = true; } }); $(".kuakua-close").click(function () { $(".kuakua-first-box").hide(150);//隐藏速度 $(".kuakua-div").hide(150);//隐藏速度 $("#comment").text(""); }); </script>; }comments代码前面functions代码里已经添加代码了,这里只需要添加进comments文件里面即可!路径/wp-content/themes/zibll/template/comments.php里87行处添加代码 此处内容已隐藏,请付费后查看 内容看完了 WordPress评论区添加个夸夸功能此内容为付费阅读,请付费后查看 ¥5 登录购买 会员免费 极速下载 付费阅读 © 版权声明 1:本网站名称:蜡笔傻新2:本站永久网址:https://labishaxin.com/3:本站部分内容收集于互联网,如果有侵权内容、请联系我们删除,不妥之处,敬请谅解4:本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责5:本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报6:本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。

前言
用夸夸功能替代传统的论区评论一言,将它们分开使用,添加先看看效果图,个夸再考虑使用不使用!夸功


CSS代码
css代码我已经打包好了,论区你们下载放到哪都行,添加只要你们知道路径,个夸或者把css代码拿出来放到你想放的夸功地方 !
Funcitons代码
代码放到functions里方便,论区哪怕再更新也不怕代码该放到哪 !添加老规矩评论拿代码,个夸拒绝白嫖!夸功下面这个链接是论区夸人的随机句子API ,你们可以修改成你们的添加,也可以用我的个夸 !https://www.xiunobbs.vip/api/sqapi.php?code=yiyan 下面的svg是图标需要图标库的链接图标库链接,如已经添加就需要更新