|
|
|
@ -623,17 +623,17 @@ class IndexManager { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* @todo use the template system |
|
|
|
* @todo use the template system |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function show_right_block($title, $content, $id = null) { |
|
|
|
function show_right_block($title, $content, $id = null, $params = null) { |
|
|
|
$id_label = null; |
|
|
|
|
|
|
|
if (!empty($id)) { |
|
|
|
if (!empty($id)) { |
|
|
|
$id_label = " id = $id "; |
|
|
|
$params['id'] = $id; |
|
|
|
} |
|
|
|
} |
|
|
|
$html= '<div '.$id_label.' class="well sidebar-nav">'; |
|
|
|
$params['class'] = 'well sidebar-nav'; |
|
|
|
|
|
|
|
$html = null; |
|
|
|
if (!empty($title)) { |
|
|
|
if (!empty($title)) { |
|
|
|
$html.= '<h4>'.$title.'</h4>'; |
|
|
|
$html.= '<h4>'.$title.'</h4>'; |
|
|
|
} |
|
|
|
} |
|
|
|
$html.= $content; |
|
|
|
$html.= $content; |
|
|
|
$html.= '</div>'; |
|
|
|
$html = Display::div($html, $params); |
|
|
|
return $html; |
|
|
|
return $html; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -707,13 +707,7 @@ class IndexManager { |
|
|
|
return $html; |
|
|
|
return $html; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function return_profile_block() { |
|
|
|
function return_user_image_block() { |
|
|
|
$html = ''; |
|
|
|
|
|
|
|
$user_id = api_get_user_id(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($user_id)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Always show the user image |
|
|
|
//Always show the user image |
|
|
|
$img_array = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'web', true, true); |
|
|
|
$img_array = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'web', true, true); |
|
|
|
@ -723,15 +717,26 @@ class IndexManager { |
|
|
|
} |
|
|
|
} |
|
|
|
$img_array = UserManager::get_picture_user(api_get_user_id(), $img_array['file'], 50, USER_IMAGE_SIZE_MEDIUM, ' width="90" height="90" '); |
|
|
|
$img_array = UserManager::get_picture_user(api_get_user_id(), $img_array['file'], 50, USER_IMAGE_SIZE_MEDIUM, ' width="90" height="90" '); |
|
|
|
|
|
|
|
|
|
|
|
$profile_content .= '<ul class="menulist">'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
|
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
|
|
if (!$no_image) { |
|
|
|
if (!$no_image) { |
|
|
|
$profile_content .='<li><a class="thumbnail" href="'.api_get_path(WEB_PATH).'main/social/home.php"><img src="'.$img_array['file'].'" '.$img_array['style'].' ></a></li>'; |
|
|
|
$profile_content .='<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/social/home.php"><img src="'.$img_array['file'].'" '.$img_array['style'].' ></a>'; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$profile_content .='<li><a class="thumbnail" href="'.api_get_path(WEB_PATH).'main/auth/profile.php"><img title="'.get_lang('EditProfile').'" src="'.$img_array['file'].'" '.$img_array['style'].'></a></li>'; |
|
|
|
$profile_content .='<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/auth/profile.php"><img title="'.get_lang('EditProfile').'" src="'.$img_array['file'].'" '.$img_array['style'].'></a>'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$html = self::show_right_block(null, $profile_content, 'user_image_block', array('style' => 'text-align:center;')); |
|
|
|
|
|
|
|
return $html; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function return_profile_block() { |
|
|
|
|
|
|
|
$html = ''; |
|
|
|
|
|
|
|
$user_id = api_get_user_id(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($user_id)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$profile_content .= '<ul class="menulist">'; |
|
|
|
|
|
|
|
|
|
|
|
// @todo Add a platform setting to add the user image. |
|
|
|
// @todo Add a platform setting to add the user image. |
|
|
|
if (api_get_setting('allow_message_tool') == 'true') { |
|
|
|
if (api_get_setting('allow_message_tool') == 'true') { |
|
|
|
|