Download the PHP package linkrobins/referral without Composer
On this page you can find all versions of the php package linkrobins/referral. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download linkrobins/referral
More information about linkrobins/referral
Files in linkrobins/referral
Package referral
Short Description Invite code referral system for Flarum 2.0.
License MIT
Homepage https://linkrobins.com/extensions/referral
Informations about the package referral
Link Robins Referral
An invite code referral system for Flarum 2.0. Each member gets a unique personal invite code they can share with others. New users enter the code during registration to be credited to the referrer. Admins can optionally require a code to register at all.
Features
- Members get a unique 8-character invite code, with admin-configurable eligibility rules (allowed groups, minimum posts, account age, whitelist)
- Share the code itself, a referral link that pre-fills it, or a QR code shown on screen and downloadable as a print-ready PNG
- New users enter the code during sign-up, or arrive with it pre-filled via the link or QR code
- Referral count badge appears on the member's profile nav tab and profile card
- Referrer receives a notification (alert and optional email) when someone registers with their code
- Admin campaign codes: standalone invite codes with labels, expiry dates, and use counts, each with its own QR code
- Admin setting to require an invite code for all new registrations
- Fully translatable via locale files
Screenshots
Referrals profile tab: shows the member's invite code and total referral count.
Sign-up modal: includes an optional (or required) Invite Code field.
Admin settings: toggle to require an invite code to register.
Requirements
- Flarum 2.0 or later
- PHP 8.3 or later
Installation
Install via Composer:
Then run migrations and clear the cache:
Enable the extension in the Flarum admin panel under Extensions.
Usage
For Members
- Go to your profile and click the Referrals tab
- Your personal invite code is displayed, with buttons to copy it, copy a referral link, or show a QR code (with a PNG download for print)
- When someone registers using your code, you receive a notification and your referral count increases
For New Users
- Click Sign Up
- Fill in your username, email, and password as normal
- Enter the invite code you received in the Invite Code field
- Complete registration
For Admins
- Go to Admin → Extensions → Link Robins Referral
- Toggle Require invite code to register to enforce invite-only registration
- When enabled, no one can register without a valid invite code
Translations
The extension ships with English (locale/en.yml). To add a translation:
-
Create a new file in the
locale/directory named after the ISO 639-1 language code, e.g.:ko.yml: Koreanzh.yml: Simplified Chinesees.yml: Spanish
-
Copy the contents of
en.ymland translate the values - No code changes needed; Flarum picks up locale files automatically
Example (es.yml)
Database
The extension creates two tables:
referral_invite_codes— stores each member's unique invite code and use countreferral_invited_user— records which user referred which
These are created automatically when the extension is enabled. They are safely removed when the extension is uninstalled.
Links
License
MIT License. See LICENSE for details.