');
$output .= t('
');
if ($user_information['icon'] != '') {
$image_path = origo_home_get_service_dir('pictures') . $username .'/200_'. $user_information['icon'];
}
else {
$image_path = base_path() . drupal_get_path('module', 'origo_home') .'/img/user_m_big.png"';
}
// user icon
$output .= t('
');
if ($is_self) {
$output .= t('
') . l('[Edit User Icon]', 'users/'. $username .'/edit_user_icon') . t('
');
}
$output .= t('
');
// add from $hookfields[$category='Picture'][$key]
if (is_array($hookfields['Picture'])) {
foreach ($hookfields['Picture'] as $key => $item) {
$output .= $item;
}
}
// Settings
if ($is_self) {
$output .= t('');
$output .= t('
');
$output .= t('
') . l('[Edit Privacy Settings]', 'users/'. $username .'/additional_settings') . t('
');
$output .= t('
');
}
// print projects
if (sizeof($projects) > 0) {
$output .= t('');
$output .= t('
');
foreach ($projects as $project) {
$project_name = _crop_line($project['project_name'], 22, "...");
$output .= t('
');
$output .= l($project_name, get_origo_project_link($project['project_name']));
$output .= t('
');
}
$output .= t('
');
}
// print bookmarks
if (sizeof($bookmarks) > 0) {
$output .= t('');
$output .= t('
');
foreach ($bookmarks as $bookmark) {
$bookmark_name = _crop_line($bookmark['name'], 22, "...");
$output .= t('
');
$output .= l($bookmark_name, get_origo_project_link($bookmark['name']));
$output .= t('
');
}
$output .= t('
');
}
// print communities
if (sizeof($communities) > 0) {
$output .= t('');
$output .= t('
');
foreach ($communities as $community) {
$community_name = _crop_line($community['name'], 22, "...");
$output .= t('
');
$output .= l($community_name, 'communities/'. drupal_strtolower($community['name']));
$output .= t('
');
}
$output .= t('
');
}
// add from $hookfields[$category='Colleft'][$key]
if (is_array($hookfields['Colleft'])) {
foreach ($hookfields['Colleft'] as $key => $item) {
$output .= $item;
}
}
$output .= t('
');
$output .= t('
');
if ($is_self) {
$output .= t('
') . l('[Edit]', 'users/'. $username .'/edit_personal_information') . t('
');
}
// shows [Remove from Friends]
elseif ($already_friends) {
$output .= t('
') . l('[Remove from Friends]', 'remove_friend/'. $username) . t('
');
}
// shows [Add to Friends]
elseif ($user->uid > 0) {
$output .= t('
') . l('[Add to Friends]', 'add_friend/'. $username) . t('
');
}
if (user_access('origo admin access')) {
// An Origo admin is viewing the profile
module_load_include('inc', 'origo_home', 'origo_admin');
$output .= t('
') . l('[Disable]', 'origo_admin/disable_account/'. $username) . t('
');
}
if (drupal_strlen($user_information['first_name']) > 0 && drupal_strlen($user_information['last_name']) > 0) {
$output .= t('
'. $user_information['first_name'] .'');
$output .= t(' ');
$output .= t('
'. $user_information['last_name'] .'');
}
elseif (drupal_strlen($user_information['first_name']) > 0) {
$output .= t('
'. $user_information['first_name'] .'');
}
elseif (drupal_strlen($user_information['last_name']) > 0) {
$output .= t('
'. $user_information['last_name'] .'');
}
else {
$output .= t('
'. $username .'');
}
$output .= t('
');
$output .= t('
');
$output .= t('
Member Since
');
$output .= t('
');
$output .= t(date('Y-m-d', $user_information['registration_date']));
$output .= t('
');
$birthday = explode(' ', $user_information['birthday']);
$birthday = explode('/', $birthday[0]);
$birthday = $birthday[2] .'-'. $birthday[0] .'-'. $birthday[1];
if ($birthday != '1900-01-01') {
$output .= t('
Birthday
');
$output .= t('
');
$output .= t($birthday);
$output .= t('
');
}
if (drupal_strlen($user_information['homepage']) > 0) {
$homepage_title = _crop_line($user_information['homepage'], 33, "...");
$output .= t('
Homepage
');
$output .= t('
');
$output .= l($homepage_title, _link_check($user_information['homepage']), array('attributes' => array('rel' => 'me', 'class' => 'url')));
$output .= t('
');
}
if (drupal_strlen($user_information['blog']) > 0) {
$blog_title = _crop_line($user_information['blog'], 33, "...");
$output .= t('
Blog
');
$output .= t('
');
$output .= l($blog_title, _link_check($user_information['blog']), array('attributes' => array('rel' => 'me', 'class' => 'url')));
$output .= t('
');
}
if (drupal_strlen($user_information['ohloh_profile']) > 0) {
// check if the whole url was entered. stripe out the name and display it
$pos = strrchr($user_information['ohloh_profile'], "/");
if ($pos) {
$ohloh_title = _crop_line(drupal_substr($pos, 1), 33, "...");
$ohloh_link = $user_information['ohloh_profile'];
}
else {
// assume just the username was entered
$ohloh_title = _crop_line($user_information['ohloh_profile'], 33, "...");
$ohloh_link = 'http://www.ohloh.net/accounts/'. $user_information['ohloh_profile'];
}
$output .= t('
Ohloh Profile
');
$output .= t('
');
$output .= l($ohloh_title, _link_check($ohloh_link), array('attributes' => array('rel' => 'me', 'class' => 'url')));
$output .= t('
');
}
if (drupal_strlen($user_information['languages']) > 0) {
$output .= t('
Languages
');
$output .= t('
');
$output .= t($user_information['languages']);
$output .= t('
');
}
if (drupal_strlen($user_information['message']) > 0) {
$output .= t('
Message
');
$output .= t('
');
$output .= t(str_replace("\n", "
", $user_information['message']));
$output .= t('
');
}
// add from $hookfields[$category='Personal Information'][$key]
if (is_array($hookfields['Personal Information'])) {
foreach ($hookfields['Personal Information'] as $key => $item) {
$output .= $item;
}
}
$output .= t('
');
// Icons
$output .= t('
');
drupal_add_js(drupal_get_path('module', 'origo_home') .'/lib/jtip/jtip.js', 'module');
drupal_add_css(drupal_get_path('module', 'origo_home') .'/lib/jtip/jtip.css', 'module', 'all', FALSE);
// vCard Icon
$output .= l(
'
',
'users/'. $username .'/vcard',
array(
'attributes' => array(
'rel' => 'me',
'id' => 'aaAi378',
'name' => 'vCard',
'class' => 'jTip jTip_element_ao3ue2ht jTip_width_150 jTip_opacity_95'
),
'html' => TRUE
)) .' ';
$apostroph = (drupal_substr($username, -1) == 's')?'\'':'\'s';
$output .= t('
Download '. $username . $apostroph .' vCard
');
$ret = origo_auth_xml_rpc(variable_get('origo_api', ''), 'user.profile_visible', $username);
if ((int)xmlrpc_errno() <= 0 && $ret['profile_visible'] == 1) {
// the profile is visible by anyone, so it is hCard enabled
// hCard Icon (microformats)
$output .= l(
'
',
'http://microformats.org/wiki/hcard',
array(
'attributes' => array(
'id' => '3728Au2',
'name' => 'microformats',
'class' => 'jTip jTip_element_feAu32D jTip_width_150 jTip_opacity_95'
),
'html' => TRUE
)) .' ';
$output .= t('
This profile is hCard and XFN enabled.
The URL is accessible by other web applications.
');
}
// add from $hookfields[$category='Personal Information Icons'][$key]
if (is_array($hookfields['Personal Information Icons'])) {
foreach ($hookfields['Personal Information Icons'] as $key => $item) {
$output .= $item .' ';
}
}
$output .= t('
');
$contact_data_present = (drupal_strlen($user_information['icq']) > 0) ||
(drupal_strlen($user_information['jabber']) > 0) ||
(drupal_strlen($user_information['aim']) > 0) ||
(drupal_strlen($user_information['yahoo']) > 0) ||
(drupal_strlen($user_information['msn']) > 0) ||
(drupal_strlen($user_information['skype']) > 0) ||
(drupal_strlen($user_information['sip']) > 0);
if ($contact_data_present || $is_self || $user->uid > 0) {
$output .= t('');
$output .= t('
');
}
$output .= t('
Origo
');
$output .= t('
');
$output .= l('[Send Message]', 'message/'. $username);
$output .= t('
');
if (drupal_strlen($user_information['icq']) > 0) {
$output .= t('
ICQ
');
$output .= t('
');
$output .= t($user_information['icq']);
$output .= t('
');
}
if (drupal_strlen($user_information['jabber']) > 0) {
$output .= t('
Jabber
');
$output .= t('
');
$output .= t($user_information['jabber']);
$output .= t('
');
}
if (drupal_strlen($user_information['aim']) > 0) {
$output .= t('
AIM
');
$output .= t('
');
$output .= t($user_information['aim']);
$output .= t('
');
}
if (drupal_strlen($user_information['yahoo']) > 0) {
$output .= t('
Yahoo
');
$output .= t('
');
$output .= t( $user_information['yahoo']);
$output .= t('
');
}
if (drupal_strlen($user_information['msn']) > 0) {
$output .= t('
MSN
');
$output .= t('
');
$output .= t($user_information['msn']);
$output .= t('
');
}
if (drupal_strlen($user_information['skype']) > 0) {
$output .= t('
Skype
');
$output .= t('
');
$output .= t($user_information['skype']);
$output .= t('
');
}
if (drupal_strlen($user_information['irc']) > 0) {
$output .= t('
IRC
');
$output .= t('
');
$output .= t($user_information['irc']);
$output .= t('
');
}
if (drupal_strlen($user_information['sip']) > 0) {
$output .= t('
SIP
');
$output .= t('
');
$output .= t($user_information['sip']);
$output .= t('
');
}
// add from $hookfields[$category='Contact'][$key]
if (is_array($hookfields['Contact'])) {
foreach ($hookfields['Contact'] as $key => $item) {
$output .= $item;
}
}
if ($contact_data_present || $is_self || $user->uid > 0) {
$output .= t('
');
}
// print friends
if (sizeof($friends) > 0) {
$min = min(6, sizeof($friends));
$output .= t('');
$output .= t('
');
for ($counter = 0; $counter < $min; $counter++) {
$output .= t('
');
$output .= t('
');
if ($friends[$counter]['icon'] != "") {
$image_path = origo_home_get_service_dir('pictures') . $friends[$counter]['name'] .'/100_'. $friends[$counter]['icon'];
}
else {
$image_path = base_path() . drupal_get_path('module', 'origo_home') .'/img/user_m_medium.png';
}
$output .= l('
', 'users/'. $friends[$counter]['name'], array('html' => TRUE));
$output .= t('
');
$output .= t('
');
$output .= l($friends[$counter]['name'], 'users/'. $friends[$counter]['name'], array('attributes' => array('rel' => 'contact')));
$output .= t('
');
$output .= t('
');
if ($counter == 2) {
$output .= t('
');
$output .= t('
');
}
}
$output .= t('
'); // end friendrow
}
// add from $hookfields[$category='Friend'][$key]
if (is_array($hookfields['Friend'])) {
foreach ($hookfields['Friend'] as $key => $item) {
$output .= $item;
}
}
$output .= t('