Download & Extend

Add a checkbox in onlinestatus to add it to the profile page

Project:Onlinestatus Indicator
Version:4.7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

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.

#2

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

#3

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)

<?php
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;
}
?>

#4

Status:active» closed (fixed)