本文整理汇总了PHP中page_owner_entity函数的典型用法代码示例。如果您正苦于以下问题:PHP page_owner_entity函数的具体用法?PHP page_owner_entity怎么用?PHP page_owner_entity使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page_owner_entity函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plugins_add_submenus
/**
* Sets up submenus. Triggered on pagesetup.
*
*/
function plugins_add_submenus()
{
global $CONFIG;
$plugins_base = "{$CONFIG->wwwroot}pg/plugins";
if (get_context() == 'admin') {
$title = elgg_echo("plugins:admin:menu");
add_submenu_item($title, "{$plugins_base}/admin/");
return;
}
if (get_context() != "plugins") {
return;
}
$page_owner = page_owner_entity();
if (isloggedin() && page_owner() == get_loggedin_userid()) {
$title = sprintf(elgg_echo("plugins:yours"), elgg_echo('plugins:types:'));
add_submenu_item($title, "{$plugins_base}/developer/{$page_owner->username}");
//add_submenu_item(sprintf(elgg_echo('plugins:yours:friends'),page_owner_entity()->name), $CONFIG->wwwroot . "pg/plugins/". $page_owner->username . "/friends/");
} else {
if (page_owner()) {
$title = sprintf(elgg_echo("plugins:user"), $page_owner->name, elgg_echo('plugins:types:'));
add_submenu_item($title, "{$plugins_base}/developer/{$page_owner->username}");
//if ($page_owner instanceof ElggUser) // This one's for users, not groups
//add_submenu_item(sprintf(elgg_echo('plugins:friends'),$page_owner->name), $CONFIG->wwwroot . "pg/plugins/". $page_owner->username . "/friends/");
}
}
add_submenu_item(elgg_echo('plugins:all'), "{$plugins_base}/all/");
// add upload link when viewing own plugin page
if (get_loggedin_userid() == page_owner()) {
add_submenu_item(elgg_echo('plugins:upload'), "{$plugins_base}/new/project/{$page_owner->username}");
}
}
示例2: file_submenus
/**
* Sets up submenus for the file system. Triggered on pagesetup.
*
*/
function file_submenus()
{
global $CONFIG;
$page_owner = page_owner_entity();
// Group submenu option
if ($page_owner instanceof ElggGroup && get_context() == "groups") {
if ($page_owner->files_enable != "no") {
add_submenu_item(sprintf(elgg_echo("file:group"), $page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username);
}
}
// General submenu options
if (get_context() == "file") {
if ((page_owner() == $_SESSION['guid'] || !page_owner()) && isloggedin()) {
add_submenu_item(sprintf(elgg_echo("file:yours"), $page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username);
add_submenu_item(sprintf(elgg_echo('file:yours:friends'), $page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username . "/friends/");
} else {
if (page_owner()) {
add_submenu_item(sprintf(elgg_echo("file:user"), $page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username);
if ($page_owner instanceof ElggUser) {
// This one's for users, not groups
add_submenu_item(sprintf(elgg_echo('file:friends'), $page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username . "/friends/");
}
}
}
add_submenu_item(elgg_echo('file:all'), $CONFIG->wwwroot . "mod/file/world.php");
if (can_write_to_container($_SESSION['guid'], page_owner())) {
add_submenu_item(elgg_echo('file:upload'), $CONFIG->wwwroot . "pg/file/" . $page_owner->username . "/new/");
}
}
}
示例3: bookmarks_pagesetup
function bookmarks_pagesetup()
{
global $CONFIG;
// Set up menu for logged in users
//add submenu options
if (get_context() == "bookmarks") {
if (isloggedin()) {
add_submenu_item(elgg_echo('bookmarks:inbox'), $CONFIG->wwwroot . "pg/bookmarks/" . $_SESSION['user']->username . "/inbox");
if (page_owner()) {
$page_owner = page_owner_entity();
add_submenu_item(sprintf(elgg_echo('bookmarks:read'), $page_owner->name), $CONFIG->wwwroot . "pg/bookmarks/" . $page_owner->username . "/items");
}
if (!$page_owner instanceof ElggGroup) {
add_submenu_item(elgg_echo('bookmarks:friends'), $CONFIG->wwwroot . "pg/bookmarks/" . $_SESSION['user']->username . "/friends");
}
}
//if(!$page_owner instanceof ElggGroup)
// add_submenu_item(elgg_echo('bookmarks:everyone'),$CONFIG->wwwroot."mod/bookmarks/everyone.php");
// Bookmarklet
if (isloggedin() && page_owner() && can_write_to_container(0, page_owner())) {
$page_owner = page_owner_entity();
$bmtext = elgg_echo('bookmarks:bookmarklet');
if ($page_owner instanceof ElggGroup) {
$bmtext = elgg_echo('bookmarks:bookmarklet:group');
}
add_submenu_item($bmtext, $CONFIG->wwwroot . "pg/bookmarks/{$page_owner->username}/bookmarklet");
}
}
$page_owner = page_owner_entity();
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
if ($page_owner->bookmarks_enable != "no") {
add_submenu_item(sprintf(elgg_echo("bookmarks:group"), $page_owner->name), $CONFIG->wwwroot . "pg/bookmarks/" . $page_owner->username . '/items');
}
}
}
示例4: tasks_pagesetup
function tasks_pagesetup()
{
global $CONFIG;
// Set up menu for logged in users
//add submenu options
if (get_context() == "tasks") {
if (isloggedin()) {
if (page_owner()) {
$page_owner = page_owner_entity();
add_submenu_item('table of tasks', $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/table");
add_submenu_item(sprintf(elgg_echo('tasks:read'), $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items");
add_submenu_item(sprintf('open tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/open");
add_submenu_item(sprintf('assigned tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/assigned");
add_submenu_item(sprintf('need more info tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/info");
add_submenu_item(sprintf('in progress tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/progress");
add_submenu_item(sprintf('ready for testing tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/testing");
add_submenu_item(sprintf('closed tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/closed");
}
}
if (!$page_owner instanceof ElggGroup) {
add_submenu_item(elgg_echo('tasks:everyone'), $CONFIG->wwwroot . "mod/tasks/everyone.php");
}
if (isloggedin() && page_owner() && can_write_to_container(0, page_owner())) {
$page_owner = page_owner_entity();
// Ajout de Fx pour créer des tasks vierges
add_submenu_item(sprintf(elgg_echo("tasks:add"), $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . '/add' . '?container_guid=' . $page_owner->getGUID());
}
}
$page_owner = page_owner_entity();
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
if ($page_owner->tasks_enable != "no") {
add_submenu_item(sprintf(elgg_echo("tasks:group"), $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . '/items');
}
}
}
示例5: file_submenus
/**
* Sets up submenus for the file system. Triggered on pagesetup.
*
*/
function file_submenus()
{
global $CONFIG;
$page_owner = page_owner_entity();
// Group submenu option
if ($page_owner instanceof ElggGroup && get_context() == "groups") {
if ($page_owner->files_enable != "no") {
add_submenu_item(sprintf(elgg_echo("file:group"), $page_owner->name), $CONFIG->wwwroot . "pg/file/" . $page_owner->username);
}
}
}
示例6: simplepiegroupplugin_submenus
function simplepiegroupplugin_submenus()
{
global $CONFIG;
#Uncomment to add to user profile
#extend_view('profile/menu/actions', 'simplepiegroupplugin/menu');
if (get_context() == "groups") {
$page_owner = page_owner_entity();
# TODO Get Translation to work
#add_submenu_item(elgg_echo('simplepiegroupplugin:addgroupfeed'), $CONFIG->wwwroot . "mod/simplepiegroupplugin/addfeed.php");
add_submenu_item(elgg_echo('Add RSS Feed'), $CONFIG->wwwroot . "mod/simplepiegroupplugin/addfeed.php?id=" . $page_owner->getGUID());
add_submenu_item(elgg_echo('View Feeds'), $CONFIG->wwwroot . "mod/simplepiegroupplugin/allfeeds.php?id=" . $page_owner->getGUID());
}
}
示例7: flexgroupprofile_pagesetup
function flexgroupprofile_pagesetup()
{
global $CONFIG;
$page_owner = page_owner_entity();
// Group submenu option
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
$form = flexgroupprofile_get_profile_form($page_owner, $page_owner->group_profile_category);
if (!$form->profile_format || $form->profile_format == 'default') {
$title = friendly_title($page_owner->name);
add_submenu_item(elgg_echo('form:extended_profile_link_text'), $CONFIG->wwwroot . 'pg/flexgroupprofile/' . $page_owner->getGUID() . '/' . $title . '/', '0extendedprofile');
}
}
}
示例8: mediawiki_pagesetup
/**
* mediawiki_pagesetup
*
* @return void
*/
function mediawiki_pagesetup()
{
// add to group profile page
$page_owner = page_owner_entity();
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
$group_watchlist = get_plugin_setting('group_watchlist', 'mediawiki');
if (!$group_watchlist || $group_watchlist != 'no') {
$group_profile_display = get_plugin_setting('group_profile_display', 'mediawiki');
if (!$group_profile_display || $group_profile_display == 'left') {
extend_view('groups/left_column', 'mediawiki/watchlist');
} else {
if ($group_profile_display == 'right') {
extend_view('groups/right_column', 'mediawiki/watchlist');
}
}
}
}
}
示例9: groups_from_members_submenus
function groups_from_members_submenus()
{
global $CONFIG;
$page_owner = page_owner_entity();
// Submenu items for all group pages
if ($page_owner instanceof ElggGroup && get_context() == 'groups' && get_loggedin_userid() != $page_owner->getOwner()) {
if (isloggedin() && !isadminloggedin()) {
$context = get_context();
set_context('groupsfrommembers');
if ($page_owner->canEdit()) {
add_submenu_item(elgg_echo('groups:invite'), $CONFIG->wwwroot . "mod/groupsfrommembers/invite.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
if (!$page_owner->isPublicMembership()) {
add_submenu_item(elgg_echo('groups:membershiprequests'), $CONFIG->wwwroot . "mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
}
}
set_context($context);
}
}
}
示例10: friends_of_friends_pagesetup
function friends_of_friends_pagesetup()
{
global $CONFIG;
if (get_context() == "friends" || get_context() == "friendsof" || get_context() == "collections") {
add_submenu_item(elgg_echo('friendsoffriends'), $CONFIG->wwwroot . "pg/friendsoffriends/" . page_owner_entity()->username);
}
if (get_context() == "friendsoffriends") {
add_submenu_item(elgg_echo('friends'), $CONFIG->wwwroot . "pg/friends/" . page_owner_entity()->username);
add_submenu_item(elgg_echo('friends:of'), $CONFIG->wwwroot . "pg/friendsof/" . page_owner_entity()->username);
add_submenu_item(elgg_echo('friendsoffriends'), $CONFIG->wwwroot . "pg/friendsoffriends/" . page_owner_entity()->username);
}
//try delete menu item friendsof
if ($CONFIG->mod->friends_of_friends->config->hidefriendsof) {
if (isset($CONFIG->submenu['a'])) {
foreach ($CONFIG->submenu['a'] as $key => $item) {
if (preg_match('/friendsof\\//', $item->value)) {
unset($CONFIG->submenu['a'][$key]);
}
}
}
}
}
示例11: blog_pagesetup
function blog_pagesetup()
{
global $CONFIG;
//add submenu options
if (get_context() == "blog") {
if ((page_owner() == $_SESSION['guid'] || !page_owner()) && isloggedin()) {
add_submenu_item(elgg_echo('blog:your'), $CONFIG->wwwroot . "pg/blog/" . $_SESSION['user']->username);
add_submenu_item(elgg_echo('blog:friends'), $CONFIG->wwwroot . "pg/blog/" . $_SESSION['user']->username . "/friends/");
add_submenu_item(elgg_echo('blog:everyone'), $CONFIG->wwwroot . "mod/blog/everyone.php");
add_submenu_item(elgg_echo('blog:addpost'), $CONFIG->wwwroot . "mod/blog/add.php");
} else {
if (page_owner()) {
$page_owner = page_owner_entity();
add_submenu_item(sprintf(elgg_echo('blog:user'), $page_owner->name), $CONFIG->wwwroot . "pg/blog/" . $page_owner->username);
if ($page_owner instanceof ElggUser) {
// Sorry groups, this isn't for you.
add_submenu_item(sprintf(elgg_echo('blog:user:friends'), $page_owner->name), $CONFIG->wwwroot . "pg/blog/" . $page_owner->username . "/friends/");
}
add_submenu_item(elgg_echo('blog:everyone'), $CONFIG->wwwroot . "mod/blog/everyone.php");
} else {
add_submenu_item(elgg_echo('blog:everyone'), $CONFIG->wwwroot . "mod/blog/everyone.php");
}
}
if (!defined('everyoneblog') && page_owner()) {
if ($dates = get_entity_dates('object', 'blog', page_owner())) {
foreach ($dates as $date) {
$timestamplow = mktime(0, 0, 0, substr($date, 4, 2), 1, substr($date, 0, 4));
$timestamphigh = mktime(0, 0, 0, (int) substr($date, 4, 2) + 1, 1, substr($date, 0, 4));
if (!isset($page_owner)) {
$page_owner = page_owner_entity();
}
$link = $CONFIG->wwwroot . 'pg/blog/' . $page_owner->username . '/archive/' . $timestamplow . '/' . $timestamphigh;
add_submenu_item(sprintf(elgg_echo('date:month:' . substr($date, 4, 2)), substr($date, 0, 4)), $link, 'filter');
}
}
}
}
}
示例12: 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));
示例13: page_owner_entity
<?php
}
}
?>
<p>
<?php
if ($vars['entity']) {
?>
<input type="hidden" name="group_guid" value="<?php
echo $vars['entity']->getGUID();
?>
" /><?php
}
?>
<input type="hidden" name="user_guid" value="<?php
echo page_owner_entity()->guid;
?>
" />
<input type="submit" class="submit_button" value="<?php
echo elgg_echo("save");
?>
" />
</p>
</form>
</div>
<div class="contentWrapper">
<div id="delete_group_option">
<form action="<?php
示例14: elgg_get_entities
//get the group's files
$files = elgg_get_entities(array('type' => 'object', 'subtype' => 'file', 'container_guid' => $vars['entity']->guid, 'limit' => $number));
//if there are some files, go get them
if ($files) {
//display in list mode
foreach ($files as $f) {
$mime = $f->mimetype;
echo "<div class=\"filerepo_widget_singleitem\">";
echo "<div class=\"filerepo_listview_icon\"><a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a></div>";
echo "<div class=\"filerepo_widget_content\">";
echo "<div class=\"filerepo_listview_title\"><p class=\"filerepo_title\">" . $f->title . "</p></div>";
echo "<div class=\"filerepo_listview_date\"><p class=\"filerepo_timestamp\"><small>" . friendly_time($f->time_created) . "</small></p></div>";
$description = $f->description;
if (!empty($description)) {
echo "<a href=\"javascript:void(0);\" class=\"show_file_desc\">" . elgg_echo('more') . "</a><br /><div class=\"filerepo_listview_desc\">" . $description . "</div>";
}
echo "</div><div class=\"clearfloat\"></div></div>";
}
//get a link to the users files
$users_file_url = $vars['url'] . "pg/file/" . page_owner_entity()->username;
echo "<div class=\"forum_latest\"><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></div>";
} else {
echo "<div class=\"forum_latest\">" . elgg_echo("file:none") . "</div>";
}
?>
<div class="clearfloat" /></div>
</div>
<?php
}
//end of activate check statement
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:31,代码来源:groupprofile_files.php
示例15: elgg_echo
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*/
?>
<div id="content_header" class="clearfloat">
<div class="content_header_title">
<h2><?php
echo elgg_echo("groups:forum");
?>
</h2>
</div>
<?php
// only show the add topic button if the user is a member
if (page_owner_entity()->isMember($vars['user'])) {
?>
<div class="content_header_options">
<a class="action_button" href="<?php
echo $vars['url'];
?>
mod/groups/addtopic.php?group_guid=<?php
echo get_input('group_guid');
?>
"><?php
echo elgg_echo("groups:addtopic");
?>
</a>
</div>
<?php
}