首页
留言板
统计
Search
1
阿里云国际OSS使用CloudFlare免流量
2,508 阅读
2
PP.UA免费域名注册
2,362 阅读
3
Adobe Photoshop CS2经典版 中文原版
2,338 阅读
4
7-Zip中文美化版
2,204 阅读
5
获取免费的 Microsoft 365 E5 开发人员订阅
2,085 阅读
软件分享
网络资源
网络代码
生活情感
免费主机
Search
标签搜索
工具软件
代码
Android
教程
Emlog
办公软件
图形图像
免费空间
Web
情感
PHP
视频
系统工具
Windows
上传下载
建站
PDF
网盘
Typecho
Office
ZJ
累计撰写
812
篇文章
累计收到
109
条评论
首页
栏目
软件分享
网络资源
网络代码
生活情感
免费主机
页面
留言板
统计
搜索到
812
篇与
的结果
2022-09-17
Typecho cdn缓存规则
缓存规则内容缓存时间/admin不缓存/index.php/archives不缓存.php;.jsp;.asp;.aspx不缓存.jpg;.jpeg;.png;.bmp;.gif;.psd;.ico;.tga;.imb;.tiff建议缓存7天.txt;.doc;.wri;.docs;.css;.js;.dot;.xml;.log;.bat;.csv;.htm;.html;.json;.md;.conf;.vue建议缓存7天注意事项在设置缓存内容/index.php/archives或/archives的时候要看一下后台永久链接文章路径设置了什么,我这里是/archives/{cid}.html,如果你那里是/blog/{cid}.html就把缓存内容改成/index.php/blog或/blog缓存时间可以根据自己实际情况来设置
2022年09月17日
43 阅读
0 评论
1 点赞
2022-09-16
免费半年通配符 SSL (支持 IP) 申请教程
官方脚本使用说明## IPv6 acme.sh --issue -d 2402:4e00:1a10:1500:0:9557:d561:34ed --webroot /home/wwwroot/ --server https://acme.hi.cn/directory ## IPV4 acme.sh --issue -d 1.2.3.4 --webroot /home/wwwroot/ --server https://acme.hi.cn/directory ## 通配符 acme.sh --issue -d \*.example.com -d example.com --dns dns_dp --server https://acme.hi.cn/directory说明不支持.ru、.by、.su 域名(DigiCert、Sectigo 对俄罗斯、白俄罗斯禁入)。受限于与 CA 合作的条款,以及我们的 EULA/TOS,禁止基于我们服务提供任何 GUI。IPv6 、.onion 有效期 90 天(CA 限制)。不支持除 acme.sh 之外的客户端! ACME.sh YYDS!部署## 安装 acme.sh curl https://get.acme.sh | sh -s
[email protected]
## 安装完成后切换到安装目录 cd ~/.acme.sh/ ## 以宝塔为例 ## 创建网站,设置域名为自己的IP地址/域名,复制站点目录(BT:/www/wwwroot/[你的IP/域名]) ./acme.sh --issue -d [你的IP] --webroot [你的网站目录] --server https://acme.hi.cn/directory ## 申请成功后,在 /root/.acme.sh/[你的IP/域名] 目录 可以看到 ## [你的IP/域名].cer ## [你的IP/域名].key ## ca.cer ## fullchain.cer ## 复制[你的IP/域名].key的内容到BT的 密钥(KEY) 文本框中 ## 复制[你的IP/域名].cer ca.cer到pem格式的 证书(PEM格式) 文本框中
2022年09月16日
40 阅读
0 评论
0 点赞
2022-09-16
每天60秒读懂世界
每天60秒读懂世界
2022年09月16日
403 阅读
0 评论
6 点赞
2022-09-15
Typecho的Joe主题新增文章阅读时长统计
1.修改functions.php文件,底部增加,文件路径:/usr/themes/Joe// 文章阅读时长设置 $onlineTime = new Typecho_Widget_Helper_Form_Element_Select( 'onlineTime', array( 'off' => '关闭(默认)', 'on' => '开启', ), 'on', '是否启用文章阅读时长统计', '介绍:开启后,文章底部展示文章字数,预计阅读时长和已阅读时长' ); $onlineTime->setAttribute('class', 'joe_content joe_custom'); //如果设置无法展示,请将joe_custom替换为joe_other $form->addInput($onlineTime->multiMode());2.修改article.php文件,文件路径:usr/themes/Joe/public①该段新增 <div class="contain" style="margin-bottom: 10px; <?php if(Helper::options()->onlineTime !== 'on') echo 'display:none;' ?>"> <blockquote id="onlineTime">本文共 <?php art_count($this->cid); ?> 个字数,平均阅读时长 ≈ <?php echo art_time($this->cid); ?>分钟</blockquote> </div> 2.该段新增,最底部 <?php //文章阅读时间统计 function art_time ($cid){ $db=Typecho_Db::get (); $rs=$db->fetchRow ($db->select ('table.contents.text')->from ('table.contents')->where ('table.contents.cid=?',$cid)->order ('table.contents.cid',Typecho_Db::SORT_ASC)->limit (1)); $text = preg_replace("/[^\x{4e00}-\x{9fa5}]/u", "", $rs['text']); $text_word = mb_strlen($text,'utf-8'); echo ceil($text_word / 400); } //文章字数统计 function art_count ($cid){ $db=Typecho_Db::get (); $rs=$db->fetchRow ($db->select ('table.contents.text')->from ('table.contents')->where ('table.contents.cid=?',$cid)->order ('table.contents.cid',Typecho_Db::SORT_ASC)->limit (1)); $text = preg_replace("/[^\x{4e00}-\x{9fa5}]/u", "", $rs['text']); echo mb_strlen($text,'UTF-8'); } ?> <script language="javascript"> var second=0; var minute=0; var hour=0; window.setTimeout("interval();",1000); function interval() { second++; if(second==60) { second=0;minute+=1; } if(minute==60) { minute=0;hour+=1; } var onlineTime = "您已阅读:" + hour + "时" + minute + "分" + second + "秒。"; var joe_message_content = "本文共 " + <?php art_count($this->cid); ?> + "个字数,平均阅读时长 ≈ " + <?php echo art_time($this->cid); ?> + "分钟,"; $('#onlineTime').text(joe_message_content + onlineTime); window.setTimeout("interval();", 1000); } </script>
2022年09月15日
68 阅读
0 评论
0 点赞
2022-09-15
Typecho的Joe主题实现侧边栏互动读者-展示活跃用户
1.修改aside.php文件,新增如下代码,文件路径:usr/themes/Joe/public<!--互动读者--> <?php if ($this->options->JactiveUsers === 'on') : ?> <section class="aside aside-hunter-authors"> <div class="joe_aside__item-title"> <svg t="1622460301541" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2712" width="200" height="200"><path d="M896 128H128a32 32 0 0 0-32 32v576a32 32 0 0 0 32 32h288v-64H160V192h704v512h-256c-8.832 0-16.832 3.584-22.656 9.376l-159.968 160 45.248 45.248L621.248 768H896a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32" fill="#181818" p-id="2713"></path><path d="M560 448a48 48 0 1 0-95.968-0.032A48 48 0 0 0 560 448M240 448a48 48 0 1 0 95.968 0.032A48 48 0 0 0 240 448M784 448a48 48 0 1 0-95.968-0.032A48 48 0 0 0 784 448" fill="#181818" p-id="2714"></path></svg> <span class="text">互动读者</span> <span class="line"></span> </div> <div class="hunter-cont"> <ul class="hunter-authors"> <?php $period = time() - 2592000; // 单位: 秒, 时间范围: 30天 $counts = Typecho_Db::get()->fetchAll(Typecho_Db::get() ->select('COUNT(author) AS cnt', 'author', 'max(url) url', 'max(authorId) authorId', 'max(mail) mail') ->from('table.comments') ->where('created > ?', $period) ->where('status = ?', 'approved') ->where('type = ?', 'comment') ->group('author') ->order('cnt', Typecho_Db::SORT_DESC) ->limit('4') ); foreach ($counts as $count) { $c_url = '<li><div class="item"><div class="hunter-avatar"><div class="vatar"><img src="' . _getAvatarUrlByMail($count['mail']) . '"></div></div><div class="item-main"><div><a target="_blank" href='. $count['url'] . '>' . $count['author'] . '</a>'; echo '' . $c_url . ''; autvip($count['mail']); $allpostnum = allpostnum($count['authorId']); echo ' <h4>评论 ' . $count['cnt'] . ' 次 | <i>'.$allpostnum.'</i>'; echo ' </h4></div></div></li>'; } ?> </ul> </div> </section> <?php endif; ?>2.修改core.php文件,底部新增,文件路径:usr/themes/Joe/core/** * 显示用户等级,按邮箱 */ function autvip($i){ $db=Typecho_Db::get(); $mail=$db->fetchAll($db->select(array('COUNT(cid)'=>'rbq'))->from('table.comments')->where('mail = ?', $i)/**->where('authorId = ?','0')**/); foreach ($mail as $sl){ $rbq=$sl['rbq'];} if($rbq<1){ echo '<span class="autlv aut-0">Lv.0</span>'; }elseif ($rbq<10 && $rbq>0) { echo '<span class="autlv aut-1">Lv.1</span>'; }elseif ($rbq<20 && $rbq>=10) { echo '<span class="autlv aut-2">Lv.2</span>'; }elseif ($rbq<40 && $rbq>=20) { echo '<span class="autlv aut-3">Lv.3</span>'; }elseif ($rbq<80 && $rbq>=40) { echo '<span class="autlv aut-4">Lv.4</span>'; }elseif ($rbq<100 && $rbq>=80) { echo '<span class="autlv aut-5">Lv.5</span>'; }elseif ($rbq>=100) { echo '<span class="autlv aut-6">Lv.6</span>'; } } /** *输出作者文章总数,可以指定 */ function allpostnum($id){ $db = Typecho_Db::get(); $postnum=$db->fetchRow($db->select(array('COUNT(authorId)'=>'allpostnum'))->from ('table.contents')->where ('table.contents.authorId=?',$id)->where('table.contents.type=?', 'post')); $postnum = $postnum['allpostnum']; if($postnum=='0') { return '暂无文章'; } else{ return '文章 '.$postnum.' 篇'; } } /* 通过邮箱生成头像地址 */ function _getAvatarUrlByMail($mail) { $gravatarsUrl = Helper::options()->JCustomAvatarSource ? Helper::options()->JCustomAvatarSource : 'https://gravatar.ihuan.me/avatar/'; $mailLower = strtolower($mail); $md5MailLower = md5($mailLower); $qqMail = str_replace('@qq.com', '', $mailLower); if (strstr($mailLower, "qq.com") && is_numeric($qqMail) && strlen($qqMail) < 11 && strlen($qqMail) > 4) { return 'https://thirdqq.qlogo.cn/g?b=qq&nk=' . $qqMail . '&s=100'; } else { return $gravatarsUrl . $md5MailLower . '?d=mm'; } }3.修改include.php文件,底部新增,代码路径:usr/themes/Joe/public<?php if ($this->options->JactiveUsers === 'on') : ?> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/custom.css'); ?>"> <?php endif; ?>4.新增custom.css文件,文件路径:usr/themes/Joe/assets/css.autlv { font-size: 10px; color: #fff; display: inline-block; vertical-align: text-top; font-weight: normal; border-radius: 2px; line-height: 1.4; padding: 0 4px; margin-left: 5px; letter-spacing: 0px; } .aut-0 { background: #d1d5dc; } .aut-1 { background: #448EF6; } .aut-2 { background: #f6b044; } .aut-3 { background: #c444f6; } .aut-4 { background: #f69644; } .aut-5 { background-image: -webkit-linear-gradient(0deg, #3ca5f6 0%, #a86af9 100%); } .aut-6 { background: #f64444; } .aside-hunter-authors { background: var(--background); margin-bottom: 15px; } .aside-hunter-authors .vs { border-radius: 100%; } .aside-hunter-authors ul { padding: 14px; list-style: none; line-height: 2.5; } .aside-hunter-authors .item { border-bottom: 1px dashed #eee; margin-bottom: 0px; position: relative; padding-bottom: 4px; } .aside-hunter-authors .item .hunter-avatar { float: left; line-height: 55px; } .aside-hunter-authors .item .hunter-avatar .vatar { position: relative; } .aside-hunter-authors .item .hunter-avatar .vatar img { width: 45px; border-radius: 100%; } .aside-hunter-authors .item .hunter-avatar .vatar .va_v_honor { position: absolute; bottom: 3px; right: 0px; width: 18px; height: 18px; } .aside-hunter-authors .item .item-main { min-height: 60px; margin-left: 60px; color: #393939; } .aside-hunter-authors .item .item-main h4 { font-size: 12px; line-height: 1; margin-bottom: 7px; font-weight: normal; color: #999; } .aside-hunter-authors .item .item-main h4 i { font-style: normal; color: #aaa; margin: 0 5px; }5.修改functions.php文件,底部新增,文件路径:usr/themes/Joe// 互动读者 $JactiveUsers = new Typecho_Widget_Helper_Form_Element_Select( 'JactiveUsers', array('off' => '关闭(默认)', 'on' => '开启'), 'off', '是否开启互动读者', '介绍:显示评论相关用户' ); $JactiveUsers->setAttribute('class', 'joe_content joe_custom'); // 如果后台无法展示该设置,将joe_custom修改为joe_other $form->addInput($JactiveUsers);
2022年09月15日
61 阅读
0 评论
0 点赞
2022-09-15
Typecho的Joe主题新增cnzz统计
1.修改footer.php,新增代码,文件路径:usr/themes/Joe/public第一段,在文件最上方添加 <?php if(Helper::options()->CnzzType !== 'off') { $CnzzIdSave = Helper::options()->CnzzId; $CnzzTypeStyle = Helper::options()->CnzzType; $CnzzTypeStyle = str_replace("CnzzId", $CnzzIdSave, $CnzzTypeStyle); } ?> 第二段添加在网站运行时间前面 <div class="item" style="margin: 10px; <?php if(Helper::options()->CnzzType == 'off') echo 'display:none;' ?>"> <span id='cnzz_stat_icon_<?php Helper::options()->CnzzType ?>'></span><script src='<?php echo $CnzzTypeStyle ?>' type='text/javascript'></script> </div>2.修改functions.php文件,新增代码,文件路径:/usr/themes/Joe$CnzzId = new Typecho_Widget_Helper_Form_Element_Text( 'CnzzId', NULL, NULL, 'cnzz站点ID', '介绍:填写此处用于展示cnzz统计,该地址进行申请 https://www.umeng.com/web' ); $CnzzId->setAttribute('class', 'joe_content joe_custom');// 如果后台无法展示设置,将joe_custom替换为joe_other $form->addInput($CnzzId->multiMode()); $CnzzType = new Typecho_Widget_Helper_Form_Element_Select( 'CnzzType', array( 'off' => '关闭(默认)', 'https://s4.cnzz.com/z_stat.php?id=CnzzId&web_id=CnzzId' => '文字形式', 'https://s4.cnzz.com/z_stat.php?id=CnzzId&show=pic' => '图片样式1', 'https://s4.cnzz.com/z_stat.php?id=CnzzId&show=pic1' => '图片样式2', 'https://s4.cnzz.com/z_stat.php?id=CnzzId&show=pic2' => '图片样式3', 'https://s4.cnzz.com/z_stat.php?id=CnzzId&online=2' => '在线人数', 'https://s4.cnzz.com/z_stat.php?id=CnzzId&online=1&show=line' => '横排数据显示', ), 'off', '选择cnzz样式', '介绍:开启时请填写cnzz站点ID' ); $CnzzType->setAttribute('class', 'joe_content joe_custom');// 如果后台无法展示设置,将joe_custom替换为joe_other $form->addInput($CnzzType->multiMode());
2022年09月15日
61 阅读
0 评论
1 点赞
2022-09-15
虚拟主机多站点配置代码
如果你只有一个虚拟主机,但是却想要建立多个站点,这时候该怎么办呢?下面就带着大家来解决这个问题第一步,在站点根目录建立一个index.html文件,将以下代码复制进去[code lang="js"] <script type="text/javascript"> if(this.location=="http://first.com/"){ this.location.href="first/index.php"; }else if(this.location=="http://second.com/"){ this.location.href="second/index.php"; } </script> [/code]这段代码根据你输入的网址,自动判断属于哪个网站,也就会自动打开对应的内容。建立两个目录,将两个网站分别放在不同的目录中。我这里建立的目录分别是first和second。
2022年09月15日
48 阅读
0 评论
0 点赞
2022-09-14
Joe 一款基于Typecho主题
一款基于Typecho博客的双栏极致优化主题Git仓库:https://github.com/HaoOuBa/Joe主题宗旨:简洁、超强、开源、精华主题简介:整包仅1.3Mb,却实现超强功能,极其迅速的响应(在开发时,都是使用30000篇文章进行开发测试)全站变量名、类名统一规范,重在方便更多人参与二开与拓展主题开箱即用,没有任何复杂的操作,无需像其他主题去特意创建个分类等。主题启用后,会置换Typecho的默认编辑器,采用 Joe 独家开发的编辑器主题响应式布局,不依赖任何响应式框架,采用 Joe 独家响应式主题在一切可能暴露的接口上,屏蔽sql注入、xss攻击风险,提供安全保障内置超强视频功能、包含直播功能、全网影视功能、文章内插入视频功能主题SEO极致优化,Lighthouse SEO跑分彪满100分主题色彩全局公用、小白轻松直接修改整站自定义主题色主题内置代码高亮、无需借助任何插件、支持200种语言主题首发极强画图回复功能,为你的博客带来用户互动,不再像传统博客那样,仅限文字主题内置sitemap、百度推送、友链、回复可见等,无需依赖任何插件主题开发开发时请使用 VSCode编辑器 ,编辑器插件:scss-to-css(根据官方文档进行下载依赖库) 和 minifycss代码由scss编译成.min.css文件js代码由minify压缩成.min.js文件主题目录介绍(非实时)├── assets 主题静态资源├── core 主题核心文件夹├── library 主题内集成第三方库├── public 共用的一些模块文件├── typecho│ ├── config 主题外观、功能设置的样式脚本目录│ └── write Joe编辑器目录├── 404.php 404页面├── archive.php 搜索页面├── friends.php 友情链接页面├── functions.php 主题的外观、功能设置├── index.php 博客首页页面├── leaving.php 留言板页面├── live.php 虎牙直播页面├── package.json 主题发布至NPM仓库使用(勿动)├── page.php 独立页面├── post.php 文章页面├── screenshot.php 主题截图图片├── video.php 全网影视页面└── wallpaper.php 壁纸页面
2022年09月14日
93 阅读
0 评论
1 点赞
1
...
15
16
17
...
102