本文整理汇总了PHP中page_draw函数的典型用法代码示例。如果您正苦于以下问题:PHP page_draw函数的具体用法?PHP page_draw怎么用?PHP page_draw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page_draw函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
/**
* Forgotten password function.
*
* @package Elgg
* @subpackage Core
* @author Curverider Ltd
* @link http://elgg.org/
*/
require_once dirname(dirname(__FILE__)) . "/engine/start.php";
if (!isloggedin()) {
$body = elgg_view_title(elgg_echo('user:password:lost')) . elgg_view("account/forms/forgotten_password");
page_draw(elgg_echo('user:password:lost'), elgg_view_layout("one_column", $body));
} else {
forward();
}
示例2: dirname
<?php
/**
* Elgg add a collection of friends
*
* @package Elgg
* @subpackage Core
* @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.org/
*/
// Start engine
require_once dirname(dirname(__FILE__)) . "/engine/start.php";
// You need to be logged in for this one
gatekeeper();
//set the title
$area1 = elgg_view_title(elgg_echo('friends:collectionedit'), false);
//grab the collection id passed to the edit form
$collection_id = get_input('collection');
//get the full collection
$collection = get_access_collection($collection_id);
//get all members of the collection
$collection_members = get_members_of_access_collection($collection_id);
$area2 = elgg_view('friends/forms/edit', array('collection' => $collection, 'collection_members' => $collection_members));
// Format page
$body = elgg_view_layout('two_column_left_sidebar', $area1 . $area2);
// Draw it
page_draw(elgg_echo('friends:add'), $body);
示例3: dirname
<?php
/**
* Elgg Mediawiki integration plugin
*
* @package Mediawiki
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Kevin Jardine <kevin.jardine@surevine.com>
* @copyright Surevine Limited 2009
* @link http://www.surevine.com/
*/
// Load Elgg engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
// logout landing page with an invisible iframe logging the user out of Mediawiki
$mediawiki_url = get_plugin_setting('url', 'mediawiki');
$mediawiki_logout_url = $mediawiki_url . 'index.php?title=Special:UserLogout&returnto=Main_Page';
$iframe = '<IFRAME id="logout_iframe" SRC="' . $mediawiki_logout_url . '" WIDTH="0" HIEGHT="0" FRAMEBORDER="0"></IFRAME>';
$title = elgg_echo('mediawiki:logout:title');
$body = '<div class="contentWrapper">' . elgg_echo('mediawiki:logout:description') . '</div>' . $iframe;
page_draw($title, elgg_view_layout("two_column_left_sidebar", '', elgg_view_title($title) . $body, elgg_view("account/forms/login")));
示例4: 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 <kevin@radagast.biz>
* @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));
示例5: dirname
<?php
/**
* Elgg Groups edit a forum topic page
*
* @package ElggGroups
* @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";
gatekeeper();
get_input('group');
$page_owner = set_page_owner((int) get_input('group'));
// check the user is a member of the group
//if (!$page_owner->isMember($_SESSION['user'])) forward();
if (!page_owner_entity() instanceof ElggGroup) {
forward();
}
//get the topic
$topic = get_entity((int) get_input('topic'));
// sort the display
$area2 = elgg_view("forms/forums/edittopic", array('entity' => $topic));
$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
// Display page
page_draw(elgg_echo('groups:edittopic'), $body);
示例6: 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));
示例7: define
* @link http://elgg.org/
*/
// Load Elgg engine
define('externalpage', true);
require_once "../start.php";
global $CONFIG;
// Register the error handler
error_reporting(E_ALL);
set_error_handler('__php_xmlrpc_error_handler');
// Register a default exception handler
set_exception_handler('__php_xmlrpc_exception_handler');
// Set some defaults
$result = null;
set_input('view', 'xml');
// Set default view regardless
// Get the post data
$input = get_post_data();
if ($input) {
// Parse structures from xml
$call = new XMLRPCCall($input);
// Process call
$result = trigger_xmlrpc_handler($call);
} else {
throw new CallException(elgg_echo('xmlrpc:noinputdata'));
}
if (!$result instanceof XMLRPCResponse) {
throw new APIException(elgg_echo('APIException:ApiResultUnknown'));
}
// Output result
page_draw("XML-RPC", elgg_view("xml-rpc/output", array('result' => $result)));
示例8: dirname
/**
* Elgg Message board history page
*
* @package ElggMessageBoard
* @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-2010
* @link http://elgg.com/
*/
// Load Elgg engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
// Get the user who is the owner of the message board
$current_user = $_SESSION['user']->getGUID();
//history is only available for your own wall
$history_user = get_input('user');
// this is the user how has posted on your messageboard that you want to display your history with
// Get any annotations for their message board
// $contents = $entity->getAnnotations('messageboard', 50, 0, 'desc');
$users_array = array($current_user, $history_user);
$contents = get_annotations($users_array, "user", "", "messageboard", $value = "", $users_array, $limit = 10, $offset = 0, $order_by = "desc");
// Get the content to display
$area2 = elgg_view_title(elgg_echo('messageboard:history:title'));
$area2 .= elgg_view("messageboard/messageboard", array('annotation' => $contents));
//$area1 = "<h2>Profile owner: " . $current_user . "</h2>";
//$area1 .= "<h2>User guid: " . $history_user . "</h2>";
//select the correct canvas area
$body = elgg_view_layout("two_column_left_sidebar", '', $area2);
// Display page
page_draw(elgg_echo('messageboard:history:title'), $body);
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:29,代码来源:history.php
示例9: dirname
<?php
/**
* Elgg Reported content
*
* @package ElggReportedContent
* @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/
*/
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
admin_gatekeeper();
set_context('admin');
// Set admin user for user block
set_page_owner($_SESSION['guid']);
$title = elgg_view_title(elgg_echo('reportedcontent'));
$reported = elgg_get_entities(array('types' => 'object', 'subtypes' => 'reported_content', 'limit' => 9999));
$area2 = elgg_view("reportedcontent/listing", array('entity' => $reported));
// Display main admin menu
page_draw(elgg_echo('reportedcontent'), elgg_view_layout("one_column_with_sidebar", $title . $area2));
示例10: dirname
<?php
/**
* Elgg bookmarks plugin inbox 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:inbox'));
set_context('search');
$area2 .= list_entities_from_relationship('share', page_owner(), true, 'object', 'bookmarks');
set_context('bookmarks');
// Format page
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
// Draw it
echo page_draw(elgg_echo('bookmarks:inbox'), $body);
示例11: dirname
* @link http://elgg.com/
*/
// Load Elgg engine
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']);
}
// Get timestamp upper and lower bounds
$timelower = (int) get_input('param2');
$timeupper = (int) get_input('param3');
if (empty($timelower)) {
forward('pg/blog/' . $page_owner->username);
exit;
}
if (empty($timeupper)) {
$timeupper = $timelower + 86400 * 30;
}
// Set blog title
$area2 = elgg_view_title(sprintf(elgg_echo('date:month:' . date('m', $timelower)), date('Y', $timelower)));
// Get a list of blog posts
$area2 .= list_user_objects($page_owner->getGUID(), 'blog', 10, false, false, true, $timelower, $timeupper);
// Get blog tags
// Get blog categories
// Display them in the page
$body = elgg_view_layout("two_column_left_sidebar", '', $area1 . $area2);
// Display page
page_draw(sprintf(elgg_echo('blog:user'), $page_owner->name), $body);
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:30,代码来源:archive.php
示例12: dirname
<?php
/**
* Elgg default_widgets plugin.
*
* @package DefaultWidgets
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU
* @author Milan Magudia & Curverider
* @copyright HedgeHogs.net & Curverider Ltd
*
**/
// load Elgg engine
require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php";
// make sure only admins can view this
admin_gatekeeper();
set_context('admin');
// set admin user for user block
set_page_owner($_SESSION['guid']);
// vars required for action gatekeeper
$ts = time();
$token = generate_action_token($ts);
$context = 'profile';
// create the view
$content = elgg_view("defaultwidgets/editor", array('token' => $token, 'ts' => $ts, 'context' => $context));
// Display main admin menu
page_draw('Default profile widgets for new users', $content);
示例13: admin_gatekeeper
<?php
/**
* Profile Manager
*
* User Profile Fields Config page
*
* @package profile_manager
* @author ColdTrick IT Solutions
* @copyright Coldtrick IT Solutions 2009
* @link http://www.coldtrick.com/
*/
admin_gatekeeper();
global $CONFIG;
set_context('admin');
set_page_owner($_SESSION['guid']);
$title = elgg_view_title(elgg_echo("profile:edit:default"));
$js = elgg_view("profile_manager/js");
$header = elgg_view("profile_manager/profile_fields/header");
$field_add = elgg_view("profile_manager/profile_fields/add");
$cat_add = elgg_view("profile_manager/categories/add");
$type_add = elgg_view("profile_manager/profile_types/add");
$list = elgg_view("profile_manager/profile_fields/list");
$import = elgg_view("profile_manager/profile_fields/import");
$more_info = elgg_view("profile_manager/profile_fields/more_info");
$page_data = $title . $js . $header . $field_add . $cat_add . $type_add . $list . $import . $more_info;
page_draw(elgg_echo("profile:edit:default"), elgg_view_layout("two_column_left_sidebar", "", $page_data));
示例14: 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);
示例15: 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);