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


PHP list_entities函数代码示例

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


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

示例1: elgg_echo

<?php

// pages on the group index page
//check to make sure this group forum has been activated
if ($vars['entity']->pages_enable != 'no') {
    ?>

<div id="group_tasks_widget">
<h2><?php 
    echo elgg_echo("tasks:group");
    ?>
</h2>
<?php 
    set_context('search');
    $objects = list_entities("object", "tasks", page_owner(), 5, false);
    set_context('tasks');
    $users_tasks_url = $vars['url'] . "pg/tasks/" . page_owner_entity()->username;
    if ($objects) {
        echo $objects;
        echo "<div class=\"forum_latest\"><a href=\"{$users_tasks_url}\">" . elgg_echo('tasks:more') . "</a></div>";
    } else {
        echo "<div class=\"forum_latest\">" . elgg_echo("tasks:nogroup") . "</div>";
    }
    ?>
<br class="clearfloat" />
</div>

<?php 
}
开发者ID:eokyere,项目名称:elgg,代码行数:29,代码来源:groupprofile_tasks.php

示例2: define

<?php

/**
 * Elgg view all blog posts from all users page
 * 
 * @package ElggBlog
 * @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.com/
 */
// Load Elgg engine
define('everyoneblog', 'true');
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
// Get the current page's owner
$page_owner = $_SESSION['user'];
set_page_owner($_SESSION['guid']);
$area2 = elgg_view_title(elgg_echo('blog:everyone'));
$area2 .= list_entities('object', 'blog', 0, 10, false);
// get tagcloud
// $area3 = "This will be a tagcloud for all blog posts";
// Get categories, if they're installed
global $CONFIG;
$area3 = elgg_view('blog/categorylist', array('baseurl' => $CONFIG->wwwroot . 'search/?subtype=blog&tagtype=universal_categories&tag=', 'subtype' => 'blog'));
$body = elgg_view_layout("two_column_left_sidebar", '', $area2, $area3);
// Display page
page_draw(elgg_echo('blog:everyone'), $body);
开发者ID:eokyere,项目名称:elgg,代码行数:27,代码来源:everyone.php

示例3: dirname

 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 * 
 * 
 * TODO: File icons, download & mime types
 */
//require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
if (is_callable('group_gatekeeper')) {
    group_gatekeeper();
}
//set the title
if (page_owner() == $_SESSION['user']) {
    $area2 = elgg_view_title($title = elgg_echo('file:yours'));
} else {
    $area2 = elgg_view_title($title = elgg_echo('files'));
}
// Get objects
set_context('search');
$area2 .= list_entities("object", "file", page_owner(), 10);
set_context('file');
$get_filter = get_filetype_cloud(page_owner());
if ($get_filter) {
    $area1 = $get_filter;
} else {
    $area2 .= elgg_view('page_elements/contentwrapper', array('body' => elgg_echo("file:none")));
}
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
// Finally draw the page
page_draw(sprintf(elgg_echo("file:user"), page_owner_entity()->name), $body);
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:index.php

示例4: add_submenu_item

    add_submenu_item(elgg_echo('pages:all'), $CONFIG->wwwroot . "mod/pages/world.php", 'pageslinksgeneral');
}
if ($owner instanceof ElggEntity && can_write_to_container(0, $owner->guid)) {
    add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . page_owner(), 'pagesactions');
    if ($owner instanceof ElggUser) {
        add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/", 'pagesactions');
    }
}
if (is_callable('group_gatekeeper')) {
    group_gatekeeper();
}
$limit = get_input("limit", 10);
$offset = get_input("offset", 0);
if ($owner instanceof ElggGroup) {
    $title = sprintf(elgg_echo("pages:group"), $owner->name);
} else {
    $title = sprintf(elgg_echo("pages:user"), $owner->name);
}
// Get objects
$context = get_context();
set_context('search');
$objects = list_entities("object", "page_top", page_owner(), $limit, false);
set_context($context);
//get the owners latest welcome message
$welcome_message = get_entities("object", "pages_welcome", $owner->guid, '', 1);
$body = elgg_view_title($title);
$body .= elgg_view("pages/welcome", array('entity' => $welcome_message));
$body .= $objects;
$body = elgg_view_layout('two_column_left_sidebar', '', $body);
// Finally draw the page
page_draw($title, $body);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:index.php

示例5: get_plugin_setting

<?php

if (is_plugin_enabled('pages')) {
    $limit = get_plugin_setting('pages_num_items', 'vazco_mainpage');
    if (!isset($limit) || !$limit) {
        $limit = 10;
    }
    $objects = list_entities("object", "page_top", 0, $limit, false);
    ?>
	<div class="index_box listing_narrow">
		<h2><?php 
    echo elgg_echo("custom:pages");
    ?>
</h2>
		<div class="search_listing">
		<?php 
    if ($objects != '') {
        echo $objects;
    } else {
        echo elgg_echo('vazco_mainpage:pages:nopages');
    }
    ?>
		</div>
	</div>

<?php 
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:27,代码来源:pages.php

示例6: dirname

 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */
// Load Elgg engine
require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
// Set context
set_context('search');
// Get input
$tag = stripslashes(get_input('tag'));
if (!empty($tag)) {
    $title = sprintf(elgg_echo('content_item:content_search_title'), $tag);
    $body = "";
    $body .= elgg_view_title($title);
    // elgg_view_title(sprintf(elgg_echo('searchtitle'),$tag));
    $body .= elgg_view('user/search/startblurb', array('tag' => $tag));
    $offset = (int) get_input('offset');
    $limit = 50;
    $count = (int) search_for_user($tag, 50, 0, '', true);
    $entities = search_for_user($tag, $limit, $offset);
    $body .= elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, false);
    /// The above code instead of the line below
    //$body .= list_user_search($tag);
} else {
    $title = elgg_echo('item:user');
    $body .= elgg_view_title($title);
    $body .= list_entities('user');
}
$body = elgg_view_layout('one_column', $body);
page_draw($title, $body);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:users.php

示例7: list_entities

<style type="text/css">
#pages_widget .pagination {
    display:none;
}
</style>
<?php 
/**
 * Elgg pages widget edit
 *
 * @package ElggPages
 * @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.com/
 */
$num_display = (int) $vars['entity']->pages_num;
$pages = list_entities("object", "page_top", page_owner(), $num_display, false);
$pagesurl = $vars['url'] . "pg/pages/owned/" . page_owner_entity()->username;
$pages .= "<div class=\"pages_widget_singleitem_more\"><a href=\"{$pagesurl}\">" . elgg_echo('pages:more') . "</a></div>";
echo "<div id=\"pages_widget\">" . $pages . "</div>";
开发者ID:eokyere,项目名称:elgg,代码行数:20,代码来源:view.php

示例8: dirname

<?php

/**
 * Elgg administration user system index
 * 
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */
// Get the Elgg framework
require_once dirname(dirname(__FILE__)) . "/engine/start.php";
// Make sure only valid admin users can see this
admin_gatekeeper();
// Set admin user for user block
//set_page_owner($_SESSION['guid']);
// Are we performing a search
$search = get_input('s');
$limit = get_input('limit', 10);
$offset = get_input('offset', 0);
$context = get_context();
$title = elgg_view_title(elgg_echo('admin:user'));
set_context('search');
$result = list_entities('user', '', 0, $limit, false);
set_context('admin');
// Display main admin menu
page_draw(elgg_echo("admin:user"), elgg_view_layout("two_column_left_sidebar", '', $title . elgg_view("admin/user") . $result));
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:27,代码来源:user.php

示例9: set_context

set_context('search');
if ($tag != "") {
    $objects = list_entities_from_metadata('tags', $tag, 'group', "", "", $limit, false);
} else {
    switch ($filter) {
        case "newest":
            $objects = list_entities('group', 'project', 0, $limit, false);
            break;
        case "pop":
            $objects = list_entities_by_relationship_count('member', 'false', 'group', 'project');
            break;
        case "active":
            $objects = list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 40, 0, 0, false, true);
            break;
        case 'default':
            $objects = list_entities('group', "project", 0, $limit, false);
            break;
    }
}
//get a group count
$group_count = get_entities("group", "project", 0, "", 10, 0, true, 0, null);
//DISABLE find groups (Sx: Search by tag needs to be reconstituted or removed from the left side of the people and project lists)
//$area1 = elgg_view("groups/find");
//menu options
$area1 .= elgg_view("groups/side_menu");
//featured groups
$featured_groups = get_entities_from_metadata("featured_group", "yes", "group", "project", 0, 10, false, false, false);
$area1 .= elgg_view("groups/featured", array("featured" => $featured_groups));
set_context($context);
$title = sprintf(elgg_echo("groups:all"), page_owner_entity()->name);
$area2 = elgg_view_title($title);
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:all.php

示例10: dirname

<?php

/**
 * Elgg view all thewire posts from all users page
 * 
 * @package ElggTheWire
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider <info@elgg.com>
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 */
// Load Elgg engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
$area2 = elgg_view_title(elgg_echo("thewire:everyone"));
//add form
$area2 .= elgg_view("thewire/forms/add");
$area2 .= list_entities('object', 'thewire');
// elgg_view("thewire/view",array('entity' => $thewireposts));
$body = elgg_view_layout("two_column_left_sidebar", '', $area2);
// Display page
page_draw(elgg_echo('thewire:everyone'), $body);
开发者ID:eokyere,项目名称:elgg,代码行数:21,代码来源:everyone.php

示例11: list_entities

<?php

/**
 * Elgg vazco_mainpage plugin
 * 
 * @author Michal Zacher [michal.zacher@gmail.com]
 */
if (is_plugin_enabled('groups')) {
    //newest groups
    $groups = list_entities('group', '', 0, 4, false, false, false);
    ?>
 
        <!-- display latest groups -->
	    <div class="index_box group_listing_narrow">
            <h2><?php 
    echo elgg_echo("custom:groups");
    ?>
</h2>
        <?php 
    if (!empty($groups)) {
        echo $groups;
        //this will display groups
    } else {
        echo "<p><?php echo elgg_echo('custom:nogroups'); ?>.</p>";
    }
    ?>
    	</div>
<?php 
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:29,代码来源:groups.php

示例12: tp_mostrecentimages

/**
 * Convenience function for listing recent images
 * 
 * @param int $max
 * @param bool $pagination
 * @return string
 */
function tp_mostrecentimages($max = 8, $pagination = true)
{
    return list_entities("object", "image", 0, $max, false, false, $pagination);
}
开发者ID:rijojoy,项目名称:MyIceBerg,代码行数:11,代码来源:start.php

示例13: dirname

<?php

include_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
$body = list_entities('object', 'companion', 0, 10, false);
$body = elgg_view_layout('two_column_left_sidebar', '', $body);
page_draw("Collections of Educational Resources", $body);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:6,代码来源:index.php

示例14: define

<?php

/**
 * @package Elgg
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Roger Curry, Grid Research Centre [curry@cpsc.ucalgary.ca]
 * @author Tingxi Tan, Grid Research Centre [txtan@cpsc.ucalgary.ca]
 * @link http://grc.ucalgary.ca/
 */
define('everyonepublication', 'true');
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
$page_owner = $_SESSION['user'];
set_page_owner($_SESSION['guid']);
$nav = elgg_view('navigation/pagination', array('baseurl' => $_SERVER['REQUEST_URI'], 'offset' => 0, 'count' => $count, 'limit' => 10, 'word' => 'annoff', 'nonefound' => false));
$area2 .= $nav;
$area2 = elgg_view_title(elgg_echo('publication:everyone'));
set_context('references');
$area2 .= '<div class="contentWrapper">';
$area2 .= list_entities('object', 'publication', 0, 0, false);
$area2 .= '</div>';
set_context('publications');
$area3 = elgg_view('publication/search');
$body = elgg_view_layout("two_column_left_sidebar", '', $area2, $area3);
page_draw(elgg_echo('publication:everyone'), $body);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:24,代码来源:everyone.php

示例15: dirname

/**
 * Generic search viewer
 * Given a GUID, this page will try and display any entity
 * 
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */
// Load Elgg engine
require_once dirname(dirname(__FILE__)) . "/engine/start.php";
// Set context
set_context('search');
// Get input
$tag = stripslashes(get_input('tag'));
if (!empty($tag)) {
    $title = sprintf(elgg_echo('groups:searchtitle'), $tag);
    $body = "";
    $body .= elgg_view_title($title);
    // elgg_view_title(sprintf(elgg_echo('searchtitle'),$tag));
    $body .= elgg_view('group/search/startblurb', array('tag' => $tag));
    $body .= list_group_search($tag);
    //$body = elgg_view_layout('two_column_left_sidebar','',$body);
} else {
    $title = elgg_echo('item:group');
    $body .= elgg_view_title($title);
    $body .= list_entities('groups');
}
$body = elgg_view_layout('two_column_left_sidebar', '', $body);
page_draw($title, $body);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:30,代码来源:groups.php


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