Fix post response loading issue. Add delete button in ajax posts - refs #5637

1.9.x
Imanol Losada 10 years ago
parent 7f9ed80164
commit 59675abcaa
  1. 5
      main/inc/ajax/social.ajax.php
  2. 4
      main/social/profile.php

@ -189,13 +189,14 @@ switch ($action) {
$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) - 1 : 0;
$length = isset($_REQUEST['length']) ? intval($_REQUEST['length']) : 10;
$userId = api_get_user_id();
$friendId = $userId;
$array = SocialManager::getWallMessagesPostHTML($userId, $friendId, null, $length, $start);
if (!empty($array)) {
ksort($array);
$html = '';
for($i = 0; $i < count($array); $i++) {
$post = $array[$i]['html'];
$comment = SocialManager::getWallMessagesHTML($userId, $friendId, $array[$i]['id'], null, $length, $start);
$comment = SocialManager::getWallMessagesHTML($userId, $friendId, $array[$i]['id']);
$html .= '<div class="well_border">'.$post.$comment.'</div>';
}
$html .= Display::div(
@ -205,7 +206,7 @@ switch ($action) {
($start + $length + 1) . '&length=' . $length,
array(
'class' => 'nextPage',
'style' => 'display: none;',
'style' => 'display: none;'
)
),
array(

@ -11,7 +11,7 @@ $language_file = array('userInfo', 'index');
$cidReset = true;
require_once '../inc/global.inc.php';
// Include OpenGraph NOT AVAILABLE
require_once api_get_path(LIBRARY_PATH) . 'opengraph/OpenGraph.php';
require_once api_get_path(LIBRARY_PATH).'opengraph/OpenGraph.php';
if (api_get_setting('allow_social_tool') !='true') {
$url = api_get_path(WEB_PATH).'whoisonline.php?id='.intval($_GET['u']);
@ -418,7 +418,7 @@ $social_right_content .= SocialManager::social_wrapper_div($wallSocialAddPost, 5
$social_right_content .= wallSocialPost($my_user_id, $friendId);
$socialAutoExtendLink = Display::url(
get_lang('Next'),
$socialAjaxUrl . '?a=listWallMessage&start=5&length=1',
$socialAjaxUrl . '?a=listWallMessage&start=10&length=5',
array(
'class' => 'nextPage next',
'style' => 'display: none;'

Loading…
Cancel
Save