2020-10-02 拾捌PX 个性主题模板 拾捌PX 个性主题模板 使用方法1.在本地解压,并将文件夹命名为 18px 。(请严格按照规范命名,主题中有一处使用到包含主题文件夹名称的路径,命名不规范可能导致静态资源加载失败)2.将整个文件夹上传到网站根目录下的 /usr/themes/ 目录。3.在后台 外观 中切换到 18px 主题。4.设置主题外观。模板下载18px-Typecho-Theme-master.zip 浅汐博客 2020-10-02 模板 207 阅读 0 评论 2020年10月02日 207 阅读 0 评论
2020-10-01 DPlayer视频播放插件 DPlayer视频播放插件 使用方式下载后将文件夹名改为DPlayer上传启用即可默认不自动播放,弹幕开启dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg"/ 关闭弹幕dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg" danmu="false"/ 开启自动播放dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg" autoplay="true"/ 添加额外弹幕源(例:bilibili弹幕)dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg" autoplay="true" addi... 浅汐博客 2020-10-01 插件 288 阅读 0 评论 2020年10月01日 288 阅读 0 评论
2020-07-15 自定义Title部分 自定义Title部分 自定义一下标题,以下为代码和参考案例:`<?php if($this->_currentPage>1) echo '第 '.$this->_currentPage.' 页 - '; ?> <?php $this->archiveTitle('', '', ' - '); ?><?php $this->options->title(); ?> <?php if($this->is('index')): ?> - 自定义关键词<?php endif; ?>` 浅汐博客 2020-07-15 代码 348 阅读 0 评论 2020年07月15日 348 阅读 0 评论
2020-07-15 文章字数统计 文章字数统计 在functions.php中写入代码: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)); echo mb_strlen($rs['text'], 'UTF-8'); } 在模板中调用:<?php echo art_count($this->cid); ?> 浅汐博客 2020-07-15 代码 390 阅读 0 评论 2020年07月15日 390 阅读 0 评论
2020-07-15 缩略图调用 img 字段 缩略图调用 img 字段 自动调用img字段内容,如果没有,去文章搜索第1个图片。<?php if (array_key_exists('img',unserialize($this->___fields()))): ?><?php $this->fields->img(); ?><?php else: ?><?php preg_match_all("/\<img.*?src\=(\'|\")(.*?)(\'|\")[^>]*>/i", $this->content, $matches); $imgCount = count($matches[0]); if($imgCount >= 1){ $img = $matches[2][0]; echo <<<Html {$img} Html; } ?><?php endif; ?> 浅汐博客 2020-07-15 代码 290 阅读 0 评论 2020年07月15日 290 阅读 0 评论
2020-03-16 Miyu双栏半透明自适应Typecho主题 Miyu双栏半透明自适应Typecho主题 功能简洁自适应自带了两种模式亮色模式与暗色模式自带了个归档插件 浅汐博客 2020-03-16 模板 516 阅读 0 评论 2020年03月16日 516 阅读 0 评论