pplulee/flarum-userip

Flarum 地理位置功能,由 @pplulee 修改

安装: 247

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 3

类型:flarum-extension

1.0.0 2024-01-11 20:47 UTC

This package is auto-updated.

Last update: 2024-09-11 22:23:11 UTC


README

仅显示城市和国家,由 pplulee 修改

安装

composer require pplulee/flarum-userip:"*"
php flarum migrate

更新

composer update pplulee/flarum-userip:"*"
php flarum cache:clear
php flarum migrate

移除

composer remove pplulee/flarum-userip
php flarum cache:clear

如何使用

你只需要在后台打开插件即可。 :)

特性

  • 支持使用 CDN 的网站
  • 简洁、详细、易懂的风格
  • 无错误(也许?)

扩展

如果你遵循以下步骤,你可以轻松地将此扩展扩展以支持不同的 API 提供商

  • 在你的新扩展中,需要 pplulee/flarum-userip 作为依赖项
  • 定义一个新的服务,实现 GBCLStudio\GeoIp\Api\GeoIpInterface
  • 在你的新扩展的 extend.php 中注册服务:new GBCLStudio\GeoIp\Extend\ApiProvider(MyNewService::class);
  • gbcl-userip 命名空间下提供所需的翻译,例如:gbcl-userip.admin.service.YOUR_NEW_EXTENSION.label,具体的翻译文本可以在以下链接找到:这里

注意

内建的 IP 域名 API 由 ip.sb 提供

参考以下项目的代码:fof/geoip, fof/oauth

afdian 爱发电 支持我的工作