When I open affiliates/top_users there is nobody on list, just title "Top Affiliates".
There is already some users with some points, but i can't see them in top users/top affiliates list.

Comments

avpaderno’s picture

Title: Top users not show » Top users are not shown
Anonymous’s picture

Assigned: Unassigned »

It sounds like you need to run cron.php which compiles these lists.

If your installing this module for the first time would you please consider
providing feedback on how we could improve the README.txt which is currently under development

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/affiliates/...

Best, Paul

Anonymous’s picture

Status: Active » Closed (fixed)

Please reopen if you need assistance.

AlexanderPop’s picture

have same problem. Did everything like in readme file...
6.x-1.4
D6.10

taslett’s picture

I think this is actually the affiliates_cron never updating the summary data.
if (time() >= ($last_run + $interval)) {
$last_run is the last time cron ran.
$interval is top user refresh interval.
If you have cron running each hour and your interval is over an hour say 3hrs then time (now) is never going to be greater or equal.

Requires cron to be running at a more frequent rate than this value to really take effect.
Is incorrect unless I am missing something.

Instead of using 'cron_last' I created a new variable that saves when the affilaites_cron updated the summary.

function affiliates_cron() {
  $last_run = variable_get('cron_last_affilate', 0); //TA changed this
  $interval = variable_get(AFFILIATE_CRON_INTERVAL, 86400);

  if (time() >= ($last_run + $interval)) {
    // Refresh the top users data
    _create_summary_data(variable_get(AFFILIATE_TOP_USERS_COUNT_PAGE, 5));

    // Generate the page 
    _get_top_users_page();
    _get_top_climbers_page();

    // Generate the blocks
    _get_top_users_block('total');
    _get_top_users_block('period');
    _get_top_climbers_block();
    variable_set('cron_last_affilate', time()); //TA added this
  }
}
jepster_’s picture

Assigned: » Unassigned

#5 works for me, too. should be moved to the release.