首页
时间轴
留言
壁纸
统计
个人导航
友情链接
订阅&采集
执念图床
联系方式
Search
1
本站同款主题全量文件----持续更新
18,378 阅读
2
Typecho博客Joe主题实现友链自动检测
4,495 阅读
3
Typecho博客Joe主题实现打赏设置
4,427 阅读
4
执念采集系统使用教程——为网站添加采集功能
4,173 阅读
5
执念订阅系统使用教程---为自己网站加上订阅功能
3,618 阅读
个人感想
编程相关
网站优化
技术分享
精品源码
文章推广
登录
/
注册
Search
标签搜索
执念博客
原创
执念
zhinianblog
zhinianboke
zhinian
Typecho
Joe
资源
js
源码
插件
wordpress
java
宝塔面板
Typecho插件
青龙面板
主题
宝塔
技巧
执念博客
累计撰写
149
篇文章
累计收到
9,752
条评论
今日撰写
1
篇文章
首页
栏目
个人感想
编程相关
网站优化
技术分享
精品源码
文章推广
页面
时间轴
留言
壁纸
统计
个人导航
友情链接
用户登录
登录
注册
搜索到
12
篇与
Joe
的结果
2021-05-19
Typecho的Joe主题编辑器加入转载地址展示
0.成品图1.修改copyright.php文件,新增代码,文件路径:①第一段,新增,最上方 <?php $content = $this->content; $content = _parseReply($content); $isContain = 0; if(strpos($content, 'custom-copyright') !== false) { $isContain = 1; } ?> <style> .custom-copyright{ display: none; } </style> ②第二段,新增,中间 <div class="item custom-copyright"> <svg t="1622634042051" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9170" width="20" height="20"><path d="M512 1024C229.230021 1024 0 794.769979 0 512S229.230021 0 512 0s512 229.230021 512 512-229.230021 512-512 512z m248.300679-758.012243l-2.297023-2.297023c-52.932428-52.921694-139.621434-52.921694-192.554935 0L442.70504 386.411874c-52.932428 52.921694-52.932428 139.5946 0 192.516294l2.297023 2.297023c4.36327 4.361124 9.070021 8.379841 13.892696 12.054004l44.896067-44.88748c-5.28208-3.098834-10.219606-6.772998-14.697727-11.248973l-2.297024-2.297023c-28.704201-28.698834-28.704201-75.536637 0-104.236545l122.744755-122.718994c28.705275-28.699908 75.551665-28.699908 104.256939 0l2.297023 2.29595c28.705275 28.698834 28.705275 75.536637 0 104.235472l-55.459153 55.448419c9.64535 23.763455 14.238323 49.133753 13.778919 74.50405l85.886121-85.868947c52.932428-52.921694 52.932428-139.5946 0-192.516294zM578.882013 442.776956c-4.36327-4.362197-9.070021-8.380914-13.892696-12.054004l-44.894994 44.886406c5.281006 3.098834 10.218532 6.772998 14.696654 11.248973l2.297023 2.297023c28.704201 28.698834 28.704201 75.536637 0 104.236545L414.344319 716.110893c-28.705275 28.699908-75.551665 28.699908-104.25694 0l-2.297023-2.29595c-28.705275-28.698834-28.705275-75.536637 0-104.235471l55.574005-55.44842c-9.64535-23.763455-14.238323-49.133753-13.778919-74.50405l-85.886121 85.868948c-52.932428 52.921694-52.932428 139.5946 0 192.516293l2.297023 2.297023c52.932428 52.921694 139.621434 52.921694 192.554935 0l122.743681-122.720067c52.932428-52.921694 52.932428-139.5946 0-192.516293l-2.411874-2.297023z" fill="#F7A349" p-id="9171"></path></svg> <span class="custom-copyright-title">文章转载:</span> <span class="text"> <a class="link custom-copyright-href" href="" target="_blank" rel="noopener noreferrer"></a> </span> </div> ③第三段,新增,最下方 <script> var isContain = <?php echo $isContain ?>; if(isContain) { $('.custom-copyright').css({ 'display': 'block' }); var title = $('#custom-copyright').attr('data-title'); var href = $('#custom-copyright').attr('data-href'); $('.custom-copyright-title').text(title + ':'); $('.custom-copyright-href').text(href); $('.custom-copyright-href').attr('href', href); } </script>2.新建custom.js文件,将以下代码防在文件内,文件路径:usr/themes/Joe-master/assets/jsdocument.addEventListener('DOMContentLoaded', () => { var copyright = '<div class="cm-tools-item" title="版权"><svg t="1622610141615" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2895" width="20" height="20"><path d="M515.52 722.259c-109.945 0-199.476-89.467-199.476-199.476s89.467-199.475 199.476-199.475 199.475 89.466 199.475 199.475S625.465 722.26 515.52 722.26z m0-339.883c-77.435 0-140.407 62.972-140.407 140.471 0 77.435 62.972 140.408 140.407 140.408s140.407-62.973 140.407-140.408c0-77.499-62.972-140.47-140.407-140.47z m29.054 229.874h-18.687c-49.34 0-89.466-40.126-89.466-89.403 0-49.34 40.125-89.466 89.466-89.466h18.751c16.319 0 29.502 13.183 29.502 29.502s-13.183 29.502-29.502 29.502h-18.75c-16.768 0-30.399 13.631-30.399 30.462 0 16.767 13.631 30.398 30.398 30.398h18.751c16.319 0 29.502 13.184 29.502 29.503s-13.247 29.502-29.566 29.502z m-29.054 411.686c-4.16 0-8.32-0.896-12.223-2.688L302.22 929.606c-137.08-62.46-222.194-181.109-222.194-309.549v-434.66c0-8.832 3.968-17.152 10.751-22.783 6.784-5.632 15.743-7.872 24.383-6.208 26.11 5.12 52.924 7.68 79.739 7.68 88.634 0 175.093-28.67 237.297-78.587l64.764-52.03c10.815-8.703 26.174-8.703 36.926 0L598.65 85.5c62.204 49.98 148.662 78.587 237.297 78.587 26.814 0 53.628-2.56 79.739-7.68 8.64-1.728 17.599 0.576 24.382 6.208 6.784 5.631 10.752 13.951 10.752 22.782v434.661c0 128.44-85.115 247.089-222.195 309.549l-201.075 91.642c-3.712 1.792-7.871 2.688-12.031 2.688zM139.03 219.89v400.167c0 105.082 71.932 203.124 187.637 255.856l188.788 86.075 188.788-86.075C820.013 823.117 891.88 725.075 891.88 620.057V219.89a478.563 478.563 0 0 1-55.868 3.264c-103.29 0-200.692-32.51-274.287-91.642L515.52 94.33l-46.333 37.182c-73.532 59.068-170.934 91.642-274.223 91.642-18.751 0-37.438-1.088-55.933-3.264z" fill="" p-id="2896"></path></svg></div>'; $(".cm-tools").append(copyright); $(".cm-tools .cm-tools-item").click(function(){ if($(this).attr("title") == '版权') { var copyright_txt = '插入版权'; var copyright_body = '<div class="fitem"><label>版权名称</label><input autocomplete="off" name="copyright_title" placeholder="请输入版权名称"></div>'; copyright_body += '<div class="fitem"><label>版权地址</label><input autocomplete="off" name="copyright_url" placeholder="请输入版权地址"></div>'; $(".cm-modal__wrapper-header .cm-modal__wrapper-header--text").html(copyright_txt); $(".cm-modal__wrapper-bodyer").html(copyright_body); $('.cm-modal').addClass('active'); $(".cm-modal__wrapper-footer--confirm").attr('style', 'display: none'); $(".cm-modal__wrapper-footer").removeAttr('style'); var copyright_button = '<div class="cm-modal__wrapper-footer--confirm custom_button">确认</div>'; $('.custom_button').remove(); $(".cm-modal__wrapper-footer").append(copyright_button); $(".custom_button").click(function(){ var copyright_title = $( ".fitem input[name='copyright_title']").val(); var copyright_url = $( ".fitem input[name='copyright_url']").val(); var text= "<span><</span>div id='custom-copyright' data-title='" + copyright_title + "' data-href='" + copyright_url + "'><span><</span>/div>"; $(".cm-mainer .cm-scroller .cm-content").append('<br>!!!<br>'); $(".cm-mainer .cm-scroller .cm-content").append(text); $(".cm-mainer .cm-scroller .cm-content").append('<br>!!!<br>'); $('.cm-modal').removeClass('active'); }); } else { $(".cm-modal__wrapper-footer--confirm").removeAttr('style'); $('.custom_button').remove(); } }); });4.修改factory.php文件,新增以下代码,文件路径:usr/themes/Joe-master/core{tabs}{tabs-pane label="代码"}<script src="<?php Helper::options()->themeUrl('assets/js/custom.js?v=20210602') ?>" type="module"></script>{/tabs-pane}{tabs-pane label="代码位置图片"}{/tabs-pane}{/tabs}下载地址如下:隐藏内容,请前往内页查看详情
2021年05月19日
496 阅读
16 评论
5 点赞
2021-05-17
Typecho的Joe主题实现评论弹幕
0.成品图如下1.修改header文件,新增代码,;文件路径:usr/themes/Joe-master/public隐藏内容,请前往内页查看详情2.修改include.php文件,新增如下代码;文件路径:usr/themes/Joe-master/public<?php if ($this->options->JBarragerStatus === 'on') : ?> <link rel="stylesheet" href="<?php $this->options->themeUrl('library/joe.barrager/joe.barrager.css'); ?>"> <?php endif; ?>3.修改functions.php,最后添加;文件路径:usr/themes/Joe-master;如果无法显示设置,则将以下joe_custom修改为joe_other$JBarragerStatus = new Typecho_Widget_Helper_Form_Element_Select( 'JBarragerStatus', array('off' => '关闭(默认)', 'on' => '开启'), 'off', '是否开启弹幕功能(仅限PC)', '介绍:开启后,网站将会显示评论弹幕功能,该功能采用CSS动画引擎,并非传统JS操作DOM,无任何性能消耗。' ); $JBarragerStatus->setAttribute('class', 'joe_content joe_custom'); $form->addInput($JBarragerStatus->multiMode());4.将以下代码,放在usr/themes/Joe-master/library5.修改config.php文件,代码如下,文件路径:usr/themes/Joe-master/public{tabs}{tabs-pane label="代码"}/* 弹幕 */ DOCUMENT_BARRAGER: '<?php echo $this->options->JBarragerStatus === 'on' ? 'on' : 'off' ?>',{/tabs-pane}{tabs-pane label="代码截图"}{/tabs-pane}{/tabs}{cloud title="代码下载" type="bd" url="https://pan.baidu.com/s/1YSK2x33d92R98pGrCiykww" password="sazh"/}
2021年05月17日
818 阅读
90 评论
6 点赞
2021-05-15
Typecho博客Joe主题实现友链自动检测
0.效果图展示1.修改friends.php文件,文件路径:Joe-master/{message type="success" content="代码如下"/}隐藏内容,请前往内页查看详情2.修改functions.php文件,文件路径:Joe-master/{message type="success" content="代码如下"/}$JFriendsSwitch = new Typecho_Widget_Helper_Form_Element_Select( 'JFriendsSwitch', array('off' => '关闭(默认)', 'on' => '开启'), 'off', '是否开启友链检测功能', '介绍:开启后友链界面可以自动检测对方站点是否添加本站友链' ); $JFriendsSwitch->setAttribute('class', 'joe_content joe_other'); $form->addInput($JFriendsSwitch->multiMode()); 注意下面是修改,不是新增 $JFriends = new Typecho_Widget_Helper_Form_Element_Textarea( 'JFriends', NULL, 'Joe的博客 || https://78.al || https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/link.png || Eternity is not a distance but a decision || 友链页面地址(可不填写)', '友情链接(非必填)', '介绍:用于填写友情链接 <br /> 注意:您需要先增加友联链接页面(新增独立页面-右侧模板选择友联),该项才会生效 <br /> 格式:博客名称 || 博客地址 || 博客头像 || 博客简介 || 友链页面地址 <br /> 其他:一行一个,一行代表一个友联' ); $JFriends->setAttribute('class', 'joe_content joe_other'); $form->addInput($JFriends);3.在主题中开启此功能后,需要在友链配置最后增加一个友链界面的链接,如果没有友链页面可不添加,如图所示4.如何操作,自行摸索吧,如果有疑问可在本文章评论5.全量文件下载地址如下:隐藏内容,请前往内页查看详情
2021年05月15日
4,495 阅读
215 评论
25 点赞
2021-05-12
Typecho博客Joe主题实现打赏设置
0.成品图展示1.新增一个php文件,用于以后新增自定义设置,文件名:custom.php;文件路径:usr/themes/Joe-master/public{message type="success" content="代码如下"/}隐藏内容,请前往内页查看详情2.修改handle.php文件,底部新增代码,放在最后一行上面,文件路径:usr/themes/Joe-master/public{message type="success" content="代码如下"/}<style> /*弹出*/ .footer_flex { width: 42px; height: 42px; background-color: #f56c6c; border-radius: 50%; cursor: pointer; position: relative; z-index: 10; display: flex; justify-content: center; align-items: center; color:#909399; font-size:12px} .footer_flex:hover { background-color: #409eff; } /*top*/ .footer_flex:hover .flex-footer { display: block; } .footer_flex .flex-footer { box-shadow: 0px 0px 5px 0px #409eff; border-radius: 8px; width: 156px; height: 166px; position: absolute; left: -52px; top: -175px; text-align: center; padding-top: 15px; background: #fff; display: none; } .flex-footer input{vertical-align:middle; margin-bottom:3px; *margin-bottom:3px;} </style> <script language="javascript" type="text/javascript"> function zfb(){ var obj=document.getElementById("ewm"); obj.src=`<?php $this->options->ZNAlipay() ?>`; }; function wx(){ var obj=document.getElementById("ewm"); obj.src=`<?php $this->options->ZNWeChat() ?>`; }; function qq(){ var obj=document.getElementById("ewm"); obj.src=`<?php $this->options->ZNQqPay() ?>`; }; </script> <div style="text-align: center; margin-left:30px; <?php if(Helper::options()->ZNPaySet !== 'on') echo 'display:none;' ?>"> <div class="footer_flex"> <img src="https://cdn.jsdelivr.net/gh/aill66/cdn/shang.png" width="20px" height="20px"> <div class="flex-footer"> <img id="ewm" src="<?php $this->options->ZNAlipay() ?>" width="120px" height="120px"> <div style="margin-top:5px;"> <label><input name="pay" type="radio" value="wx" checked="checked" onclick="wx()">微信</label> <label style="margin-left:3px; display:block-inline"><input name="pay" type="radio" value="zfb" onclick="zfb()" checked>支付宝</label> <label style="margin-left:3px;"><input name="pay" type="radio" value="qq" onclick="qq()">QQ</label> </div> <div style="height:40px; background:rgba(0,0,0,0);"></div> </div> </div> <p style="margin-top:5px; color:#909399; font-size:12px">打赏</p> </div>3.修改functions.php文件,加入打赏设置菜单和底部引入新建的php文件,文件路径:usr/themes/Joe-master{message type="success" content="代码如下"/}<li class="item" data-current="joe_custom">自定义设置</li> // 收款设置 require_once("public/custom.php");4.为打赏按钮增加跳动特效,将以下代码放在主题的全局设置-自定义CSS里面.footer_flex { animation: star 0.5s ease-in-out infinite alternate; } @keyframes star { from { transform: scale(1); } to { transform: scale(1.1); } }
2021年05月12日
4,427 阅读
304 评论
46 点赞
1
2