Pigeon主题美化修改记录及typecho插件

Pigeon主题美化修改记录及typecho插件

云志 1417 字 · 4 分钟 23 0 1

美化修改记录

[collapse status="collapse-none" label="一、实现评论显示IP归属地【已适配ipv6】typecho应该均适用"]
本来博客用的腾讯位置服务,但是用上之后发现调用太慢,博客跟着慢。现在IP库均为本地调用的纯真和zxinc提供离线数据库,速度较快
1.将“IP归属地”上传至libs文件夹中,在functions.php上方引入

require_once("libs/ipdata.class.php");

2.在libs文件夹中的feature.php文件的最下方添加

/** 获取评论者归属地信息 */
function convertip($ip){  
    echo convertips($ip);
 }

3.找到comment文件夹的comment.php文件的52行左右,将

<?php echo feature::convertip($comments->ip); ?>

替换为

<?php echo convertip($comments->ip); ?>

4.如果没开cdn,教程到第三步就可以了,如果开了,就要在网站的根目录config.inc.php最下方插入

//绕过 CDN 代理IP获取客户真实IP地址
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$list = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $list[0];
}

本教程修改参考转载于 浩瀚资源  苏筱晴  ip离线地址库(备忘)  纯真ip库

下载链接:[button color=" red" url="https://yunzhi11233.lanzouy.com/icaAA0mjagng"]蓝凑云[/button]
[/collapse]

[collapse status="collapse-none" label="二、更改首页时间显示格式,由X天前改为日期形式"]
将themes/pigeon/libs/feature 中的//友好时间化//下的代码替换更改为

        public static function formatTime($time){
        $text = '';
        $time = intval($time);
        $ctime = time();
        $t = $ctime - $time;
        if ($t > 0) {
            return date('Y-m-d H:i', $time);
        }
    }

此教程参考转载于Vian
[/collapse]

[collapse status="collapse-none" label="三、更改评论日期格式,将X天前改为日期形式"]
将comment文件夹下的comment.php大约52行的

<span class="comment_time"><?php echo feature::formatTime($comments->created); ?></span>

替换为:

<span class="comment_time"><time class="date" datetime="<?php $comments->date('Y年m月d日 H:i'); ?>"><?php $comments->date('Y年m月d日 H:i'); ?></time></span>

[/collapse]

[collapse status="collapse-none" label="(补充修改)更改其他地方评论时间"]
post.php list.php文件
将

<time datetime="<?php $this->date('c'); ?>"><?php echo feature::formatTime($this->created); ?>

更改为

<time datetime="<?php $this->date('c'); ?>"><?php echo date('Y-m-d' , $this->created); ?>

\common\say.php文件
将

<div class="cross_right_time"><?php echo feature::formatTime($comments->created); ?></div>

更改为

<div class="cross_right_time"><?php echo date('Y-m-d H:i' , $comments->created); ?></div>

[/collapse]

[collapse status="collapse-none" label="四、更换博主认证图标"]
将comment文件下的comment.php文件的42行的

<span class="comment_admin"><i class="iconfont icon-safetycertificate-f"></i></span>

更换为:

<span class="comment_admin"> <span class="commentapprove" style="color: #ffffff;padding: 2px 4px;font-size: 12px;border-radius: 3px;background-color: #e61919;">博主</span>

[/collapse]

其他更改、美化(备忘)

[collapse status="collapse-none" label="一、评论区·的更改,颜色可换"]将comment文件下的comment.php大约53行的

<i class="text-primary">•</i>

更改为:

<font color="red">•</font>

[/collapse]

[collapse status="collapse-none" label="二、网站字体采用"]
本网站的字体采用“霞鹜文楷 GB”,源文件在➡LxgwWenkaiGB 也可以下载用本站的woff2格式➡蓝凑云下载
[/collapse]

本站使用插件合集:

一、Copyright 文章或独立页面尾部显示版权,下载链接➡蓝凑云下载

二、Mailer邮件评论提醒插件,本插件有三种模板,项目地址➡Mailer

三、SmartSpam智能评论过滤插件,下载链接➡蓝凑云下载

四、RobotsPlusPlus蜘蛛来访日志插件,记录蜘蛛爬行的时间及其网址,下载链接➡蓝凑云下载

五、Sitemap地图插件,下载链接➡蓝凑云下载

六、Typecho文章字数统计插件WordsCounter,下载链接➡蓝凑云下载
使用方法:文章字数统计,在你想要输出的地方加上

<?php $this->charactersNum(); ?>

全站字数统计,在你想要输出的地方加上

<?php WordsCounter_Plugin::allOfCharacters(); ?>

七、ShortLinks把外部链接转换为指定内部链接,下载链接➡蓝凑云

评论1

😊 😃 😄 😁 😆 😅 😂 🤣 🙂 🙃 😉 😇 😏 😌 😍 😘 😗 😙 😚 😋 😛 😜 😝 😒 😔 😖 😞 😟 😠 😡 😳 😨 😰 😥 😢 😭 😱 😲 😵 😷 🤒 🤕 🤢 😴 🤤 😪 😫 😬 😮 🤲 🤜 🤛 🤚 🤝 🙏 🤞 🤟 🤘 🤙 👌 👍 👎 ✊ 👊 👏 🙌 👐 💪 ❤️ 💔 ✨ 🔥 🎉 💯 🥺 😤 😎 🤡 👀 💥 ❌ ✅ 🤔 🤫 🤭 🤯 🤩 🥳 🫡 🫣 🤌 🤏 🫶 🫰 🙇 🧎 💘 💌 💝 💖 💜 💙 💚 🧡 🤍 🖤 🌹 🌸 ⭐ 🌟 🌙 ☀️ ⚡ 🌈 ❄️ 🎁 🎊 🎈
heart-blue heart-gold heart-green heart-pink heart-red
cool cry laugh smile surprise wink
  1. HerberteDumb
    HerberteDumb 俄罗斯 2025-10-20 06:13

    Good day.

    Want to get a powerful and fast increase in link mass? Our service is a comprehensive premium database run that provides predictable growth to DR 30+ in just one week.

    Why is this beneficial for you?

    — Instant Start: First links are visible within 30-60 minutes.

    — Predictable Growth: 1-2 processing cycles guarantee reaching DR 28-30.

    — Quality Links: We use only verified and quality donors.

    — Proven Cases: In our cases - 8,000+ links and 1,664+ referring domains in 48 hours.

    These are not just promises, it's a working tool. Want to see for yourself? Search for: "Drop Dead Studio Xrumer services" and see real testimonials and Ahrefs screenshots.

    Start growing today! Place an order and get a powerful boost for your site.

    The Drop Dead Studio Team