本文整理汇总了PHP中Conversation::set_profile_owner方法的典型用法代码示例。如果您正苦于以下问题:PHP Conversation::set_profile_owner方法的具体用法?PHP Conversation::set_profile_owner怎么用?PHP Conversation::set_profile_owner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Conversation
的用法示例。
在下文中一共展示了Conversation::set_profile_owner方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: conversation
//.........这里部分代码省略.........
$dropping = false;
}
$drop = array('pagedropping' => $page_dropping, 'dropping' => $dropping, 'select' => t('Select'), 'delete' => t('Delete'));
$star = false;
$isstarred = "unstarred icon-star-empty";
$lock = $item['item_private'] || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid']) ? t('Private Message') : false;
$likebuttons = false;
$shareable = false;
$verified = $item['item_flags'] & ITEM_VERIFIED ? t('Message signature validated') : '';
$forged = $item['sig'] && !($item['item_flags'] & ITEM_VERIFIED) ? t('Message signature incorrect') : '';
$unverified = '';
$tags = array();
$terms = get_terms_oftype($item['term'], array(TERM_HASHTAG, TERM_MENTION, TERM_UNKNOWN));
if (count($terms)) {
foreach ($terms as $tag) {
$tags[] = format_term_for_display($tag);
}
}
$body = prepare_body($item, true);
$tmp_item = array('template' => $tpl, 'toplevel' => 'toplevel_item', 'mode' => $mode, 'id' => $preview ? 'P0' : $item['item_id'], 'linktitle' => sprintf(t('View %s\'s profile @ %s'), $profile_name, $profile_url), 'profile_url' => $profile_link, 'item_photo_menu' => item_photo_menu($item), 'name' => $profile_name, 'sparkle' => $sparkle, 'lock' => $lock, 'thumb' => $profile_avatar, 'title' => $item['title'], 'body' => $body, 'tags' => $tags, 'hashtags' => $hashtags, 'mentions' => $mentions, 'verified' => $verified, 'unverified' => $unverified, 'forged' => $forged, 'txt_cats' => t('Categories:'), 'txt_folders' => t('Filed under:'), 'has_cats' => count($categories) ? 'true' : '', 'has_folders' => count($folders) ? 'true' : '', 'categories' => $categories, 'folders' => $folders, 'text' => strip_tags($body), 'ago' => relative_date($item['created']), 'app' => $item['app'], 'str_app' => sprintf(t(' from %s'), $item['app']), 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), 'editedtime' => $item['edited'] != $item['created'] ? sprintf(t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : '', 'expiretime' => $item['expires'] !== NULL_DATE ? sprintf(t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')) : '', 'location' => $location, 'indent' => '', 'owner_name' => $owner_name, 'owner_url' => $owner_url, 'owner_photo' => $owner_photo, 'plink' => get_plink($item, false), 'edpost' => false, 'isstarred' => $isstarred, 'star' => $star, 'drop' => $drop, 'vote' => $likebuttons, 'like' => '', 'dislike' => '', 'comment' => '', 'conv' => $preview ? '' : array('href' => z_root() . '/display/' . $item['mid'], 'title' => t('View in context')), 'previewing' => $previewing, 'wait' => t('Please wait'), 'thread_level' => 1);
$arr = array('item' => $item, 'output' => $tmp_item);
call_hooks('display_item', $arr);
// $threads[$threadsid]['id'] = $item['item_id'];
$threads[] = $arr['output'];
}
} else {
// Normal View
// logger('conv: items: ' . print_r($items,true));
require_once 'include/ConversationObject.php';
require_once 'include/ItemObject.php';
$conv = new Conversation($mode, $preview, $prepared_item);
// In the display mode we don't have a profile owner.
if ($mode === 'display' && $items) {
$conv->set_profile_owner($items[0]['uid']);
}
// get all the topmost parents
// this shouldn't be needed, as we should have only them in our array
// But for now, this array respects the old style, just in case
$threads = array();
foreach ($items as $item) {
// Check for any blocked authors
if ($arr_blocked) {
$blocked = false;
foreach ($arr_blocked as $b) {
if ($b && $item['author_xchan'] == $b) {
$blocked = true;
break;
}
}
if ($blocked) {
continue;
}
}
// Check all the kids too
if ($arr_blocked && $item['children']) {
for ($d = 0; $d < count($item['children']); $d++) {
foreach ($arr_blocked as $b) {
if ($b && $item['children'][$d]['author_xchan'] == $b) {
$item['children'][$d]['author_blocked'] = true;
}
}
}
}
builtin_activity_puller($item, $conv_responses);
if (!visible_activity($item)) {
continue;