Ok in Advanced forums I use the below code to call the online notification..... I want to use it else where on my site though.. how would i call this from a diffrent file?

print $online_icon;

Comments

michelle’s picture

Status: Active » Fixed

This is the code that creates the variable. You can adapt that to your needs however you like.

  // Online status
  $variables['last_active'] = format_interval(time() - $account->access);
  if (round((time()-$account->access)/60) < 15) {
    $variables['online_icon'] = theme('image', "$image_path/user-online.png", t('User is online'));
    $variables['online_status'] = t('Online');
  }
  else {
    $variables['online_icon'] = theme('image', "$image_path/user-offline.png", t('User offline. Last seen @time ago.', array('@time' => $variables['last_active'])));
    $variables['online_status'] = t('Offline');
  }
ShaunPatrick’s picture

Ya hmmmm tryed diffrent vairations cant get it to show for some reason. O well thanks for the help.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.