;; =============
;; MISC SETTINGS
;; =============

[global]

; if a notification is to be sent out to the staff if someone signed up but was not referred by anyone in any way
notify_if_join_but_no_referral=0

; if the referrer field at signup is visible (as opposed to hidden, relying on cookies/URL referrer)
visible_referrer_field=1

; Track referrals using cookies; this might have legal issues in the EU
referrer_cookies=1

;; ==================
;; PARTICULAR SCHEMES
;; ==================

[standard_scheme]

; The title will be included in messaging to the user and also the admin
title=Referral scheme

; Whether to notify of MISSED referrals
notify_if_non_qualified=0
notify_staff_if_non_qualified=1

;; ---------------------
;; REFERRAL BONUS LEVELS
;; ---------------------

; level_<number> - Add settings like this to define levels that can be reached (as per example). At each level a staff notification is dispatched saying the referrer has reached the level
;  a staff notification will be sent once a level is reached, also any configured referral hooks will be executed (none are supplied by default)
level_5=Bronze referral
level_10=Silver referral
level_25=Gold referral

;; ----------------------
;; REFERRAL QUALIFICATION
;; ----------------------

; Referrals can be made by:
;  a) typing in a username at signup
;  b) automatic via crafted URLs (generated by the recommendation form, or manually)
;  c) automatic when it's observed that someone was recommended and then signed up
; But a referral is not necessarily "qualified". Only qualified referrals count to the achievement of the bonus levels.
; Different notifications are sent to the staff and to the referrer as each referral are made, and progress tallies of referrals made are included in these.
;  Notification to staff of qualified referral
;  Notification to staff of qualified referral, with bonus level reached
;  Notification to staff of unqualified referral
;  Notification to referrer of qualified referral
;  Notification to referrer of unqualified referral

; if joining triggers a qualified referral (default 0)
referral_trigger__join=1

; if buying a usergroup subscription triggers a qualified referral (default 0)
referral_trigger__usergroup_subscribe=0

; if buying any item from the shopping catalogue triggers a qualified referral (default 0)
referral_trigger__misc_purchase=0
; or some specific item number (e.g. product #4)
referral_trigger__purchase_4=1

; Whether to restrict a particular referee to only being able to provide on referral, no matter how many qualifying actions they make
one_trigger_per_referee=1

;; ----------------------
;; REFERRER QUALIFICATION
;; ----------------------

; If a referrer is not themselves qualified to be in the referral system, no notifications will be sent out as their referrals come in.
; If they later become a qualified referrer, the referrals count retroactively from the point of the next referral happening.

; Can be 'AND' or 'OR'. If 'AND' then all rules must pass
referrer_qualification_logic=OR

; add settings like this to define what usergroup IDs qualify a referrer. Below we have configured everyone in the default rank set to qualify.
referrer_qualified_for__primary_group_4=1
referrer_qualified_for__primary_group_5=1
referrer_qualified_for__primary_group_6=1
referrer_qualified_for__primary_group_7=1
referrer_qualified_for__primary_group_8=1
referrer_qualified_for__primary_group_9=1
; also staff
referrer_qualified_for__primary_group_2=1
referrer_qualified_for__primary_group_3=1
; We could use referrer_qualified_for__group_X if not just for primary groups, but this makes the case of being in multiple schemes possible, leading to possible confusion

; if buying any item from the shopping catalogue triggers a referrer to be qualified (default 0)
referrer_qualified_for__misc_purchase=1
; or some specific item number (e.g. product #4)
referrer_qualified_for__purchase_4=1

; If you just want everyone to be a qualified referrer (default 0)
referrer_qualified_for__all=0


; If you wish to customised the language strings of notifications for a particular scheme, add a new language string with a "__<scheme_name>" suffix (e.g. "__standard_scheme").
; If you have intentionally not defined any award levels you'll want to customise the language strings to remove references to them.
