承接 linkrobins/referral 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

linkrobins/referral

Composer 安装命令:

composer require linkrobins/referral

包简介

Invite code referral system for Flarum 2.0.

README 文档

README

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

  • Every member automatically gets a unique 8-character invite code
  • Members share their code with anyone they want to invite
  • New users enter the code during sign-up — no URL tricks, no extra steps
  • Referral count badge appears on the member's profile nav tab and profile card
  • Referrer receives a notification when someone registers with their 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. image

Sign-up modal — includes an optional (or required) Invite Code field. image

Admin settings — toggle to require an invite code to register. image

Requirements

  • Flarum 2.0 or later
  • PHP 8.1 or later

Installation

Install via Composer:

composer require linkrobins/referral

Then run migrations and clear the cache:

php flarum migrate
php flarum cache:clear

Enable the extension in the Flarum admin panel under Extensions.

Usage

For Members

  1. Go to your profile and click the Referrals tab
  2. Your personal invite code is displayed — share it with anyone you want to invite
  3. When someone registers using your code, you receive a notification and your referral count increases

For New Users

  1. Click Sign Up
  2. Fill in your username, email, and password as normal
  3. Enter the invite code you received in the Invite Code field
  4. Complete registration

For Admins

  1. Go to Admin → Extensions → Link Robins Referral
  2. Toggle Require invite code to register to enforce invite-only registration
  3. When enabled, no one can register without a valid invite code

Translations

The extension ships with English (locale/en.yml). To add a translation:

  1. Create a new file in the locale/ directory named after the ISO 639-1 language code, e.g.:

    • ko.yml — Korean
    • zh.yml — Simplified Chinese
    • es.yml — Spanish
  2. Copy the contents of en.yml and translate the values

  3. No code changes needed — Flarum picks up locale files automatically

Example (es.yml)

linkrobins-referral:
  forum:
    profile:
      tab: Referencias
      invite_code_title: Tu Código de Invitación
      invite_code_help: Comparte este código con quien quieras invitar.
      copy: Copiar
      total_referrals: Total de Referencias
      no_referrals: "¡Aún no hay referencias. Comparte tu código para empezar!"
    sign_up:
      invite_code_label: Código de invitación
      invite_code_label_required: "Código de invitación *"
      invite_code_placeholder: ej. K7XM2QNP
    notification:
      user_referred: "{displayName} se registró usando tu código de invitación."
  admin:
    settings:
      require_label: Requerir código de invitación para registrarse
      require_help: Cuando está activado, los usuarios deben ingresar un código válido.
      enabled: Activado
      disabled: Desactivado
  validation:
    required: Se requiere un código de invitación para registrarse.
    invalid: Código de invitación inválido.

Database

The extension creates two tables:

  • referral_invite_codes — stores each member's unique invite code and use count
  • referral_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.

统计信息

  • 总下载量: 156
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固