本文整理汇总了PHP中SocialManager::getWallMessagesPostHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP SocialManager::getWallMessagesPostHTML方法的具体用法?PHP SocialManager::getWallMessagesPostHTML怎么用?PHP SocialManager::getWallMessagesPostHTML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SocialManager
的用法示例。
在下文中一共展示了SocialManager::getWallMessagesPostHTML方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
echo '</div>';
echo '<div class="clear"></div><br />';
}
break;
case 'unload_course':
break;
default:
break;
}
break;
case 'listWallMessage':
$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) - 1 : 0;
$length = isset($_REQUEST['length']) ? intval($_REQUEST['length']) : 10;
$userId = isset($_REQUEST['u']) ? intval($_REQUEST['u']) : 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']);
$html .= '<div class="well_border">' . $post . $comment . '</div>';
}
$html .= Display::div(Display::url(get_lang('SeeMore'), api_get_self() . '?u=' . $userId . '&a=listWallMessage&start=' . ($start + $length + 1) . '&length=' . $length, array('class' => 'nextPage')), array('class' => 'next'));
echo $html;
}
break;
default:
echo '';
}
示例2: getWallMessagesByUser
/**
* @param int $userId
* @param int $friendId
* @return string
*/
public static function getWallMessagesByUser($userId, $friendId)
{
$messages = SocialManager::getWallMessagesPostHTML($userId, $friendId);
$html = '';
foreach ($messages as $message) {
$post = $message['html'];
$comment = SocialManager::getWallMessagesHTML($userId, $friendId, $message['id']);
$html .= $post . $comment;
}
return $html;
}
示例3: wallSocialPost
function wallSocialPost($userId, $friendId)
{
$array = SocialManager::getWallMessagesPostHTML($userId, $friendId);
$html = '';
for($i = 0; $i < count($array); $i++) {
$post = $array[$i]['html'];
$comment = SocialManager::getWallMessagesHTML($userId, $friendId, $array[$i]['id']);
$html .= SocialManager::social_wrapper_div($post.$comment, 5);
}
return $html;
}