Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
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;
}
Comments
Comment #1
Ryanbach commentedAdd a checkbox in onlinestatus to add it to the profile page if one so desires.
Comment #2
Ryanbach commentedComment #3
xeniac commentedPlease 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)
Comment #4
xeniac commented