首页
留言板
统计
Search
1
阿里云国际OSS使用CloudFlare免流量
2,042 阅读
2
Adobe Photoshop CS2经典版 中文原版
1,995 阅读
3
PP.UA免费域名注册
1,965 阅读
4
7-Zip中文美化版
1,946 阅读
5
获取免费的 Microsoft 365 E5 开发人员订阅
1,806 阅读
软件分享
网络资源
网络代码
生活情感
免费主机
Search
标签搜索
代码
工具软件
Android
教程
Emlog
办公软件
图形图像
免费空间
Web
情感
PHP
视频
Windows
系统工具
上传下载
建站
PDF
网盘
学习
Typecho
ZJ
累计撰写
792
篇文章
累计收到
104
条评论
首页
栏目
软件分享
网络资源
网络代码
生活情感
免费主机
页面
留言板
统计
搜索到
97
篇与
的结果
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=my@example.com ## 安装完成后切换到安装目录 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日
17 阅读
0 评论
0 点赞
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日
33 阅读
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日
31 阅读
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日
26 阅读
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日
27 阅读
0 评论
0 点赞
2022-09-14
emlog转typecho,完美转换(包括阅读浏览次数)
使用方法需要依赖 PHP-MySQLi-Database-Class需要php包含mysqli扩展在emlog2typecho.php开头处设置好require路径以及数据库相关配置运行emlog2typecho.phprequire_once 'MysqliDb.php'; $db_host = '127.0.0.1'; $db_port = 3306; $db_user = 'xxx'; $db_passwd = 'xxx'; $emlogDb = 'xxx'; $emlogPrefix = 'emlog_'; $typechoDb = 'xxx'; $typechoPrefix = 'typecho_';测试版本emlog5.3.1 > typecho1.2.0Github项目地址https://github.com/oyyq99999/emlog2typecho原版不支持阅读次数转换,修改后的emlog2typecho.php支持{cloud title="" type="lz" url="https://qpan.lanzouw.com/b08byd1mf" password="ddzy"/}
2022年09月14日
38 阅读
0 评论
1 点赞
2022-08-26
利用uniCloud搭建免费静态文件存储,阿里云CDN加速!
免费额度单个服务空间容量 10GB账号服务空间上限 50个阿里云CDN,不限量,不限速因为阿里云免费向DCloud提供了硬件资源,所以DCloud也没有向开发者收费。如果阿里云后续明确了收费计划,DCloud也会第一时间公布。官网地址https://dcloud.io/创建应用1)访问:https://unicloud.dcloud.net.cn/home 点击 创建服务空间选择服务商 阿里云服务空间名称 随意3)打开服务空间 – 前端网页托管 – 开通3)点击安装 uni-app(vue2)编译 和 uniCloud云开发5)找到 scss/sass编译 和 less编译,点开详情后,点击【使用HBuilderX导入插件】会调起编辑器安装插件7)在弹出框内,可以看见刚才新建的服务空间,直接点击关联即可。如果没有空间点击新建,按照指示一步一步操作即可8)点击 菜单 – 发行 – 【网站-PC】标题随意,选择服务空间,点击发行按钮10)打开网址即可上传图片了!
2022年08月26日
81 阅读
0 评论
0 点赞
2021-10-21
WP缓存加速插件WP Rocket 3.10.1免授权版
WP Rocket,知名的收费WordPress缓存插件,WP静态缓存优化插件,主要用于页面缓存、静态文件优化,缓存预加载、调整缓存规则等。其它WP缓存优化加速插件推荐:WPJAM Basi(水煮鱼招牌插件),WP Supre Cache(张戈的纯代码版),如果你的服务器是小宽带,建议还是动静分离、静态资源托管CDN。据WP-Rocket缓存插件官方测试,号称性能最高效WordPress动态缓存插件,通过优化JS, CSS静态文件,延迟加载图片、减少频繁加载达到优化速度目的,配置好插件,能让你的WordPress站点速度明显提升。
2021年10月21日
131 阅读
0 评论
0 点赞
1
2
3
...
13