The link is right here:
http://www.example.com/profile

It would be nice to be able to add it to the profile page, IMHO.

Comments

Ryanbach’s picture

Title: Add a checkbox to profile page to add onlinestatus to that » I meant:

Add a checkbox in onlinestatus to add it to the profile page if one so desires.

Ryanbach’s picture

Title: I meant: » Add a checkbox in onlinestatus to add it to the profile page
xeniac’s picture

Please try to describe your Featurerequest in more than one sentence.
Do you mean a checkbox to add onlinestatus to http://example.com/?q=profile ?
That's a nice idea, but not that easy. to show the user listing the profile module calls theme('profile_listing'), but this function doesn't have an hook for me to add my code.

As a Workaround 'profile_listing' is themeable so you could add this to your Theme (pushbutton for example)

function pushbutton_profile_listing($account, $fields = array()) {
  $output  = "<div class=\"profile\">\n";
  $output .= theme('user_picture', $account);
  $output .= ' <div class="name">'. theme('username', $account) ."</div>\n";

  foreach ($fields as $field) {
    if ($field->value) {
      $output .= " <div class=\"field\">$field->value</div>\n";
    }
  }

  // this is the Part for the Onlinestatus
  foreach(onlinestatus_get_messengers() as $messenger => $title) {
    if(empty($account->$messenger)) {
      continue;
    }
    $output .= theme('onlinestatus_indicator', $account, $messenger) . ' ';
  }
  // end of Patchwork
 
  $output .= "</div>\n";
  return $output;
}
xeniac’s picture

Status: Active » Closed (fixed)