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


PHP elgg_pop_breadcrumb函数代码示例

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


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

示例1: groups_handle_all_page

/**
 * List all groups
 */
function groups_handle_all_page()
{
    // all groups doesn't get link to self
    elgg_pop_breadcrumb();
    elgg_push_breadcrumb(elgg_echo('groups'));
    if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) {
        elgg_register_title_button();
    }
    $selected_tab = get_input('filter', 'newest');
    switch ($selected_tab) {
        case 'popular':
            $content = elgg_list_entities_from_relationship_count(array('type' => 'group', 'relationship' => 'member', 'inverse_relationship' => false, 'full_view' => false, 'no_results' => elgg_echo('groups:none')));
            break;
        case 'discussion':
            $content = elgg_list_entities(array('type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', 'limit' => 40, 'full_view' => false, 'no_results' => elgg_echo('discussion:none'), 'distinct' => false, 'preload_containers' => true));
            break;
        case 'featured':
            $content = elgg_list_entities_from_metadata(array('type' => 'group', 'metadata_name' => 'featured_group', 'metadata_value' => 'yes', 'full_view' => false));
            if (!$content) {
                $content = elgg_echo('groups:nofeatured');
            }
            break;
        case 'newest':
        default:
            $content = elgg_list_entities(array('type' => 'group', 'full_view' => false, 'no_results' => elgg_echo('groups:none'), 'distinct' => false));
            break;
    }
    $filter = elgg_view('groups/group_sort_menu', array('selected' => $selected_tab));
    $sidebar = elgg_view('groups/sidebar/find');
    $sidebar .= elgg_view('groups/sidebar/featured');
    $params = array('content' => $content, 'sidebar' => $sidebar, 'filter' => $filter);
    $body = elgg_view_layout('content', $params);
    echo elgg_view_page(elgg_echo('groups:all'), $body);
}
开发者ID:n8b,项目名称:VMN,代码行数:37,代码来源:groups.php

示例2: groups_handle_all_page

/**
 * List all groups
 */
function groups_handle_all_page()
{
    $display_subgroups = elgg_get_plugin_setting('display_subgroups', 'au_subgroups');
    $db_prefix = elgg_get_config('dbprefix');
    // all groups doesn't get link to self
    elgg_pop_breadcrumb();
    elgg_push_breadcrumb(elgg_echo('groups'));
    if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) {
        elgg_register_title_button();
    }
    $gsa_tab = get_input('gsa');
    if ($gsa_tab) {
        switch ($gsa_tab) {
            case 'discussion':
                $options = array('type' => 'object', 'subtype' => 'groupforumtopic', 'no_results' => elgg_echo('discussion:none'));
                $content = elgg_list_entities($options);
                break;
            case 'groups':
                $options = array('type' => 'group', 'inverse_relationship' => false, 'no_results' => elgg_echo('groups:none'));
                $content = elgg_list_entities($options);
                break;
            default:
                // cyu - in theory this should never invoke
                break;
        }
    } else {
        $selected_tab = get_input('filter', 'newest');
        switch ($selected_tab) {
            case 'popular':
                $options = array('type' => 'group', 'relationship' => 'member', 'inverse_relationship' => false, 'full_view' => false, 'no_results' => elgg_echo('groups:none'));
                if ($display_subgroups != 'yes') {
                    $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = 'au_subgroup_of' )");
                }
                $content = elgg_list_entities_from_relationship_count($options);
                break;
            case 'discussion':
                $options = array('type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', 'limit' => 40, 'full_view' => false, 'no_results' => elgg_echo('discussion:none'));
                if ($display_subgroups != 'yes') {
                    $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = 'au_subgroup_of' )");
                }
                $content = elgg_list_entities($options);
                break;
            case 'newest':
            default:
                $options = array('type' => 'group', 'full_view' => false, 'no_results' => elgg_echo('groups:none'));
                if ($display_subgroups != 'yes') {
                    $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = 'au_subgroup_of' )");
                }
                $content = elgg_list_entities($options);
                break;
        }
    }
    // end if clause
    $filter = elgg_view('groups/group_sort_menu', array('selected' => $selected_tab));
    $sidebar = elgg_view('groups/sidebar/find');
    $sidebar .= elgg_view('groups/sidebar/featured');
    $params = array('content' => $content, 'sidebar' => $sidebar, 'filter' => $filter);
    $body = elgg_view_layout('content', $params);
    echo elgg_view_page(elgg_echo('groups:all'), $body);
}
开发者ID:smellems,项目名称:wet4,代码行数:63,代码来源:groups.php

示例3: groups_handle_all_page

/**
 * List all groups
 */
function groups_handle_all_page()
{
    // all groups doesn't get link to self
    elgg_pop_breadcrumb();
    elgg_push_breadcrumb(elgg_echo('groups'));
    elgg_register_title_button();
    $selected_tab = get_input('filter', 'newest');
    switch ($selected_tab) {
        case 'pop':
            $content = elgg_list_entities_from_relationship_count(array('type' => 'group', 'relationship' => 'member', 'inverse_relationship' => false, 'full_view' => false));
            break;
        case 'active':
            $content = elgg_list_entities(array('type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', 'limit' => 40, 'full_view' => false));
            break;
        case 'newest':
        default:
            $content = elgg_list_entities(array('type' => 'group', 'full_view' => false));
            break;
    }
    $filter = elgg_view('groups/group_sort_menu', array('selected' => $selected_tab));
    $sidebar = elgg_view('groups/sidebar/find');
    $sidebar .= elgg_view('groups/sidebar/featured');
    $params = array('content' => $content, 'sidebar' => $sidebar, 'filter' => $filter);
    $body = elgg_view_layout('content', $params);
    echo elgg_view_page(elgg_echo('groups:all'), $body);
}
开发者ID:redvabel,项目名称:Vabelgg,代码行数:29,代码来源:groups.php

示例4: discussion_handle_all_page

/**
 * List all discussion topics
 */
function discussion_handle_all_page()
{
    elgg_pop_breadcrumb();
    elgg_push_breadcrumb(elgg_echo('discussion'));
    $content = elgg_list_entities(array('type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', 'limit' => 20, 'full_view' => false));
    $params = array('content' => $content, 'title' => elgg_echo('discussion:latest'), 'filter' => '');
    $body = elgg_view_layout('content', $params);
    echo elgg_view_page($title, $body);
}
开发者ID:xingcuntian,项目名称:threads,代码行数:12,代码来源:discussion.php

示例5: tblog_get_page_content_list

function tblog_get_page_content_list($guid)
{
    $container_guid = NULL;
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all';
    $options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => FALSE);
    $loggedin_userid = elgg_get_logged_in_user_guid();
    if ($container_guid) {
        // access check for closed groups
        group_gatekeeper();
        $options['container_guid'] = $container_guid;
        $container = get_entity($container_guid);
        if (!$container) {
        }
        $return['title'] = elgg_echo('blog:title:user_blogs', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($container_guid == $loggedin_userid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's posts
                $return['filter_context'] = 'none';
            }
        }
    } else {
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('blogbook:select a blog');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('blog:blogs'));
    }
    //elgg_register_title_button();
    // show all posts for admin or users looking at their own blogs
    // show only published posts for other users.
    if (!(elgg_is_admin_logged_in() || elgg_is_logged_in() && $container_guid == $loggedin_userid)) {
        $options['metadata_name_value_pairs'] = array(array('name' => 'status', 'value' => 'published'));
    }
    $tblog = get_entity($guid);
    $bidlist = explode(",", $tblog->bids);
    foreach ($bidlist as $value) {
        $aBlog = get_entity($value);
        $form_data .= "<input type='checkbox' name='bids[]' value='{$value}' /> {$aBlog->title}<br />";
    }
    $form_data .= "<input type='hidden' name='guid' value='{$guid}' />";
    // TODO the problem is thst $guid is empty
    $form_data .= elgg_view('input/submit', array('value' => elgg_echo('Remove')));
    $list .= elgg_view("input/form", array("body" => $form_data, "action" => "/action/blogbook/remove", "id" => "tblog_insert_form", "class" => "elgg-form-alt"));
    if (!$list) {
        $return['content'] = elgg_echo('blog:none');
    } else {
        $return['content'] = $list;
    }
    return $return;
}
开发者ID:mustafabicer,项目名称:elggplugins,代码行数:56,代码来源:removeblog.php

示例6: blog_get_page_content_list

/**
 * Get page components to list a user's or all blogs.
 *
 * @param int $container_guid The GUID of the page owner or NULL for all blogs
 * @return array
 */
function blog_get_page_content_list($container_guid = NULL)
{
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all';
    $order = get_input('order');
    $order ? $order = $order : ($order = "DESC");
    $order == "DESC" ? $currentSort = elgg_echo('hj:forum:latest') : ($currentSort = elgg_echo('hj:forum:oldest'));
    $options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => false, 'order_by' => 'e.time_created ' . $order);
    $current_user = elgg_get_logged_in_user_entity();
    if ($container_guid) {
        // access check for closed groups
        group_gatekeeper();
        $options['container_guid'] = $container_guid;
        $container = get_entity($container_guid);
        if (!$container) {
        }
        $return['title'] = elgg_echo('blog:title:user_blogs', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($current_user && $container_guid == $current_user->guid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's posts
                $return['filter_context'] = 'none';
            }
        }
        $list = "<div id='filter-dropdown' class='clearfix blog-filter'><span>" . elgg_echo('blog:sort') . "</span><a href=''>" . $currentSort . "</a>\n\t\t\t<ul>\n\t\t\t\t<li>" . elgg_view('output/url', array('href' => 'blog/group/' . $container->guid . '/all?order=DESC', 'text' => '' . elgg_echo('hj:forum:latest') . '')) . "</li>\n\t\t\t\t<li>" . elgg_view('output/url', array('href' => 'blog/group/' . $container->guid . '/all?order=ASC', 'text' => '' . elgg_echo('hj:forum:oldest') . '')) . "</li>\n\t\t\t</ul>\n\t\t</div>";
    } else {
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('blog:title:all_blogs');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('blog:blogs'));
    }
    elgg_register_title_button();
    // show all posts for admin or users looking at their own blogs
    // show only published posts for other users.
    $show_only_published = true;
    if ($current_user) {
        if ($current_user->guid == $container_guid || $current_user->isAdmin()) {
            $show_only_published = false;
        }
    }
    if ($show_only_published) {
        $options['metadata_name_value_pairs'] = array(array('name' => 'status', 'value' => 'published'));
    }
    $list .= elgg_list_entities_from_metadata($options);
    if (!$list) {
        $return['content'] = elgg_echo('blog:none');
    } else {
        $return['content'] = $list;
    }
    return $return;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:62,代码来源:blog.php

示例7: discussion_handle_all_page

/**
 * List all discussion topics
 */
function discussion_handle_all_page()
{
    elgg_pop_breadcrumb();
    elgg_push_breadcrumb(elgg_echo('discussion'));
    $content = elgg_list_entities(array('type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', 'limit' => max(20, elgg_get_config('default_limit')), 'full_view' => false, 'no_results' => elgg_echo('discussion:none'), 'preload_owners' => true));
    $title = elgg_echo('discussion:latest');
    $params = array('content' => $content, 'title' => $title, 'sidebar' => elgg_view('discussion/sidebar'), 'filter' => '');
    $body = elgg_view_layout('content', $params);
    echo elgg_view_page($title, $body);
}
开发者ID:gzachos,项目名称:elgg_ellak,代码行数:13,代码来源:discussion.php

示例8: blog_get_page_content_list

/**
 * Get page components to list a user's or all blogs.
 *
 * @param int $container_guid The GUID of the page owner or NULL for all blogs
 * @return array
 */
function blog_get_page_content_list($container_guid = NULL)
{
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all';
    $options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => false);
    $current_user = elgg_get_logged_in_user_entity();
    if ($container_guid) {
        // access check for closed groups
        group_gatekeeper();
        // COLDTRICK: FIXES listing of users blogs
        $container = get_entity($container_guid);
        if ($container instanceof ElggGroup) {
            $options['container_guid'] = $container_guid;
        } else {
            $options['owner_guid'] = $container_guid;
        }
        $return['title'] = elgg_echo('blog:title:user_blogs', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($current_user && $container_guid == $current_user->guid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's posts
                $return['filter_context'] = 'none';
            }
        }
    } else {
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('blog:title:all_blogs');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('blog:blogs'));
    }
    elgg_register_title_button();
    // show all posts for admin or users looking at their own blogs
    // show only published posts for other users.
    $show_only_published = true;
    if ($current_user) {
        if ($current_user->guid == $container_guid || $current_user->isAdmin()) {
            $show_only_published = false;
        }
    }
    if ($show_only_published) {
        $options['metadata_name_value_pairs'] = array(array('name' => 'status', 'value' => 'published'));
    }
    $list = elgg_list_entities_from_metadata($options);
    if (!$list) {
        $return['content'] = elgg_echo('blog:none');
    } else {
        $return['content'] = $list;
    }
    return $return;
}
开发者ID:pleio,项目名称:subsite_manager,代码行数:61,代码来源:blog.php

示例9: groups_handle_all_page

/**
 * List all groups
 */
function groups_handle_all_page()
{
    $display_subgroups = elgg_get_plugin_setting('display_subgroups', 'au_subgroups');
    $db_prefix = elgg_get_config('dbprefix');
    // all groups doesn't get link to self
    elgg_pop_breadcrumb();
    elgg_push_breadcrumb(elgg_echo('groups'));
    if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) {
        elgg_register_title_button();
    }
    $selected_tab = get_input('filter', 'newest');
    switch ($selected_tab) {
        case 'popular':
            $options = array('type' => 'group', 'relationship' => 'member', 'inverse_relationship' => false, 'full_view' => false);
            if ($display_subgroups != 'yes') {
                $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = '" . AU_SUBGROUPS_RELATIONSHIP . "' )");
            }
            $content = elgg_list_entities_from_relationship_count($options);
            if (!$content) {
                $content = elgg_echo('groups:none');
            }
            break;
        case 'discussion':
            $content = elgg_list_entities(array('type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', 'limit' => 40, 'full_view' => false));
            if (!$content) {
                $content = elgg_echo('discussion:none');
            }
            break;
        case 'featured':
            $content = elgg_list_entities_from_metadata(array('type' => 'group', 'metadata_name' => 'featured_group', 'metadata_value' => 'yes', 'full_view' => false));
            if (!$content) {
                $content = elgg_echo('groups:nofeatured');
            }
            break;
        case 'newest':
        default:
            $options = array('type' => 'group', 'full_view' => false);
            if ($display_subgroups != 'yes') {
                $options['wheres'] = array("NOT EXISTS ( SELECT 1 FROM {$db_prefix}entity_relationships WHERE guid_one = e.guid AND relationship = '" . AU_SUBGROUPS_RELATIONSHIP . "' )");
            }
            $content = elgg_list_entities($options);
            if (!$content) {
                $content = elgg_echo('groups:none');
            }
            break;
    }
    $filter = elgg_view('groups/group_sort_menu', array('selected' => $selected_tab));
    //	$sidebar = elgg_view('groups/sidebar/find');
    //	$sidebar .= elgg_view('groups/sidebar/featured');
    $params = array('content' => $content, 'sidebar' => $sidebar, 'filter' => $filter);
    $body = elgg_view_layout('content', $params);
    echo elgg_view_page(elgg_echo('groups:all'), $body);
}
开发者ID:epsylon,项目名称:Hydra-dev,代码行数:56,代码来源:groups.php

示例10: podcasts_get_page_content_list

/**
 * Get page components to list a user's or all podcast episodes.
 *
 * @param int $container_guid The GUID of the page owner or NULL for all podcasts
 *
 * @return array
 */
function podcasts_get_page_content_list($container_guid = NULL)
{
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all_episodes';
    $options = array('type' => 'object', 'subtype' => 'podcast', 'full_view' => false, 'podcast_list_class' => 'elgg-list-podcast-episodes', 'podcast_item_class' => 'elgg-podcast-episode');
    $current_user = elgg_get_logged_in_user_entity();
    if ($container_guid) {
        // access check for closed groups
        group_gatekeeper();
        $options['container_guid'] = $container_guid;
        $container = get_entity($container_guid);
        if (!$container) {
        }
        $return['title'] = elgg_echo('podcasts:title:owner_podcasts', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($current_user && $container_guid == $current_user->guid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's podcasts
                $return['filter_context'] = 'none';
            }
        }
        // Default feed
        $return['feed_description'] = elgg_echo('podcasts:feed:description', array($container->name));
        elgg_extend_view('page/elements/owner_block', 'podcasts/info_sidebar', 1);
        //$return['sidebar'] = elgg_view('podcasts/info_sidebar');
    } else {
        set_input('show_podcast_container', 1);
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('podcasts:title:allpodcastepisodes');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('podcasts'), 'podcasts/all');
        elgg_push_breadcrumb(elgg_echo('podcasts:filter:allepisodes'));
    }
    elgg_register_title_button();
    $list = elgg_list_entities($options, 'elgg_get_entities_from_metadata', 'podcasts_list');
    if ($list) {
        $return['content'] = $list;
    } else {
        if (elgg_get_viewtype() == 'default') {
            $return['content'] = elgg_echo('podcasts:episodes:none');
        }
    }
    return $return;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:56,代码来源:podcasts.php

示例11: izap_video_get_page_content_list

/**
 * Get page components to list a user's or all izap-videos.
 * 
 * @param integer  $container_guid
 * 
 * @return array   array of content for rendering video list 
 * 
 * @version 5.0
 */
function izap_video_get_page_content_list($container_guid = NULL)
{
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all';
    $options = array('type' => 'object', 'subtype' => GLOBAL_IZAP_VIDEOS_SUBTYPE, 'full_view' => false, 'no_results' => elgg_echo('izap-videos:none'));
    $url_id = elgg_get_logged_in_user_guid();
    $current_user = elgg_get_logged_in_user_entity();
    if ($container_guid) {
        $url_id = $container_guid;
        // access check for closed groups
        izap_group_gatekeeper();
        $options['container_guid'] = $container_guid;
        $container = get_entity($container_guid);
        $return['title'] = elgg_echo('izap-videos:title:user_videos', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($current_user && $container_guid == $current_user->guid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's posts
                $return['filter_context'] = 'none';
            }
        }
    } else {
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('izap-videos:title:all_videos');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('izap-videos'));
    }
    if (elgg_is_logged_in()) {
        $title = 'Add New Video';
    }
    $url = GLOBAL_IZAP_VIDEOS_PAGEHANDLER . '/add/';
    if (izap_is_onserver_enabled_izap_videos() == 'yes') {
        $url .= $url_id . '/onserver';
    } elseif (izap_is_onserver_enabled_izap_videos() == 'youtube') {
        $url .= $url_id . '/youtube';
    } elseif (izap_is_offserver_enabled_izap_videos() == 'yes') {
        $url .= $url_id . '/offserver';
    } else {
        $url .= $url_id . '/offserver';
    }
    elgg_register_menu_item('title', array('name' => elgg_get_friendly_title($title), 'href' => $url, 'text' => $title, 'link_class' => 'elgg-button elgg-button-action'));
    $return['content'] = elgg_list_entities($options);
    return $return;
}
开发者ID:justangel,项目名称:izap-videos,代码行数:58,代码来源:izap-videos.php

示例12: testCrumbTitlesAreEscaped

 public function testCrumbTitlesAreEscaped()
 {
     $this->markTestIncomplete('Needs DB');
     // TODO make this unnecessary
     elgg_set_view_location('output/url', __DIR__ . '/../../../views/');
     elgg_set_view_location('navigation/breadcrumbs', __DIR__ . '/../../../views/');
     elgg_push_breadcrumb('Me < &amp; you');
     $escaped = 'Me &lt; &amp; you';
     $html = elgg_view('navigation/breadcrumbs');
     $this->assertNotFalse(strpos($html, $escaped));
     // links uses different view
     elgg_pop_breadcrumb();
     elgg_push_breadcrumb('Me < &amp; you', 'link');
     $html = elgg_view('navigation/breadcrumbs');
     $this->assertNotFalse(strpos($html, $escaped));
 }
开发者ID:nirajkaushal,项目名称:Elgg,代码行数:16,代码来源:ElggBreadcrumbsTest.php

示例13: blog_get_page_content_list

/**
 * Get page components to list a user's or all blogs.
 *
 * @param int $owner_guid The GUID of the page owner or NULL for all blogs
 * @return array
 */
function blog_get_page_content_list($container_guid = NULL)
{
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all';
    $options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => FALSE);
    $loggedin_userid = elgg_get_logged_in_user_guid();
    if ($container_guid) {
        $options['container_guid'] = $container_guid;
        $container = get_entity($container_guid);
        if (!$container) {
        }
        $return['title'] = elgg_echo('blog:title:user_blogs', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($container_guid == $loggedin_userid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's posts
                $return['filter_context'] = 'none';
            }
        }
    } else {
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('blog:title:all_blogs');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('blog:blogs'));
    }
    elgg_register_title_button();
    // show all posts for admin or users looking at their own blogs
    // show only published posts for other users.
    if (!(elgg_is_admin_logged_in() || elgg_is_logged_in() && $container_guid == $loggedin_userid)) {
        $options['metadata_name_value_pairs'] = array(array('name' => 'status', 'value' => 'published'));
    }
    $list = elgg_list_entities_from_metadata($options);
    if (!$list) {
        $return['content'] = elgg_echo('blog:none');
    } else {
        $return['content'] = $list;
    }
    return $return;
}
开发者ID:redvabel,项目名称:Vabelgg,代码行数:50,代码来源:blog.php

示例14: news_get_page_content_list

/**
 * Get page components to list a user's or all news.
 *
 * @param int $container_guid The GUID of the page owner or null for all news
 * @return array
 */
function news_get_page_content_list($container_guid = null)
{
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all';
    $return['filter'] = '';
    $options = array('type' => 'object', 'subtype' => 'news', 'full_view' => false, 'no_results' => elgg_echo('news:none'), 'preload_owners' => true, 'distinct' => false);
    $current_user = elgg_get_logged_in_user_entity();
    if ($container_guid) {
        // access check for closed groups
        elgg_group_gatekeeper();
        $container = get_entity($container_guid);
        if ($container instanceof ElggGroup) {
            $options['container_guid'] = $container_guid;
        } else {
            $options['owner_guid'] = $container_guid;
        }
        $return['title'] = elgg_echo('news:title:user_news', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($current_user && $container_guid == $current_user->guid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's posts
                $return['filter_context'] = 'none';
            }
        }
    } else {
        $options['preload_containers'] = true;
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('news:title:all_news');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('news:news'));
    }
    if (elgg_is_admin_logged_in() || $container_guid && elgg_instanceof($container, 'group') && ($container->owner_guid == $current_user->guid || check_entity_relationship($current_user->guid, "group_admin", $container->guid))) {
        elgg_register_title_button();
    }
    $return['content'] = elgg_list_entities($options);
    return $return;
}
开发者ID:hypeJunction,项目名称:news,代码行数:48,代码来源:news.php

示例15: blog_get_page_content_list

/**
 * Get page components to list a user's or all blogs.
 *
 * @param int $container_guid The GUID of the page owner or NULL for all blogs
 * @return array
 */
function blog_get_page_content_list($container_guid = NULL)
{
    $return = array();
    $return['filter_context'] = $container_guid ? 'mine' : 'all';
    $options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => false, 'no_results' => elgg_echo('blog:none'), 'preload_owners' => true, 'distinct' => false);
    $current_user = elgg_get_logged_in_user_entity();
    if ($container_guid) {
        // access check for closed groups
        elgg_group_gatekeeper();
        $options['container_guid'] = $container_guid;
        $container = get_entity($container_guid);
        if (!$container) {
        }
        $return['title'] = elgg_echo('blog:title:user_blogs', array($container->name));
        $crumbs_title = $container->name;
        elgg_push_breadcrumb($crumbs_title);
        if ($current_user && $container_guid == $current_user->guid) {
            $return['filter_context'] = 'mine';
        } else {
            if (elgg_instanceof($container, 'group')) {
                $return['filter'] = false;
            } else {
                // do not show button or select a tab when viewing someone else's posts
                $return['filter_context'] = 'none';
            }
        }
    } else {
        $options['preload_containers'] = true;
        $return['filter_context'] = 'all';
        $return['title'] = elgg_echo('blog:title:all_blogs');
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo('blog:blogs'));
    }
    elgg_register_title_button();
    $return['content'] = elgg_list_entities($options);
    return $return;
}
开发者ID:ibou77,项目名称:elgg,代码行数:43,代码来源:blog.php


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