Skip to content

Commit

Permalink
Prepare 3.0.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
catscarlet committed Mar 17, 2019
1 parent 0d25e79 commit d2f25aa
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 28 deletions.
8 changes: 8 additions & 0 deletions Changelog_en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.0.0

Support IPIP.ent IPDB database. DATX database is no longer supported.

## 2.0.0

Actually there literally nothing changed since 1.0.0

## 1.0.0

Today I luckily found how to generate the url for querying IP-Geolocation on ipip.net. So this is the update for it.
Expand Down
62 changes: 36 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

**WP-IPIP** 是一款根据 IP 显示评论来源地址的插件。插件使用 IPIP.net 免费版数据库。

![wp-ipip snapshot](snap.png "wp-ipip snapshot, works with akisment and wp-useragent")

## 版本说明

- 0.1 版本支持 DAT 数据库
- 0.2 - 2.0.0 支持 DATAX 数据库
- 3.0.0 支持 IPDB 数据库

## 安装

### 手动安装
Expand All @@ -10,51 +18,43 @@

将文件复制到 WordPress 的插件目录下即可,文件应该在 `/wp-content/plugins/wp-ipip` 目录下。

项目文件结构
项目主要文件结构

```
Wordpress
└── wp-content
└── plugins
└── wp-ipip
├── 17mon
│   └── php
│   ├── 17monipdb.datx
│   ├── IP4datx.class.php
│   └── readme.txt
├── Changelog.md
├── Changelog_en.md
├── ipipdotnet
│   ├── ipdb-php
│   │   └── src
│   │   └── ipip
│   │   └── db
│   │   ├── City.php
│   │   └── Reader.php
│   └── ipipfree.ipdb
├── js
│   └── wp-ipip.js
├── README.md
├── wp-ipip-ipdbloader.php
├── wp-ipip-options.html
├── wp-ipip-options.php
└── wp-ipip.php
```

### IPIP数据库安装和更新

IPIP 数据库文件路径:`{插件路径}/17mon/php/17monipdb.datx`,直接用新的数据库覆盖此文件即可。插件包中目前自带一份中文版数据库。

你可以在IPIP的官网下载最新版的数据库:<https://www.ipip.net/download.html>
IPIP 数据库文件路径:`{插件路径}/ipipdotnet/ipipfree.ipdb`,直接用新的数据库覆盖此文件即可。插件包中目前自带一份中文版数据库。

**注意:根据 IPIP.net 2018 年 3 月 发布的数据库信息,未来的格式支持中不再支持 DAT 格式。**

**所以从 0.2.0 版本开始,插件将仅支持 DATX 版本的数据库。对于英文版和一些有特殊情况而使用 DAT 格式的用户,请继续使用 0.1.X 版本。**
你可以在 IPIP 的官网下载最新版的数据库:<https://www.ipip.net/download.html>

### 更新

插件未在 WordPress 上保存任何数据,建议更新时删除旧插件并上传新文件。

### 卸载

插件未在 WordPress 上保存任何数据,所以可以直接删除。

## 使用

插件启用后,将会在评论页面将会在 IP 下显示其物理地址。点击此链接可以打开 IPIP.net 上关于此 IP 的详细信息。

IPIP 免费版精度支持到地级市。

本插件不支持 IPIP 收费版数据库。
插件未在 WordPress 上保存任何数据,直接删除插件目录。

## 注意事项

Expand All @@ -70,15 +70,25 @@ IPIP 免费版精度支持到地级市。

### akisment

与 akisment 兼容
如果用户在评论时未填写网站,则插件产生的定位地址文字上会出现 akisment 原本用于移除 URL 的删除按钮,并且当鼠标悬浮在定位地址上时会出现对 IPIP.net 地址的预览。

此问题正在解决中。

### wp-useragent

与插件 wp-useragent 兼容
与插件 wp-useragent 兼容。

### 移动端

移动端未测试。

### 收费版

IPIP 收费版数据库未经测试。

## 链接

IPIP官方解析代码-PHP<https://github.com/17mon/php>
- IPIP, IPDB 格式官方解析代码<https://github.com/ipipdotnet/ipdb-php>

## License

Expand Down
Binary file added snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions wp-ipip.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/*
Plugin Name: WP-IPIP
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: 根据评论IP地址定位物理地址,使用IPIP.net数据库
Version: 1.0.0
Description: 根据评论 IP 地址定位物理地址,使用 IPIP.net 数据库
Version: 3.0.0
Author: 石樱灯笼
Author URI: https://www.catscarlet.com
*/
Expand Down

0 comments on commit d2f25aa

Please sign in to comment.