gbcl/userip

Geolocation for Flarum

Installs: 752

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 0

Forks: 3

Open Issues: 2

Type:flarum-extension

1.0.4 2023-06-29 17:33 UTC

This package is auto-updated.

Last update: 2024-04-16 14:16:40 UTC


README

extiverse

Display the IP address of the posting below the post

ScreenShot

ss

Install

composer require gbcl/userip:"*"
php flarum migrate

Update

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

Remove

composer remove gbcl/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 gbcl/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 爱发电