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

推荐订阅源

Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
P
Proofpoint News Feed
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
The Last Watchdog
The Last Watchdog
F
Fortinet All Blogs
S
Schneier on Security
Help Net Security
Help Net Security
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
I
InfoQ
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
Stack Overflow Blog
Stack Overflow Blog
T
Troy Hunt's Blog
人人都是产品经理
人人都是产品经理
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cyber Attacks, Cyber Crime and Cyber Security
雷峰网
雷峰网
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
Forbes - Security
Forbes - Security
Vercel News
Vercel News
S
Security Affairs
美团技术团队
P
Privacy & Cybersecurity Law Blog
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Jina AI
Jina AI
Spread Privacy
Spread Privacy
Attack and Defense Labs
Attack and Defense Labs
IT之家
IT之家
U
Unit 42
Recorded Future
Recorded Future
W
WeLiveSecurity
PCI Perspectives
PCI Perspectives
P
Palo Alto Networks Blog
H
Hacker News: Front Page
S
Security @ Cisco Blogs
博客园 - 【当耐特】

飞絮落叶雪 - 插件

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);?>
具体效果看评论区,鼠标放在评论日期上会有惊喜哦!
真是瞎猫遇上了死老鼠,哈哈~