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


PHP elgg_view_entity_list函数代码示例

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


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

示例1: friends_of_friends_list_entities

function friends_of_friends_list_entities($user_guid, $limit = 10, $fullview = true, $viewtypetoggle = false, $pagination = true)
{
    $limit = (int) $limit;
    $offset = (int) get_input('offset');
    $count = friends_of_friends_get_list($user_guid, "", $limit, $offset, true);
    $entities = friends_of_friends_get_list($user_guid);
    return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle);
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:8,代码来源:functions_friends_to_friends.php

示例2: get_online_users

/**
 * Return a list of how many users are currently online, rendered as a view.
 *
 * @return string
 */
function get_online_users()
{
    $count = find_active_users(600, 10, 0, true);
    $objects = find_active_users(600, 10);
    if ($objects) {
        return elgg_view_entity_list($objects, array('count' => $count, 'limit' => 10));
    }
}
开发者ID:nogsus,项目名称:Elgg,代码行数:13,代码来源:statistics.php

示例3: get_online_users

/**
 * Return a list of how many users are currently online, rendered as a view.
 *
 * @return string
 */
function get_online_users()
{
    $offset = get_input('offset', 0);
    $count = find_active_users(600, 10, $offset, true);
    $objects = find_active_users(600, 10, $offset);
    if ($objects) {
        return elgg_view_entity_list($objects, array('count' => $count, 'offset' => $offset, 'limit' => 10));
    }
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:14,代码来源:statistics.php

示例4: get_online_users

/**
 * Return a list of how many users are currently online, rendered as a view.
 */
function get_online_users()
{
    $offset = get_input('offset', 0);
    $count = count(find_active_users(600, 9999));
    $objects = find_active_users(600, 10, $offset);
    if ($objects) {
        return elgg_view_entity_list($objects, $count, $offset, 10, false);
    }
}
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:12,代码来源:statistics.php

示例5: get_online_users

/**
 * Return a list of how many users are currently online, rendered as a view.
 *
 * @return string
 */
function get_online_users()
{
    $limit = max(0, (int) get_input("limit", 10));
    $offset = max(0, (int) get_input("offset", 0));
    $count = find_active_users(600, $limit, $offset, true);
    $objects = find_active_users(600, $limit, $offset);
    if ($objects) {
        return elgg_view_entity_list($objects, array('count' => $count, 'limit' => $limit, 'offset' => $offset));
    }
    return '';
}
开发者ID:tjcaverly,项目名称:Elgg,代码行数:16,代码来源:statistics.php

示例6: threads_list_replies

function threads_list_replies($entity_guid, $options = array())
{
    $options['relationship_guid'] = $entity_guid;
    $entity = get_entity($entity_guid);
    if (elgg_instanceof($entity, 'object', 'groupforumtopic')) {
        $options['pagination'] = true;
        $options['limit'] = 10;
    } else {
        $options['pagination'] = false;
        $options['limit'] = 0;
    }
    $options['offset'] = (int) get_input('offset', 0);
    $replies = threads_get_replies($entity_guid, $options);
    $options['count'] = threads_get_replies($entity_guid, array_merge($options, array('count' => true)));
    return elgg_view_entity_list($replies, $options);
}
开发者ID:xingcuntian,项目名称:threads,代码行数:16,代码来源:threads.php

示例7: hj_alive_view_comments_list

function hj_alive_view_comments_list($entity, $params)
{
    $container_guid = elgg_extract('container_guid', $params, null);
    $river_id = elgg_extract('river_id', $params, null);
    $annotation_name = elgg_extract('aname', $params, 'generic_comment');
    $options = array('type' => 'object', 'subtype' => 'hjannotation', 'owner_guid' => null, 'container_guid' => $container_guid, 'metadata_name_value_pairs' => array(array('name' => 'annotation_name', 'value' => $annotation_name), array('name' => 'annotation_value', 'value' => '', 'operand' => '!='), array('name' => 'river_id', 'value' => $river_id)), 'count' => false, 'limit' => 3, 'order_by' => 'e.time_created desc');
    $options['count'] = true;
    $count = elgg_get_entities_from_metadata($options);
    if (elgg_instanceof($entity, 'object', 'hjannotation')) {
        $options['limit'] = 0;
    } else {
        $options['count'] = false;
        $comments = elgg_get_entities_from_metadata($options);
    }
    if ($annotation_name == 'generic_comment') {
        unset($params['aname']);
    }
    foreach ($params as $key => $option) {
        if ($option) {
            $data[$key] = $option;
        }
    }
    $vars['data-options'] = htmlentities(json_encode($data), ENT_QUOTES, 'UTF-8');
    $vars['sync'] = true;
    $vars['pagination'] = false;
    $vars['list_class'] = 'hj-comments';
    $vars['class'] = "hj-annotation-list-{$annotation_name}";
    $visible = elgg_view_entity_list($comments, $vars);
    $limit = elgg_extract('limit', $options, 0);
    if ($count > 0 && $count > $limit) {
        $remainder = $count - $limit;
        if ($limit > 0) {
            $summary = elgg_echo('hj:alive:comments:remainder', array($remainder));
        } else {
            $summary = elgg_echo('hj:alive:comments:viewall', array($remainder));
        }
    }
    return elgg_view('hj/comments/list', array('summary' => $summary, 'visible' => $visible, 'hidden' => $hidden));
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:39,代码来源:base.php

示例8: dirname

<?php

/**
 * Tidypics full view of an image
 * Given a GUID, this page will try and display any entity
 * 
 */
// Load Elgg engine
include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
global $CONFIG;
$prefix = $CONFIG->dbprefix;
$max = 24;
//find timestamps for first and last days of this month
$time_info = new stdClass();
$time_info->start = mktime(0, 0, 0, date("m"), 1, date("Y"));
$time_info->end = mktime();
//this works but is wildly inefficient
//$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
$sql = "SELECT ent.guid, count( * ) AS views\n\t\t\tFROM " . $prefix . "entities ent\n\t\t\tINNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id\n\t\t\tAND sub.subtype = 'image'\n\t\t\tINNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid AND ann1.owner_guid != ent.owner_guid\n\t\t\tINNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id\n\t\t\tAND ms.string = 'tp_view'\n\t\t\tWHERE ann1.time_created BETWEEN {$time_info->start} AND {$time_info->end}\n\t\t\tGROUP BY ent.guid\n\t\t\tORDER BY views DESC\n\t\t\tLIMIT {$max}";
$result = get_data($sql);
$entities = array();
foreach ($result as $entity) {
    $entities[] = get_entity($entity->guid);
}
tidypics_mostviewed_submenus();
$title = elgg_echo("tidypics:mostviewedthismonth");
$area2 = elgg_view_title($title);
$area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
page_draw($title, $body);
开发者ID:pleio,项目名称:tidypics,代码行数:30,代码来源:mostviewedimagesthismonth.php

示例9: list_notable_entities

/**
 * Returns a viewable list of entities for a given time period.
 *
 * @see elgg_view_entity_list
 *
 * @param int     $start_time     The start time as a unix timestamp.
 * @param int     $end_time       The end time as a unix timestamp.
 * @param string  $type           The type of entity (eg "user", "object" etc)
 * @param string  $subtype        The arbitrary subtype of the entity
 * @param int     $owner_guid     The GUID of the owning user
 * @param int     $limit          The number of entities to return; 10 by default
 * @param boolean $fullview       Whether or not to display the full view (default: true)
 * @param boolean $listtypetoggle Whether or not to allow gallery view
 * @param boolean $navigation     Display pagination? Default: true
 *
 * @return string A viewable list of entities
 * @access private
 * @deprecated 1.9
 */
function list_notable_entities($start_time, $end_time, $type = "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = false, $navigation = true)
{
    elgg_deprecated_notice('list_notable_entities() has been deprecated', 1.9);
    $offset = (int) get_input('offset');
    $count = get_notable_entities($start_time, $end_time, $type, $subtype, $owner_guid, "", $limit, $offset, true);
    $entities = get_notable_entities($start_time, $end_time, $type, $subtype, $owner_guid, "", $limit, $offset);
    return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $listtypetoggle, $navigation);
}
开发者ID:nhunaro,项目名称:Elgg,代码行数:27,代码来源:deprecated-1.9.php

示例10: array

<?php

// generate a div which includes all the recommended groups
$search_options = array('type' => 'group', 'subtype' => 0, 'offset' => 0, 'limit' => 5, 'joins' => array(), 'wheres' => array());
$search_options['metadata_name_value_pairs'][] = array('name' => 'featured_group', 'value' => 'yes');
$search_options['count'] = false;
$recommended_groups = elgg_get_entities_from_metadata($search_options);
$display_options = array("count" => ZHAOHU_RECOMMENDED_SHOW_LIMIT, "offset" => 0, "limit" => ZHAOHU_RECOMMENDED_SHOW_LIMIT, "full_view" => false, "pagination" => false);
$header_title = elgg_echo("zhaohu:recommended_groups");
$content = "<div id='zhaohu_homepage_recommended_groups' class='zhaohu-homepage-right-sidebar-div'>";
$content .= "<div id='zhaohu_homepage_recommended_groups_header' class='zhaohu-homepage-right-sidebar-div-header'>{$header_title}</div>";
$content .= "<div id='zhaohu_homepage_recommended_groups_content' class='zhaohu-homepage-right-sidebar-div-content'>";
elgg_push_context("recommended_groups");
$list = elgg_view_entity_list($recommended_groups, $display_options);
elgg_pop_context("recommended_groups");
if (!empty($list)) {
    $content .= $list;
} else {
    $content .= elgg_echo('zhaohu:noresults');
}
$content .= "</div>";
$content .= "</div>";
echo $content;
开发者ID:pingwangcs,项目名称:51zhaohu,代码行数:23,代码来源:recommended_groups.php

示例11: elgg_view_form

}
$category_form = elgg_view_form('admin/plugins/filter', array('action' => 'admin/plugins', 'method' => 'get', 'disable_security' => true), array('category' => $show_category, 'category_options' => $categories, 'sort' => $sort));
$sort_options = array('priority' => elgg_echo('admin:plugins:sort:priority'), 'alpha' => elgg_echo('admin:plugins:sort:alpha'), 'date' => elgg_echo('admin:plugins:sort:date'));
// security - only want a defined option
if (!array_key_exists($sort, $sort_options)) {
    $sort = reset($sort_options);
}
$sort_form = elgg_view_form('admin/plugins/sort', array('action' => 'admin/plugins', 'method' => 'get', 'disable_security' => true), array('sort' => $sort, 'sort_options' => $sort_options, 'category' => $show_category));
$buttons = "<div class=\"clearfix mbm\">";
$buttons .= elgg_view_form('admin/plugins/change_state', array('action' => 'action/admin/plugins/activate_all', 'class' => 'float'), array('guids' => $guids, 'action' => 'activate'));
$buttons .= elgg_view_form('admin/plugins/change_state', array('action' => 'action/admin/plugins/deactivate_all', 'class' => 'float'), array('guids' => $guids, 'action' => 'deactivate'));
$buttons .= "</div>";
$buttons .= $category_form . $sort_form;
// construct page header
?>
<div id="content_header" class="mbm clearfix">
	<div class="content-header-options"><?php 
echo $buttons;
?>
</div>
</div>

<div id="elgg-plugin-list">
<?php 
$options = array('limit' => 0, 'full_view' => true, 'list_type_toggle' => false, 'pagination' => false);
if ($show_category == 'all' && $sort == 'priority') {
    $options['display_reordering'] = true;
}
echo elgg_view_entity_list($plugin_list, $options);
?>
</div>
开发者ID:redvabel,项目名称:Vabelgg,代码行数:31,代码来源:plugins.php

示例12: elgg_ajax_gatekeeper

<?php

use hypeJunction\Inbox\Inbox;
elgg_ajax_gatekeeper();
$user = elgg_get_logged_in_user_entity();
$inbox = new Inbox();
$inbox->setOwner($user)->displayThreaded(true);
$count = $inbox->getCount();
$messages = $inbox->getMessages();
$latest_messages = array();
// Fix for 'GROUP_BY' statememtn returning wrong order
foreach ($messages as $msg) {
    $lastMsg = $msg->getVolatileData('select:lastMsg');
    if ($lastMsg && $lastMsg != $msg->guid) {
        $latest_messages[] = get_entity($lastMsg);
    } else {
        $latest_messages[] = $msg;
    }
}
$messages = $latest_messages;
$unread = Inbox::countUnread($user);
elgg_push_context('widgets');
$list = elgg_view_entity_list($messages, array('list_class' => 'elgg-list-inbox', 'no_results' => elgg_echo('inbox:empty'), 'full_view' => false, 'size' => 'tiny', 'threaded' => false, 'pagination' => false, 'threaded' => true));
elgg_pop_context();
echo json_encode(array('list' => $list, 'unread' => $unread, 'count' => $count));
开发者ID:hypejunction,项目名称:hypeinbox,代码行数:25,代码来源:load.php

示例13: elgg_ajax_gatekeeper

<?php

/**
 * Display a list of notification subjects
 */
elgg_ajax_gatekeeper();
$guid = elgg_extract('guid', $vars);
$notification = get_entity($guid);
if (!$notification instanceof ElggNotification) {
    forward('', '403');
}
$content = elgg_view_entity_list($notification->getSubjects());
echo elgg_format_element('div', ['class' => 'notifier-lightbox-wrapper'], $content);
开发者ID:hypeJunction,项目名称:elgg-notifier,代码行数:13,代码来源:subjects.php

示例14: elgg_view

$folder_content = '';
if (empty($offset)) {
    $folder_content = elgg_view('file_tools/breadcrumb', ['entity' => $folder]);
    $sub_folders = file_tools_get_sub_folders($folder);
    if (empty($sub_folders)) {
        $sub_folders = [];
    }
    $entities = array_merge($sub_folders, $files);
} else {
    $entities = $files;
}
$files_content = '';
if (!empty($entities)) {
    $params = ['full_view' => false, 'pagination' => false];
    elgg_push_context('file_tools_selector');
    $files_content = elgg_view_entity_list($entities, $params);
    elgg_pop_context();
}
if (empty($files_content)) {
    $files_content = elgg_echo('file_tools:list:files:none');
} else {
    if ($show_more) {
        $more = elgg_view('input/button', ['value' => elgg_echo('file_tools:show_more'), 'class' => 'elgg-button-action', 'id' => 'file-tools-show-more-files']);
        $more .= elgg_view('input/hidden', ['name' => 'offset', 'value' => $limit + $offset]);
        if (!empty($folder)) {
            $more .= elgg_view('input/hidden', ['name' => 'folder_guid', 'value' => $folder->getGUID()]);
        } else {
            $more .= elgg_view('input/hidden', ['name' => 'folder_guid', 'value' => '0']);
        }
        $files_content .= elgg_format_element('div', ['id' => 'file-tools-show-more-wrapper', 'class' => 'center'], $more);
    }
开发者ID:coldtrick,项目名称:file_tools,代码行数:31,代码来源:files.php

示例15: elgg_get_page_owner_entity

<?php

/**
 * Group blog module
 */
$group = elgg_get_page_owner_entity();
if ($group->forums_enable == "no") {
    return true;
}
$all_link = elgg_view('output/url', array('href' => "forum/group/{$group->guid}", 'text' => elgg_echo('link:view:all'), 'is_trusted' => true));
$topics = hj_forum_get_latest_topics($group->guid, 5, false, true);
if (!$topics) {
    $content = '<p>' . elgg_echo("hj:framework:list:empty") . '</p>';
} else {
    elgg_push_context('widgets');
    $content = elgg_view_entity_list($topics, array('full_view' => false));
    elgg_pop_context();
}
echo elgg_view('groups/profile/module', array('title' => elgg_echo('hj:forum:group'), 'content' => $content, 'all_link' => $all_link, 'add_link' => false));
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:19,代码来源:group_module.php


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