惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
Jina AI
Jina AI
雷峰网
雷峰网
月光博客
月光博客
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
B
Blog RSS Feed
美团技术团队
C
CXSECURITY Database RSS Feed - CXSecurity.com
小众软件
小众软件
Security Latest
Security Latest
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
Last Week in AI
Last Week in AI
A
Arctic Wolf
Latest news
Latest news
Attack and Defense Labs
Attack and Defense Labs
I
Intezer
F
Fortinet All Blogs
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog
S
Secure Thoughts
Help Net Security
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
V
Visual Studio Blog
P
Proofpoint News Feed
博客园 - 【当耐特】
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
Stack Overflow Blog
Stack Overflow Blog
Know Your Adversary
Know Your Adversary
云风的 BLOG
云风的 BLOG
Hacker News: Ask HN
Hacker News: Ask HN
L
LINUX DO - 最新话题
H
Help Net Security
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tenable Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog

飞絮落叶雪 - 插件

Typecho 几个小插件分享 WordPress 新主题 Weisay Grace 您的邮箱被管理员屏蔽无法评论 typecho无法启用页面浏览次数统计插件(stat)的解决办法 wordpress用插件实现go链接跳转
添加UserAgent for typecho插件
Mr.He · 2016-10-26 · via 飞絮落叶雪 - 插件

添加UserAgent for typecho插件

223 字 约 1 分钟

不少同学的博客都有UserAgent,显示评论者的操作系统和浏览器,还能根据评论者的邮箱来区分博主,这个功能不错。
百度了一下,正好有同学为typecho制作了相关插件,下载地址,根据提示在commen.php添加:
<?php UserAgent_Plugin::render($this->agent);?>
却提示如下错误:
Fatal error: Using $this when not in object context in...
本人代码盲,百度了相关错误,说什么不支持this之类,不知道说了些什么,没有说具体怎么修改,无奈。
仔细看了一下上下文的相关代码,咱不会创造,但也会照猫画老虎,把this改成comments,居然成功了。
<?php UserAgent_Plugin::render($comments->agent);?>
具体效果看评论区,鼠标放在评论日期上会有惊喜哦!
真是瞎猫遇上了死老鼠,哈哈~