当前位置: 首页>>代码示例>>PHP>>正文


PHP list_user_friends_objects函数代码示例

本文整理汇总了PHP中list_user_friends_objects函数的典型用法代码示例。如果您正苦于以下问题:PHP list_user_friends_objects函数的具体用法?PHP list_user_friends_objects怎么用?PHP list_user_friends_objects使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了list_user_friends_objects函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elgg_get_page_owner_entity

<?php

/**
 * List a user's friends' pages
 *
 * @package ElggPages
 */
$owner = elgg_get_page_owner_entity();
if (!$owner) {
}
elgg_push_breadcrumb($owner->name, "pages/owner/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo('pages:friends');
$content = list_user_friends_objects($owner->guid, 'page_top', 10, false);
if (!$content) {
    $content = elgg_echo('pages:none');
}
$params = array('filter_context' => 'friends', 'content' => $content, 'title' => $title);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
开发者ID:rasul,项目名称:Elgg,代码行数:20,代码来源:friends.php

示例2: elgg_get_page_owner_entity

<?php

/**
 * Wire posts of your friends
 */
$owner = elgg_get_page_owner_entity();
if (!$owner) {
    forward('', '404');
}
$title = elgg_echo('thewire:friends');
elgg_push_breadcrumb(elgg_echo('thewire'), "thewire/all");
elgg_push_breadcrumb($owner->name, "thewire/owner/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
if (elgg_get_logged_in_user_guid() == $owner->guid) {
    $form_vars = array('class' => 'thewire-form');
    $content = elgg_view_form('thewire/add', $form_vars);
    $content .= elgg_view('input/urlshortener');
}
$content .= list_user_friends_objects($owner->guid, 'thewire', 15, false);
$body = elgg_view_layout('content', array('filter_context' => 'friends', 'content' => $content, 'title' => $title));
echo elgg_view_page($title, $body);
开发者ID:elainenaomi,项目名称:labxp2014,代码行数:21,代码来源:friends.php

示例3: elgg_get_page_owner_entity

<?php

/**
 * List a user's friends' tasks
 *
 * @package ElggTasks
 */
$owner = elgg_get_page_owner_entity();
if (!elgg_instanceof($owner, 'user')) {
    forward('tasks/all');
}
elgg_register_title_button('tasks', 'add');
elgg_push_breadcrumb($owner->name, "tasks/owner/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo('tasks:friends');
$content = list_user_friends_objects($owner->guid, 'task', 10, false);
if (!$content) {
    $content = elgg_echo('tasks:none');
}
$params = array('filter_context' => 'friends', 'content' => $content, 'title' => $title);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
开发者ID:lorea,项目名称:Hydra-dev,代码行数:22,代码来源:friends.php

示例4: elgg_get_page_owner_entity

<?php

/**
 * List a user's friends' pages
 *
 * @package ElggPages
 */
$owner = elgg_get_page_owner_entity();
if (!$owner) {
    forward('pages/all');
}
elgg_push_breadcrumb($owner->name, "pages/owner/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
elgg_register_title_button();
$title = elgg_echo('pages:friends');
$integrate_in_pages = elgg_get_plugin_setting('integrate_in_pages', 'etherpad') == 'yes';
$content = list_user_friends_objects($owner->guid, $integrate_in_pages ? array('page_top', 'etherpad') : 'page_top', 10, false);
if (!$content) {
    $content = elgg_echo('pages:none');
}
if ($integrate_in_pages && elgg_is_logged_in()) {
    $url = "etherpad/add/" . elgg_get_logged_in_user_guid();
    elgg_register_menu_item('title', array('name' => 'elggpad', 'href' => $url, 'text' => elgg_echo('etherpad:add'), 'link_class' => 'elgg-button elgg-button-action', 'priority' => 200));
}
$params = array('filter_context' => 'friends', 'content' => $content, 'title' => $title);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
开发者ID:nachopavon,项目名称:elggpad-lite,代码行数:27,代码来源:friends.php

示例5: elgg_get_page_owner_entity

<?php

/**
 * Simple Kaltura view friends' videos
 * 
 * @package Simplekaltura
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Jeff Tilson
 * @copyright THINK Global School 2010 - 2013
 * @link http://www.thinkglobalschool.com/
 * 
 */
$owner = elgg_get_page_owner_entity();
elgg_push_breadcrumb($owner->name, "videos/owner/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo("simplekaltura:friends", array($owner->name));
// offset is grabbed in list_user_friends_objects
$content = list_user_friends_objects($owner->guid, 'simplekaltura_video', 10, false);
if (!$content) {
    $content = elgg_echo("simplekaltura:no_content");
}
elgg_register_title_button('videos');
$body = elgg_view_layout('content', array('filter_context' => 'friends', 'content' => $content, 'context' => 'videos', 'title' => $title, 'sidebar' => elgg_view('simplekaltura/sidebar', array('page' => 'friends'))));
echo elgg_view_page($title, $body);
开发者ID:beck24,项目名称:Simplekaltura,代码行数:24,代码来源:friends.php

示例6: elgg_get_page_owner_entity

<?php

/**
 * Friends Videolist
 *
 * @package ElggVideolist
 */
$page_owner = elgg_get_page_owner_entity();
elgg_push_breadcrumb(elgg_echo('videolist'), "videolist/all");
elgg_push_breadcrumb($page_owner->name, "videolist/owner/{$page_owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
elgg_register_title_button();
$title = elgg_echo("videolist:friends");
// offset is grabbed in list_user_friends_objects
$content = list_user_friends_objects($page_owner->guid, 'videolist_items', 10, false);
if (!$content) {
    $content = elgg_echo("videolist:none");
}
$sidebar = elgg_view('videolist/sidebar', array());
$body = elgg_view_layout('content', array('filter_context' => 'friends', 'content' => $content, 'title' => $title, 'sidebar' => $sidebar));
echo elgg_view_page($title, $body);
开发者ID:epsylon,项目名称:Hydra-dev,代码行数:21,代码来源:friends.php

示例7: elgg_load_library

/**
 * Elgg vouchers plugin
 * @package Vouchers
 */
elgg_load_library('elgg:vouchers');
$page_owner = elgg_get_page_owner_entity();
if (!$page_owner) {
    forward('vouchers/all');
}
elgg_push_breadcrumb($page_owner->name, "vouchers/owner/{$page_owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
// check if user can post vouchers
if (check_if_user_can_post()) {
    elgg_register_title_button();
}
$title = elgg_echo('vouchers:friends');
// get current elgg version
$release = get_version(true);
if ($release < 1.9) {
    // version 1.8
    $content = list_user_friends_objects($page_owner->guid, 'vouchers', 10, false);
} else {
    // use this since Elgg 1.9
    $content = elgg_list_entities_from_relationship(array('type' => 'object', 'subtype' => 'vouchers', 'full_view' => false, 'limit' => 10, 'relationship' => 'friend', 'relationship_guid' => $page_owner->guid, 'relationship_join_on' => 'container_guid'));
}
if (!$content) {
    $content = elgg_echo('vouchers:none');
}
$params = array('filter_context' => 'friends', 'content' => $content, 'title' => $title, 'filter_override' => elgg_view('vouchers/nav', array('selected' => $vars['page'])));
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
开发者ID:nlybe,项目名称:Elgg-Vouchers,代码行数:31,代码来源:friends.php

示例8: dirname

<?php

/**
 * Elgg bookmarks plugin friends' page
 * 
 * @package ElggBookmarks
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd <info@elgg.com>
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.org/
 */
// Start engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
// List bookmarks
$area2 = elgg_view_title(elgg_echo('bookmarks:friends'));
set_context('search');
$area2 .= list_user_friends_objects(page_owner(), 'bookmarks', 10, false, false);
set_context('bookmarks');
// Format page
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
// Draw it
echo page_draw(elgg_echo('bookmarks:friends'), $body);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:22,代码来源:friends.php

示例9: dirname

<?php

/**
 * Elgg file browser
 * 
 * @package ElggFile
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 */
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
if (is_callable('group_gatekeeper')) {
    group_gatekeeper();
}
$area2 = elgg_view_title($title = elgg_echo('file:yours:friends'));
set_context('search');
$area2 .= list_user_friends_objects(page_owner(), 'file');
set_context('file');
$area1 = get_filetype_cloud(page_owner(), true);
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
// Finally draw the page
page_draw(sprintf(elgg_echo("file:friends"), $_SESSION['user']->name), $body);
开发者ID:eokyere,项目名称:elgg,代码行数:22,代码来源:friends.php

示例10: elgg_get_page_owner_entity

<?php

/**
 * Elgg bookmarks plugin friends page
 *
 * @package ElggBookmarks
 */
$owner = elgg_get_page_owner_entity();
elgg_push_breadcrumb($owner->name, "bookmarks/owner/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo('bookmarks:friends');
$content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false);
if (!$content) {
    $content = elgg_echo('bookmarks:none');
}
$params = array('filter_context' => 'friends', 'content' => $content, 'title' => $title);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
开发者ID:rasul,项目名称:Elgg,代码行数:18,代码来源:friends.php

示例11: elgg_get_page_owner_entity

<?php

/**
 * Elgg questions plugin friends page
 *
 * @package ElggQuestions
 */
$owner = elgg_get_page_owner_entity();
elgg_push_breadcrumb($owner->name, "questions/owner/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo('questions:friends');
$content = list_user_friends_objects($owner->guid, 'question', 10, false);
if (!$content) {
    $content = elgg_echo('questions:none');
}
$params = array('title' => $title, 'content' => $content);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
开发者ID:rickterheide,项目名称:elgg-questions,代码行数:18,代码来源:friends.php

示例12: set_page_owner

if ($page_owner === false || is_null($page_owner)) {
    $page_owner = $_SESSION['user'];
    set_page_owner($_SESSION['guid']);
}
if (!$page_owner instanceof ElggEntity) {
    forward();
}
//set the title
if ($page_owner == $_SESSION['user']) {
    $title = elgg_echo('answers:friends');
} else {
    $title = sprintf(elgg_echo('answers:user:friends'), $page_owner->name);
}
elgg_register_menu_item('title', array('name' => "answers:add", 'href' => $CONFIG->wwwroot . "answers/ask/" . $page_owner->username . "/", 'text' => elgg_echo("answers:add"), 'link_class' => 'elgg-button elgg-button-action'));
// get the user's friends' questions
$area2 .= list_user_friends_objects($page_owner->getGUID(), 'question', 10, false);
//display groupquestions
$groups = elgg_get_entities_from_relationship(array('type' => 'group', 'relationship' => 'member', 'relationship_guid' => $page_owner->guid, 'inverse_relationship' => false, 'full_view' => false));
foreach ($groups as $group) {
    $vars['entity'] = $group;
    //var_dump($vars['entity']->container_guid);
    $number = (int) $vars['entity']->num_display;
    if (!$number) {
        $number = 2;
    }
    //get the groups questions
    foreach ($page_owner->getFriends() as $friendsEntity) {
        $options = array('type' => 'object', 'subtype' => 'question', 'container_guid' => $vars['entity']->guid, 'owner_guid' => $friendsEntity->getGUID());
        $questions = elgg_get_entities($options);
        $options['count'] = true;
        $count = elgg_get_entities($options);
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:31,代码来源:friends.php

示例13: define

 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.com/
 */
// Load Elgg engine
define('everyoneblog', 'true');
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
// Get the current page's owner
$page_owner = page_owner_entity();
if ($page_owner === false || is_null($page_owner)) {
    $page_owner = $_SESSION['user'];
    set_page_owner($_SESSION['guid']);
}
if (!$page_owner instanceof ElggEntity) {
    forward();
}
//set the title
if ($page_owner == $_SESSION['user']) {
    $title = elgg_echo('blog:yourfriends');
} else {
    $title = $page_owner->name . "'s " . elgg_echo('blog:friends');
}
$area2 = elgg_view_title($title);
// Get a list of blog posts
$area2 .= "<div id='blogs'>" . list_user_friends_objects($page_owner->getGUID(), 'blog', 10, false) . "<div class='clearfloat'></div></div>";
// Get categories, if they're installed
global $CONFIG;
$area3 = elgg_view('blog/categorylist', array('baseurl' => $CONFIG->wwwroot . 'search/?subtype=blog&owner_guid=' . $page_owner->guid . '&friends=' . $page_owner->guid . '&tagtype=universal_categories&tag=', 'subtype' => 'blog'));
// Display them in the page
$body = elgg_view_layout("two_column_left_sidebar", '', $area1 . $area2, $area3);
// Display page
page_draw($title, $body);
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:31,代码来源:friends.php

示例14: elgg_get_page_owner_entity

<?php

/**
 * List all the albums of someone's friends
 *
 * @author Cash Costello
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
 */
$owner = elgg_get_page_owner_entity();
elgg_push_breadcrumb(elgg_echo('photos'), "photos/all");
elgg_push_breadcrumb($owner->name, "photos/friends/{$owner->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo('album:friends');
$num_albums = 16;
set_input('list_type', 'gallery');
$content = list_user_friends_objects($owner->guid, 'album', $num_albums, false);
if (!$content) {
    $content = elgg_echo('tidypics:none');
}
elgg_register_title_button();
$body = elgg_view_layout('content', array('filter_context' => 'friends', 'content' => $content, 'title' => $title));
echo elgg_view_page($title, $body);
开发者ID:pleio,项目名称:tidypics,代码行数:22,代码来源:friends.php

示例15: get_input

/**
 * iZAP izap_videos
 *
 * @package Elgg videotizer, by iZAP Web Solutions.
 * @license GNU Public License version 3
 * @Contact iZAP Team "<support@izap.in>"
 * @Founder Tarun Jangra "<tarun@izap.in>"
 * @link http://www.izap.in/
 * 
 */
// check the user name
$username = get_input('guid');
$user = get_user_by_username($username);
if ($user && $user instanceof ElggUser) {
    set_input('username', $user->name);
}
// get pageowner
$page_owner = page_owner_entity();
$area2 = elgg_view_title(sprintf(elgg_echo('izap_videos:userfrnd'), $page_owner->name));
$list = list_user_friends_objects($page_owner->guid, 'izap_videos', 10, false);
if (empty($list)) {
    $area2 .= elgg_view('izap_videos/notfound');
} else {
    $area2 .= $list;
}
$area2 .= elgg_view('izap_videos/izapLink');
// get tags and categories
$area3 = elgg_view('izap_videos/area3');
$body = elgg_view_layout("two_column_left_sidebar", '', $area2, $area3);
page_draw(sprintf(elgg_echo('izap_videos:frnd'), $page_owner->name), $body);
开发者ID:rimpy,项目名称:izap_videos,代码行数:30,代码来源:friends.php


注:本文中的list_user_friends_objects函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。