GithubHelp home page GithubHelp logo

mrtlyer / useragent-for-typecho Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hakula139/useragent-for-typecho

0.0 0.0 0.0 114 KB

Typecho 下显示评论 User Agent 的插件

License: GNU General Public License v3.0

PHP 100.00%

useragent-for-typecho's Introduction

UserAgent for Typecho

Typecho 插件,用于在评论区显示用户使用的操作系统、浏览器信息及对应图标。

使用说明

  1. 解压后修改文件夹名为 UserAgent,将插件上传至网站目录的 /usr/plugins
  2. 在 Typecho 后台「插件管理」处启用插件
  3. 在需要显示的地方插入以下代码:
<?php UserAgent_Plugin::render($comments->agent); ?>

TODO

  • 持续(按需)添加更多浏览器支持,冷门浏览器还是算了。

更新日志

  • v0.2 (2019/01/28)将 UA 识别方式本地化,移植了 Wordpress 插件的识别方法。
  • v0.1 (2019/01/27)第一个版本,尚处于测试阶段,请勿用于生产环境。

致谢

原项目

本项目基于 ennnnny 的项目 UserAgent for Typecho,在此感谢。

实际上原本我自己博客上使用的就是此插件,但有些地方不太满意,原作者似乎也不再更新了,于是我就打算自己动手丰衣足食,本项目因此诞生。

Wordpress 插件

WP-UserAgent

本项目实质就是将 Wordpress 平台的 UserAgent 插件移植到了 Typecho 平台,感谢原作者 Kyle Baker

Iconfont

Iconfont - 阿里巴巴矢量图标库

本项目操作系统、浏览器图标均使用 Iconfont 提供的 SVG 矢量图标,在此感谢。

问题反馈

由于本人实际只是代码初学者(甚至没学过 PHP 语言……),又是第一次使用 Github,很多地方都不太明白,还请大家多多指教。

除了在此提 Issue 外,也可以到我的个人博客留言,或者通过邮箱联系我。

希望本插件能帮助到有需要的博主。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.