From c7322615f9990026de4857e1e5f22ba01744174d Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 24 Dec 2009 15:00:26 -0500 Subject: [PATCH] Adding picture, fixing group view adding search form see #190 --- main/social/home.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/main/social/home.php b/main/social/home.php index 060dd32d49..49c9d89f2a 100755 --- a/main/social/home.php +++ b/main/social/home.php @@ -50,7 +50,6 @@ if (api_get_setting('profile', 'picture') == 'true') { } Display :: display_header(null); - $user_info = api_get_user_info(api_get_user_id()); echo '
'; @@ -67,18 +66,20 @@ echo '
'; echo '
'; echo '
'; - - //@todo fix this code aswell as in main/auth/profile.php - - $user_image_array = UserManager::get_picture_user(api_get_user_id(), $user_info['picture_uri'], 200, USER_IMAGE_SIZE_MEDIUM); + $user_image_array = UserManager::get_picture_user(api_get_user_id(), $user_info['picture_uri'], 200, USER_IMAGE_SIZE_MEDIUM); if ($user_image_array['file'] != 'unknown.jpg') { echo '

'; } else { echo '

'; } - + echo '
'; + echo get_lang('Name').': '.api_get_person_name($user_info['firstName'], $user_info['lastName']); + echo '
'; + + echo UserManager::get_search_form($query); + echo '
'; echo '
'; @@ -93,16 +94,18 @@ echo '
'; $results = GroupPortalManager::get_groups_by_age(1); + $groups = array(); foreach ($results as $result) { $id = $result['id']; $url_open = ''; - $url_close = ''; + $url_close = ''; + $result['picture_uri'] = ''; $groups[]= array($url_open.$result['picture_uri'].$url_close, $url_open.$result['name'].$url_close, cut($result['description'],180,true)); } if (count($groups) > 0) { - echo '

'.get_lang('Popular').'

'; + echo '

'.get_lang('Newest').'

'; Display::display_sortable_grid('home_group', array(), $groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false)); } @@ -119,7 +122,7 @@ echo '
'; } else { $result['count'] = $result['count'].' '.get_lang('Members'); } - + $result['picture_uri'] = ''; $groups[]= array($url_open.$result['picture_uri'].$url_close, $url_open.$result['name'].$url_close,$result['count'],cut($result['description'],120,true)); } if (count($groups) > 0) {