From 06eda4bdb0ed245a548dcc4214f1b8d76785d1ec Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Wed, 29 Oct 2014 13:17:40 -0500 Subject: [PATCH] Fix image upload. Fix social homepage layout - refs #5637 --- main/inc/ajax/social.ajax.php | 2 +- main/social/home.php | 43 ++++++++++--------- main/social/profile.php | 4 +- .../template/default/layout/social_layout.tpl | 2 +- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/main/inc/ajax/social.ajax.php b/main/inc/ajax/social.ajax.php index 0b024f0145..b13eae1845 100755 --- a/main/inc/ajax/social.ajax.php +++ b/main/inc/ajax/social.ajax.php @@ -201,7 +201,7 @@ switch ($action) { } $html .= Display::div( Display::url( - get_lang('Next'), + get_lang('SeeMore'), api_get_self() . '?u=' . $userId . '&a=listWallMessage&start=' . ($start + $length + 1) . '&length=' . $length, array( diff --git a/main/social/home.php b/main/social/home.php index e4a13f60e9..1f23a58cf0 100755 --- a/main/social/home.php +++ b/main/social/home.php @@ -87,9 +87,9 @@ $user_info = UserManager :: get_user_info_by_id(api_get_user_id()); $social_avatar_block = SocialManager::show_social_avatar_block('home'); $social_menu_block = SocialManager::show_social_menu('home'); -$social_right_content = '
'; -$social_right_content .= '
'; -$social_right_content .= '

' . get_lang('ContactInformation') . '

'; +$socialRightContent = '
'; +$socialRightContent .= '
'; +$socialRightContent .= '

' . get_lang('ContactInformation') . '

'; $list = array( array( @@ -102,16 +102,16 @@ $list = array( array('title' => get_lang('Email'), 'content' => $user_info['email']), ); // information current user -$social_right_content .= '
' . Display::description($list) . '
'; -$social_right_content .= ' +$socialRightContent .= '
' . Display::description($list) . '
'; +$socialRightContent .= '
'; +
'; if (api_get_setting('allow_skills_tool') == 'true') { - $social_right_content .= '
'; + $socialRightInformation .= '
'; $skill = new Skill(); $ranking = $skill->get_user_skill_ranking(api_get_user_id()); $url = api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php'; @@ -123,7 +123,7 @@ if (api_get_setting('allow_skills_tool') == 'true') { $skills = $skill->get_user_skills(api_get_user_id(), true); - $social_right_content .= '

' . get_lang('Skills') . '

'; + $socialRightInformation .= '

' . get_lang('Skills') . '

'; $lis = ''; if (!empty($skills)) { foreach ($skills as $skill) { @@ -135,7 +135,7 @@ if (api_get_setting('allow_skills_tool') == 'true') { ) ); } - $social_right_content .= Display::tag('ul', $lis); + $socialRightInformation .= Display::tag('ul', $lis); } $url = api_get_path(WEB_CODE_PATH) . 'social/skills_wheel.php'; $skill_wheel_url = Display::url( @@ -143,16 +143,16 @@ if (api_get_setting('allow_skills_tool') == 'true') { $url, array('class' => 'btn') ); - $social_right_content .= '
' . $skill_wheel_url . $ranking_url . '
'; - $social_right_content .= '
'; + $socialRightInformation .= '
' . $skill_wheel_url . $ranking_url . '
'; + $socialRightInformation .= '
'; } -$social_right_content .= '
'; +$socialRightInformation .= ''; //Search box -$social_right_content .= '
'; -$social_right_content .= UserManager::get_search_form(''); -$social_right_content .= '
'; +$socialRightInformation .= '
'; +$socialRightInformation .= UserManager::get_search_form(''); +$socialRightInformation .= '
'; //Group box by age $results = GroupPortalManager::get_groups_by_age(1, false); @@ -242,10 +242,10 @@ foreach ($results as $result) { } if (count($groups_newest) > 0) { - $social_right_content .= ''; $tpl = new Template(get_lang('SocialNetwork')); $tpl->assign('social_avatar_block', $social_avatar_block); $tpl->assign('social_menu_block', $social_menu_block); -$tpl->assign('social_right_content', $social_right_content); +$tpl->assign('social_right_content', $socialRightContent); +$tpl->assign('socialRightInformation', $socialRightInformation); $social_layout = $tpl->get_template('layout/social_layout.tpl'); $tpl->display($social_layout); \ No newline at end of file diff --git a/main/social/profile.php b/main/social/profile.php index e91c5a0bcb..587cae68ff 100755 --- a/main/social/profile.php +++ b/main/social/profile.php @@ -29,7 +29,7 @@ $show_full_profile = true; //social tab $this_section = SECTION_SOCIAL; -if (!empty($_POST['social_wall_new_msg_main'])) { +if (!empty($_POST['social_wall_new_msg_main']) || !empty($_FILES['picture']['tmp_name'])) { $messageId = 0; $idMessage = SocialManager::sendWallMessage(api_get_user_id(), $friendId, $_POST['social_wall_new_msg_main'], $messageId, MESSAGE_STATUS_WALL_POST); if (!empty($_FILES['picture']['tmp_name']) && $idMessage > 0) { @@ -430,7 +430,7 @@ $social_right_content .= SocialManager::social_wrapper_div($wallSocialAddPost, 5 $social_right_content .= wallSocialPost($my_user_id, $friendId); $socialAutoExtendLink = Display::url( - get_lang('Next'), + get_lang('SeeMore'), $socialAjaxUrl . '?u='. $my_user_id . '&a=listWallMessage&start=10&length=5', array( 'class' => 'nextPage next', diff --git a/main/template/default/layout/social_layout.tpl b/main/template/default/layout/social_layout.tpl index d346affd8f..6862da34f1 100755 --- a/main/template/default/layout/social_layout.tpl +++ b/main/template/default/layout/social_layout.tpl @@ -8,7 +8,7 @@ {{ social_menu_block }}
-
+