Hi!)
I have some troubles with user displaying links and this tables of referrals - but without of views integration. I seeking for and patch already exist in drupal.org, but not in stable version.

If you want to hide reflink and link to list of referrals in user page - add few strings of code to sites/all/modules/referral/referral.module
132 string - add to array this
2 => t('no display'),
than you can see next

function referral_settings() {
  $options = array(
    0 => t('User page'),
    1 => t('Referrals page'),
    2 => t('no display'),
  );

after that go to 399 string and after

if (variable_get(REFERRAL_DISPLAY_MODE, 0)) {
    $output .= '<div class="referral_link">';
    $output .= t('Your referral link: ');
    $output .= url('referral/'. _referral_uid2ref($user->uid), array('query' => NULL, 'fragment' => NULL, 'absolute' => TRUE));
    $output .= '</div>';
  }
   

we add
if (variable_get(REFERRAL_DISPLAY_MODE, 2)) {}

This code made radio checkbox in configure link of module User referral - and if you check "no display" - you can not see any referral form in user profiles.
--------------------------------
If you want to print referral link wherever you want -

<?php
global $user;
global $base_url;
$link = $base_url . "/referral/" . _referral_uid2ref($user->uid);
?>
<b>Your referrral link:</b><br>
<p><?php echo $link; ?></p>

And question: How to view referals in views? Views integration?
I have all views integraion without it)) HOW? By rules integration!)
(Create field "user reference" in user profile)
If user was registered by link of (some) registrant - set a value to field "user reference" in profile of newbie - "name of registrant". It created relation between registrant and referral - now you can use this in views without problems))
If you want that users can not see this field in his profile - you can install Field permissions module - and conficure pemissions "only visible for administrator"...
Thanks)

Comments

pringlz created an issue.