User IP

Geolocation for Flarum, modified by @pplulee

Compatible with Flarum v1.8.5

Latest release 1.0.0

221 downloads

released on Jan 11, 2024

Tags

User IP Location for Flarum

only display city and country, modified by pplulee

Install

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

Update

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

Remove

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

How to use

You just need to open the plugin in the background. :)

Feature

  • Support for websites using CDN
  • Concise, detailed, understandable style
  • No bugs (maybe?)

Extending

You can easily extend this extension to support different API providers, if you follow these steps:

  • In your new extension, require pplulee/flarum-userip as a dependency
  • Define a new Service that implements GBCLStudio\GeoIp\Api\GeoIpInterface
  • In your new extension's extend.php, register the service: new GBCLStudio\GeoIp\Extend\ApiProvider(MyNewService::class);
  • Provide the required translations under the gbcl-userip namespace, for example: gbcl-userip.admin.service.YOUR_NEW_EXTENSION.label, specific translations The text can be found at here

Note

Builtin IP domain API is provided by ip.sb

Referenced code from the following projects: fof/geoip, fof/oauth

Support my work at afdian 爱发电

© 2024 Hyn by Daniël "Luceos" Klabbers. All rights reserved. · Extensions and extension information is provided by the respective (copyright holding) authors. · Extiverse is not affiliated to the Flarum project or Flarum foundation. · Images on Extiverse pages are from Unsplash.