Friends 1.x

Legacy documentation for Friends 1.x.

The Friends:Referral_Count loop is available to output website registration referral stats for any given member. See Referral Invite Form documentation for more information.

{exp:friends:referral_count} content {/exp:friends:referral_count}

Parameters

The following parameters are available for use:

member_id=

member_id="CURRENT_USER"

This parameter is necessary to view referral stats for a specific member. You can hardcode a member ID, pass it through an embed, grab it from the URI, or specify CURRENT_USER to display stats of the currently logged in user. Alternatively, you can use the username parameter.

username=

username="{segment_3}"

This parameter is necessary to view referral stats for a specific member. You can hardcode a username, pass it through an embed, grab it from the URI, or specify CURRENT_USER to display stats of the currently logged in user. Alternatively, you can use the member_id parameter.

Variables

The following variables are available for use:

friends_referral_count

{friends_referral_count}

This variables outputs the total number of successful website registration referrals the given user has.

Examples

The following code should be a complete example for displaying the total number of referrals the currently logged in user has:

Total Referrals:
{exp:friends:referral_count
    member_id="CURRENT_USER"
}
    {friends_referral_count}
{/exp:friends:referral_count}