Skip to content

FriendsOfFlarum/geoip

Repository files navigation

GeoIP by FriendsOfFlarum

License Latest Stable Version OpenCollective Donate

A Flarum extension.

Empower Your Flarum Moderators with GeoIP

Moderators play a crucial role in maintaining the health and quality of forums. With GeoIP, give them the geolocation tools they need to better understand users, make informed decisions, and maintain a safe environment. Only moderators have access to IP-based geolocation, ensuring user privacy and data security.

🌎 Key Features

  • Location Insights: Enable moderators to identify the country and region of users.
  • Interactive Mapping: Let moderators visualize user locations with an integrated map view.
  • Threat Detection: Equip moderators with the ability to highlight potentially malicious IP addresses through threat level indicators. (Via supported IP location data providers)

Screenshots

Redesigned meta info (visible to admins/mods)

image

Integration with session management (visible to own profile)

image

Information modal with location map

image

CLI Usage

The following CLI commands are provided:

lookup

Although IP addresses will be looked up when they are requested, this command will lookup all IP's that do not already have an entry in the ip_info table, using the currently selected provider.

php flarum fof:geoip:lookup

lookup --force

You may also force a refresh of IP data using the currently selected provider.

php flarum fof:geoip:lookup --force

Queue offloading

The IP lookup can be time consuming, so the lookup of an unknown IP address is dispatched in a job, if you have a queue running this will run on a worker thread, rather than the main thread.

All IP address lookup jobs are dispatched to the default queue by default. If you have multiple queues, you can specify which queue to use for these jobs in your extend.php:

FoF\GeoIP\Jobs\RetrieveIP::$onQueue = 'my-other-queue';

Installation

Install manually with composer:

composer require fof/geoip:"*"

Updating

composer update fof/geoip
php flarum cache:clear

Links

OpenCollective GitHub

An extension by FriendsOfFlarum.