• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP set_page_owner函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: group_leave

/**
 * Web service for leaving a group
 *
 * @param string $username username of author
 * @param string $groupid  GUID of the group
 *
 * @return bool
 */
function group_leave($username, $groupid)
{
    $user = get_user_by_username($username);
    if (!$user) {
        throw new InvalidParameterException('registration:usernamenotvalid');
    }
    $group = get_entity($groupid);
    $return['success'] = false;
    set_page_owner($group->guid);
    if ($user instanceof ElggUser && $group instanceof ElggGroup) {
        if ($group->getOwnerGUID() != elgg_get_logged_in_user_guid()) {
            if ($group->leave($user)) {
                $return['success'] = true;
                $return['message'] = elgg_echo("groups:left");
            } else {
                $return['message'] = elgg_echo("groups:cantleave");
            }
        } else {
            $return['message'] = elgg_echo("groups:cantleave");
        }
    } else {
        $return['message'] = elgg_echo("groups:cantleave");
    }
    return $return;
}
开发者ID:digecon,项目名称:elgg_web_services,代码行数:33,代码来源:group.php


示例2: page_owner

/**
 * Gets the page owner for the current page.
 * @uses $CONFIG
 * @return int|false The current page owner guid (0 if none).
 */
function page_owner()
{
    global $CONFIG;
    $setpageowner = set_page_owner();
    if ($setpageowner !== false) {
        return $setpageowner;
    }
    if ($username = get_input("username")) {
        //if (substr_count($username,'group:')) {
        if (substr_count($username, 'group_')) {
            //preg_match('/group\:([0-9]+)/i',$username,$matches);
            preg_match('/group\\_([0-9]+)/i', $username, $matches);
            $guid = $matches[1];
            if ($entity = get_entity($guid)) {
                return $entity->getGUID();
            }
        }
        if ($user = get_user_by_username($username)) {
            return $user->getGUID();
        }
    }
    if ($owner = get_input("owner_guid")) {
        if ($user = get_entity($owner)) {
            return $user->getGUID();
        }
    }
    if (!empty($CONFIG->page_owner_handlers) && is_array($CONFIG->page_owner_handlers)) {
        foreach ($CONFIG->page_owner_handlers as $handler) {
            if ($guid = $handler()) {
                return $guid;
            }
        }
    }
    return 0;
}
开发者ID:eokyere,项目名称:elgg,代码行数:40,代码来源:pageowner.php


示例3: invitefriends_page_handler

/**
 * Page handler function
 * 
 * @param array $page Page URL segments
 */
function invitefriends_page_handler($page)
{
    gatekeeper();
    elgg_set_context('friends');
    set_page_owner(elgg_get_logged_in_user_guid());
    $title = elgg_echo('friends:invite');
    $body = elgg_view('invitefriends/form');
    $params = array('content' => $body, 'title' => $title);
    $body = elgg_view_layout('one_sidebar', $params);
    echo elgg_view_page($title, $body);
}
开发者ID:redvabel,项目名称:Vabelgg,代码行数:16,代码来源:start.php


示例4: blog_page_handler

/**
 * Dispatches blog pages.
 * To maintain URL backward compatibility, expects old-style URLs like:
 * 	pg/blog/[username/[read|edit|archive|new/[time_start|guid/[time_end|title]]]]
 *
 * Without a username, show all blogs
 * Without an action (read|edit|archive|new), forward to pg/blog/username/read.
 * Without a guid, show all post for that user.
 * Title is ignored
 *
 * If archive, uses time_start/end
 *
 * @todo There is no way to say "show me archive view for all blog posts" with the
 * current URL scheme because $param[0] is the username instead of an action.
 * Could do something hideous like make '*' mean "all users" (since a username can't be *).
 * Can't change the URL scheme because of URL compatibility.
 *
 * @param array $page
 * @return NULL
 */
function blog_page_handler($page)
{
    global $CONFIG;
    elgg_push_breadcrumb(elgg_echo('blog:blogs'), "{$CONFIG->site->url}pg/blog");
    // see if we're showing all or just a user's
    if (isset($page[0]) && !empty($page[0])) {
        $username = $page[0];
        // forward away if invalid user.
        if (!($user = get_user_by_username($username))) {
            register_error('blog:error:unknown_username');
            forward($_SERVER['HTTP_REFERER']);
        }
        set_page_owner($user->getGUID());
        $crumbs_title = sprintf(elgg_echo('blog:owned_blogs'), $user->name);
        $crumbs_url = "{$CONFIG->site->url}pg/blog/{$username}/read";
        elgg_push_breadcrumb($crumbs_title, $crumbs_url);
        $action = isset($page[1]) ? $page[1] : FALSE;
        // yeah these are crap names, but they're used for different things.
        $page2 = isset($page[2]) ? $page[2] : FALSE;
        $page3 = isset($page[3]) ? $page[3] : FALSE;
        switch ($action) {
            case 'read':
                $title = sprintf(elgg_echo('blog:title:user_blogs'), $user->name);
                $content_info = blog_get_page_content_read($user->getGUID(), $page2);
                break;
            case 'new':
            case 'edit':
                //$sidebar = elgg_view('blog/sidebar_edit', array('blog_guid' => $page2));
                $content_info = blog_get_page_content_edit($page2, $page3);
                break;
            case 'archives':
                $content = elgg_view('page_elements/content_header', array('context' => $content, 'type' => 'blog'));
                $content .= blog_get_page_content_archive($user->getGUID(), $page2, $page3);
                break;
            case 'friends':
                $content = elgg_view('page_elements/content_header', array('context' => $content, 'type' => 'blog'));
                $content .= blog_get_page_content_archive($user->getGUID());
                break;
            default:
                forward("pg/blog/{$username}/read/");
                break;
        }
    } else {
        $title = elgg_echo('blog:title:all_blogs');
        $content_info = blog_get_page_content_read();
    }
    $sidebar .= elgg_view('blog/sidebar_menu');
    if (isset($content_info['sidebar'])) {
        $sidebar .= $content_info['sidebar'];
    }
    $content = elgg_view('navigation/breadcrumbs') . $content_info['content'];
    $body = elgg_view_layout('one_column_with_sidebar', $content, $sidebar);
    page_draw($title, $body);
}
开发者ID:adamboardman,项目名称:Elgg,代码行数:74,代码来源:start.php


示例5: page_owner

/**
 * Gets the page owner for the current page.
 * @uses $CONFIG
 * @return int|false The current page owner guid (0 if none).
 */
function page_owner()
{
    global $CONFIG;
    $returnval = NULL;
    $setpageowner = set_page_owner();
    if ($setpageowner !== false) {
        return $setpageowner;
    }
    if (!isset($returnval) && ($username = get_input("username"))) {
        if (substr_count($username, 'group:')) {
            preg_match('/group\\:([0-9]+)/i', $username, $matches);
            $guid = $matches[1];
            if ($entity = get_entity($guid)) {
                $returnval = $entity->getGUID();
            }
        }
        if (!isset($returnval) && ($user = get_user_by_username($username))) {
            $returnval = $user->getGUID();
        }
    }
    if (!isset($returnval) && ($owner = get_input("owner_guid"))) {
        if ($user = get_entity($owner)) {
            $returnval = $user->getGUID();
        }
    }
    if (!isset($returnval) && (!empty($CONFIG->page_owner_handlers) && is_array($CONFIG->page_owner_handlers))) {
        foreach ($CONFIG->page_owner_handlers as $handler) {
            if (!isset($returnval) && ($guid = $handler())) {
                $returnval = $guid;
            }
        }
    }
    if (isset($returnval)) {
        // Check if this is obtainable, forwarding if not.
        /*
         * If the owner entity has been set, but is inaccessible then we forward to the dashboard. This
         * catches a bunch of WSoDs. It doesn't have much of a performance hit since 99.999% of the time the next thing
         * a page does after calling this function is to retrieve the owner entity - which is of course cashed.
         */
        $owner_entity = get_entity($returnval);
        if (!$owner_entity) {
            // Log an error
            error_log(sprintf(elgg_echo('pageownerunavailable'), $returnval));
            // Forward
            forward();
        }
        // set the page owner so if we're called again we don't have to think.
        set_page_owner($returnval);
        return $returnval;
    }
    return 0;
}
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:57,代码来源:pageowner.php


示例6: collections_page_handler

/**
 * Page handler for friends collections
 *
 * @param array $page_elements Page elements
 *
 * @return void
 */
function collections_page_handler($page_elements)
{
    elgg_set_context('friends');
    $base = elgg_get_config('path');
    if (isset($page_elements[0])) {
        if ($page_elements[0] == "add") {
            set_page_owner(elgg_get_logged_in_user_guid());
            collections_submenu_items();
            require_once "{$base}pages/friends/collections/add.php";
        } else {
            $user = get_user_by_username($page_elements[0]);
            if ($user) {
                set_page_owner($user->getGUID());
                if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
                    collections_submenu_items();
                }
                require_once "{$base}pages/friends/collections/view.php";
            }
        }
    }
}
开发者ID:rasul,项目名称:Elgg,代码行数:28,代码来源:users.php


示例7: dirname

 * Elgg Pages
 * 
 * @package ElggPages
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 */
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
gatekeeper();
$page_guid = get_input('page_guid');
$pages = get_entity($page_guid);
if ($pages->container_guid) {
    set_page_owner($pages->container_guid);
} else {
    set_page_owner($pages->owner_guid);
}
if (is_callable('group_gatekeeper')) {
    group_gatekeeper();
}
$limit = (int) get_input('limit', 20);
$offset = (int) get_input('offset');
$page_guid = get_input('page_guid');
$pages = get_entity($page_guid);
add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
$title = $pages->title . ": " . elgg_echo("pages:history");
$area2 = elgg_view_title($title);
$context = get_context();
set_context('search');
$area2 .= list_annotations($page_guid, 'page', $limit, false);
set_context($context);
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:history.php


示例8: dirname

 * Elgg messages inbox page
 * 
 * @package ElggMessages
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd <[email protected]>
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 */
// Load Elgg engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
// You need to be logged in!
gatekeeper();
// Get offset
$offset = get_input('offset', 0);
// Set limit
$limit = 10;
// Get the logged in user, you can't see other peoples messages so use session id
$page_owner = $_SESSION['user'];
set_page_owner($page_owner->getGUID());
// Get the user's inbox, this will be all messages where the 'toId' field matches their guid
$messages = get_entities_from_metadata("toId", $page_owner->getGUID(), "object", "messages", $page_owner->guid, $limit + 1, $offset);
// Set the page title
$area2 = elgg_view_title(elgg_echo("messages:inbox"));
// Display them. The last variable 'page_view' is to allow the view page to know where this data is coming from,
// in this case it is the inbox, this is necessary to ensure the correct display
// $area2 .= elgg_view("messages/view",array('entity' => $messages, 'page_view' => "inbox", 'limit' => $limit, 'offset' => $offset));
$area2 .= elgg_view("messages/forms/view", array('entity' => $messages, 'page_view' => "inbox", 'limit' => $limit, 'offset' => $offset));
// format
$body = elgg_view_layout("two_column_left_sidebar", '', $area2);
// Draw page
page_draw(sprintf(elgg_echo('messages:user'), $page_owner->name), $body);
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:index.php


示例9: get_input

/**
 * Full group profile
 * 
 * @package ElggGroups
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.com/
 */
$group_guid = get_input('group_guid');
set_context('groups');
global $autofeed;
$autofeed = true;
$group = get_entity($group_guid);
if ($group) {
    set_page_owner($group_guid);
    $title = $group->name;
    // Hide some items from closed groups when the user is not logged in.
    $view_all = true;
    $groupaccess = group_gatekeeper(false);
    if (!$groupaccess) {
        $view_all = false;
    }
    $area2 = elgg_view_title($title);
    $area2 .= elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true));
    if ($view_all) {
        //group profile 'items' - these are not real widgets, just contents to display
        $area2 .= elgg_view('groups/profileitems', array('entity' => $group));
        //group members
        $area3 = elgg_view('groups/members', array('entity' => $group));
    } else {
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:31,代码来源:groupprofile.php


示例10: dirname

<?php

/**
 * Elgg flexprofile extended profile
 * 
 * @package FlexProfile
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Kevin Jardine <[email protected]>
 * @copyright Radagast Solutions 2008
 * @link http://radagast.biz/
 */
// Load Elgg engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
global $CONFIG;
// Define context
set_context('groups');
set_page_owner(get_input('group_guid', 0));
$group = page_owner_entity();
$title = friendly_title($group->name);
add_submenu_item(elgg_echo('form:main_profile_link_text'), $group->getUrl(), '0extendedprofile');
$body = elgg_view('flexgroupprofile/extended', array('entity' => $group));
$title = sprintf(elgg_echo('form:extended_profile_title'), $group->name);
page_draw($title, elgg_view_layout("two_column_left_sidebar", '', elgg_view_title($title) . $body));
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:23,代码来源:extended.php


示例11: dirname

 * Elgg file saver
 *
 * @package ElggFile
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.com/
 */
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
gatekeeper();
// Render the file upload page
$file_guid = (int) get_input('file_guid');
$file = get_entity($file_guid);
if (!$file) {
    forward();
}
// Set the page owner
$page_owner = page_owner_entity();
if (!$page_owner) {
    $container_guid = $file->container_guid;
    if ($container_guid) {
        set_page_owner($container_guid);
    }
}
if (!$file->canEdit()) {
    forward();
}
$title = elgg_echo('file:edit');
$area1 = elgg_view_title($title);
$area1 .= elgg_view("file/upload", array('entity' => $file));
$body = elgg_view_layout('one_column_with_sidebar', $area1);
page_draw($title, $body);
开发者ID:adamboardman,项目名称:Elgg,代码行数:31,代码来源:edit.php


示例12: dirname

<?php

/**
 * Friends of friends.
 * 
 * @package friends_of_friends
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Pedro Prez
 * @copyright 2009
 * @link http://www.pedroprez.com.ar/
 */
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
gatekeeper();
set_context('friendsoffriends');
// Get the current page's owner
$page_owner = page_owner_entity();
if ($page_owner === false || is_null($page_owner)) {
    $page_owner = get_loggedin_user();
    set_page_owner(get_loggedin_userid());
}
$title = elgg_view_title(elgg_echo('friendsoffriends'));
// Display main admin menu
$body = friends_of_friends_list_entities($page_owner->getGUID(), 10, true);
page_draw(elgg_echo('friendsoffriends'), elgg_view_layout("two_column_left_sidebar", '', $title . $body));
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:24,代码来源:index.php


示例13: gatekeeper

<?php

/**
 * Elgg user account settings.
 *
 * @package Elgg
 * @subpackage Core
 */
// Only logged in users
gatekeeper();
// Make sure we don't open a security hole ...
if (!elgg_get_page_owner_entity() || !elgg_get_page_owner_entity()->canEdit()) {
    set_page_owner(elgg_get_logged_in_user_guid());
}
$title = elgg_echo('usersettings:user');
$content = elgg_view('core/settings/account');
$params = array('content' => $content, 'title' => $title);
$body = elgg_view_layout('one_sidebar', $params);
echo elgg_view_page($title, $body);
开发者ID:nachopavon,项目名称:Elgg,代码行数:19,代码来源:account.php


示例14: gatekeeper

    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Foobar is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with groups-invite-any.  If not, see <http://www.gnu.org/licenses/>.
*/
gatekeeper();
action_gatekeeper();
$group = get_entity(get_input('entity'));
set_page_owner($group->getGUID());
set_context('groups');
$name = get_input('name');
if ($name) {
    $users = search_for_user($name, get_plugin_setting('maxusers', 'groupsfrommembers'));
    $nusers = search_for_user($name, 0, 0, '', true);
}
$title = elgg_echo("groups:invite");
$area2 = elgg_view_title($title);
$context = get_context();
set_context('groupsfrommembers');
if ($group && $group->canEdit()) {
    $area2 .= elgg_view('forms/groups/invite', array('entity' => $group, 'users' => $users, 'nusers' => $nusers));
} else {
    $area2 .= elgg_echo("groups:noaccess");
}
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:search.php


示例15: groups_page_handler

/**
 * Group page handler
 *
 * @param array $page Array of page elements, forwarded by the page handling mechanism
 */
function groups_page_handler($page)
{
    global $CONFIG;
    if (isset($page[0])) {
        // See what context we're using
        switch ($page[0]) {
            case "new":
                include $CONFIG->pluginspath . "groups/new.php";
                break;
            case "world":
                set_context('groups');
                set_page_owner(0);
                include $CONFIG->pluginspath . "groups/all.php";
                break;
            case "forum":
                set_input('group_guid', $page[1]);
                include $CONFIG->pluginspath . "groups/forum.php";
                break;
            case "owned":
                // Owned by a user
                if (isset($page[1])) {
                    set_input('username', $page[1]);
                }
                include $CONFIG->pluginspath . "groups/index.php";
                break;
            case "member":
                // User is a member of
                if (isset($page[1])) {
                    set_input('username', $page[1]);
                }
                include $CONFIG->pluginspath . "groups/membership.php";
                break;
            case "mine":
                // User is a member of
                set_input('username', $_SESSION['user']->username);
                include $CONFIG->pluginspath . "groups/membership.php";
                break;
            default:
                set_input('group_guid', $page[0]);
                include $CONFIG->pluginspath . "groups/groupprofile.php";
                break;
        }
    }
}
开发者ID:eokyere,项目名称:elgg,代码行数:49,代码来源:start.php


示例16: dirname

<?php

/**
 * Elgg blog add entry page
 * 
 * @package ElggBlog
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd <[email protected]>
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.com/
 */
// Load Elgg engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
gatekeeper();
// Get the current page's owner
$page_owner = page_owner_entity();
if ($page_owner === false || is_null($page_owner)) {
    $page_owner = get_input("group");
    //$page_owner = $_SESSION['user'];
    set_page_owner($page_owner);
}
//set the title
$area1 = elgg_view_title(elgg_echo('blog:addpost'));
// Get the form
$post = new ElggObject();
$post->content_owner = get_input("group");
$area1 .= elgg_view("blog/forms/edit", array('assign_to' => $page_owner));
// Display page
page_draw(elgg_echo('blog:addpost'), elgg_view_layout("edit_layout", $area1));
开发者ID:eokyere,项目名称:elgg,代码行数:29,代码来源:add.php


示例17: get_input

/**
 * iZAP izap_videos
 *
 * @package Elgg videotizer, by iZAP Web Solutions.
 * @license GNU Public License version 3
 * @Contact iZAP Team "<[email protected]>"
 * @Founder Tarun Jangra "<[email protected]>"
 * @link http://www.izap.in/
 * 
 */
// get the video id as input
$video = (int) get_input('guid');
$izap_videos = izapVideoCheck_izap_videos($video);
// make the video owner page owner
set_page_owner($izap_videos->container_guid);
$title = $izap_videos->title;
// get page contents
$video = elgg_view_entity($izap_videos, TRUE);
$area2 .= elgg_view('izap_videos/izapLink');
// get tags and categories
if ($izap_videos->converted == 'yes') {
    $share .= elgg_view('izap_videos/video/elements/share', array('video' => $izap_videos));
}
$area3 = elgg_view('izap_videos/video/elements/related', array('video' => $izap_videos));
$layout = izapAdminSettings_izap_videos('izap_display_page');
switch ($layout) {
    case 'default':
        $body = elgg_view_layout("izap_videos_main_page", $share, $video . $area2, $area3);
        break;
    case 'left':
开发者ID:rimpy,项目名称:izap_videos,代码行数:30,代码来源:play.php


示例18: switch

}
// Group membership - should these be treated with same constants as access permissions?
switch (get_input('membership')) {
    case ACCESS_PUBLIC:
        $group->membership = ACCESS_PUBLIC;
        break;
    default:
        $group->membership = ACCESS_PRIVATE;
}
if ($new_group_flag) {
    $group->access_id = ACCESS_PUBLIC;
}
$group->save();
// group creator needs to be member of new group and river entry created
if ($new_group_flag) {
    set_page_owner($group->guid);
    $group->join($user);
    add_to_river('river/group/create', 'create', $user->guid, $group->guid);
}
// Invisible group support
if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') {
    $visibility = (int) get_input('vis', '', false);
    if ($visibility != ACCESS_PUBLIC && $visibility != ACCESS_LOGGED_IN) {
        $visibility = $group->group_acl;
    }
    if ($group->access_id != $visibility) {
        $group->access_id = $visibility;
        $group->save();
    }
}
// Now see if we have a file icon
开发者ID:nachopavon,项目名称:Elgg,代码行数:31,代码来源:edit.php


示例19: gatekeeper

<?php

/**
 * Elgg friends page
 *
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */
if (!($owner = page_owner_entity())) {
    gatekeeper();
    set_page_owner($_SESSION['user']->getGUID());
    $owner = $_SESSION['user'];
}
$friends = sprintf(elgg_echo("friends:owned"), $owner->name);
$area1 = elgg_view_title($friends);
$area2 = list_entities_from_relationship('friend', $owner->getGUID(), false, 'user', '', 0, 10, false);
$body = elgg_view_layout('two_column_left_sidebar', '', $area1 . $area2);
page_draw($friends, $body);
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:20,代码来源:index.php


示例20: groups_page_handler

/**
 * Group page handler
 *
 * @param array $page Array of page elements, forwarded by the page handling mechanism
 */
function groups_page_handler($page)
{
    global $CONFIG;
    if (isset($page[0])) {
        // See what context we're using
        switch ($page[0]) {
            case 'invitations':
                include $CONFIG->pluginspath . "groups/invitations.php";
                $user_guid = get_loggedin_userid();
                $invitations = elgg_get_entities_from_relationship(array('relationship' => 'membership_request', 'guid' => $user_guid));
                break;
            case "new":
                include $CONFIG->pluginspath . "groups/new.php";
                break;
            case "world":
                set_context('groups');
                set_page_owner(0);
                include $CONFIG->pluginspath . "groups/all.php";
                break;
            case "forum":
                set_input('group_guid', $page[1]);
                include $CONFIG->pluginspath . "groups/forum.php";
                break;
            case "owned":
                // Owned by a user
                if (isset($page[1])) {
                    set_input('username', $page[1]);
                }
                include $CONFIG->pluginspath . "groups/index.php";
                break;
            case "member":
                // User is a member of
                if (isset($page[1])) {
                    set_input('username', $page[1]);
                }
                include $CONFIG->pluginspath . "groups/membership.php";
                break;
            default:
                set_input('group_guid', $page[0]);
                include $CONFIG->pluginspath . "groups/groupprofile.php";
                break;
        }
    }
}
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:49,代码来源:start.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP set_page_title函数代码示例发布时间:2022-05-15
下一篇:
PHP set_page_message函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap