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


PHP elgg_view_menu函数代码示例

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


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

示例1: elgg_view_menu

<div class="inbox-messages-controls">
	<div class="inbox-messages-control-group">
		<?php 
$params = $vars;
$params['sort_by'] = 'priority';
$params['class'] = 'inbox-menu';
echo elgg_view_menu('inbox', $params);
?>
	</div>
</div>
开发者ID:n8b,项目名称:VMN,代码行数:10,代码来源:inbox.php

示例2: array

<?php

/**
 * Elgg long text input
 * Displays a long text input field
 *
 * @package Elgg
 * @subpackage Core
 *
 * @uses $vars['value'] The current value, if any - will be html encoded
 * @uses $vars['disabled'] Is the input field disabled?
 */
$defaults = array('class' => 'elgg-input-longtext', 'id' => 'elgg-input-' . rand());
// work around for deprecation code in elgg_views()
unset($vars['internalname']);
unset($vars['internalid']);
$vars = array_merge($defaults, $vars);
echo elgg_view_menu('longtext', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz', 'id' => $vars['id']));
echo elgg_view('input/plaintext', $vars);
开发者ID:rasul,项目名称:Elgg,代码行数:19,代码来源:longtext.php

示例3: elgg_extract

<?php

$entity = elgg_extract('entity', $vars);
$identifier = elgg_extract('identifier', $vars, 'groups');
$filter_context = elgg_extract('filter_context', $vars, 'index');
$tabs = ['index' => "{$identifier}/edit/{$entity->guid}", 'settings' => "{$identifier}/edit/{$entity->guid}/settings"];
foreach ($tabs as $tab => $url) {
    elgg_register_menu_item('filter', array('name' => "{$identifier}:edit:{$tab}", 'text' => elgg_echo("{$identifier}:edit:{$tab}"), 'href' => elgg_normalize_url($url), 'selected' => $tab == $filter_context));
}
$params = $vars;
$params['sort_by'] = 'priority';
echo elgg_view_menu('filter', $params);
开发者ID:hypeJunction,项目名称:Elgg-group_subtypes,代码行数:12,代码来源:edit.php

示例4: elgg_view_module

        $event_details .= "<li>" . $add_link . "</li>";
    }
    $event_details .= "</ul>";
    $event_details .= "</td></tr>";
}
$event_details .= "</table>";
$body = elgg_view_module("main", "", $event_details);
$body .= elgg_view_module("main", "", elgg_view("event_manager/event/actions", $vars));
if ($event->show_attendees || $event->canEdit()) {
    $body .= elgg_view("event_manager/event/attendees", $vars);
}
if ($event->with_program) {
    $body .= elgg_view("event_manager/program/view", $vars);
}
if ($event->comments_on) {
    $body .= elgg_view_comments($event);
}
$entity_menu = elgg_view_menu("entity", array("entity" => $event, "sort_by" => "priority", "class" => "elgg-menu-hz", "handler" => "event"));
$params = array('entity' => $event, 'title' => false, 'metadata' => $entity_menu, 'subtitle' => $subtitle);
$params = $params + $vars;
$summary = elgg_view('object/elements/summary', $params);
echo elgg_view('object/elements/full', array('summary' => $summary, 'body' => $body));
if ($event->hide_owner_block) {
    ?>
		<style type='text/css'>
			.elgg-sidebar .elgg-owner-block {
				display: none;
			}
		</style>
	<?php 
}
开发者ID:pleio,项目名称:event_manager,代码行数:31,代码来源:view.php

示例5: elgg_extract

<?php

/* @var $entity WizardStep */
$entity = elgg_extract('entity', $vars);
$full_view = (bool) elgg_extract('full_view', $vars);
$entity_menu = '';
if (!elgg_in_context('widgets')) {
    $entity_menu = elgg_view_menu('entity', ['entity' => $entity, 'handler' => 'wizard_step', 'class' => 'elgg-menu-hz', 'sort_by' => 'priority']);
}
if ($full_view) {
    // something
} else {
    $params = ['title' => elgg_view_icon('arrows', ['class' => 'mrs']) . $entity->getDisplayName(), 'content' => $entity->description, 'metadata' => $entity_menu];
    $params = $params + $vars;
    $list_content = elgg_view('object/elements/summary', $params);
    echo elgg_view_image_block('', $list_content);
}
开发者ID:coldtrick,项目名称:wizard,代码行数:17,代码来源:wizard_step.php

示例6: elgg_view_menu

    $profile_actions .= '</div>';
}
$profile_actions = elgg_view_menu('owner_block', array('entity' => $user));
elgg_view('page/elements/owner_block/extend', $vars);
// if admin, display admin links
$admin_links = '';
if (elgg_is_admin_logged_in() && elgg_get_logged_in_user_guid() != elgg_get_page_owner_guid()) {
    $text = elgg_echo('admin:options');
    $admin_links = '<ul class="nav nav-pills nav-stacked">';
    $admin_links .= "<li><a rel=\"toggle\" href=\"#profile-menu-admin\">{$text}&hellip;</a>";
    $admin_links .= '<ul class="profile-admin-menu" id="profile-menu-admin">';
    foreach ($admin as $menu_item) {
        $admin_links .= elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
    }
    $admin_links .= '</ul>';
    $admin_links .= '</li>';
    $admin_links .= '</ul>';
}
// content links
$content_menu = elgg_view_menu('owner_block', array('entity' => elgg_get_page_owner_entity(), 'class' => 'nav nav-pills nav-stacked'));
echo <<<HTML

<div class="col-sm-4">
\t{$icon}
\t{$profile_actions}
\t{$content_menu}
\t{$admin_links}
</div>

HTML
;
开发者ID:epsylon,项目名称:Hydra-dev,代码行数:31,代码来源:owner_block.php

示例7: elgg_extract

<?php

$entity = elgg_extract('entity', $vars);
$filter_context = elgg_extract('filter_context', $vars);
foreach (['icon', 'cover', 'skyscraper'] as $type) {
    if (elgg_media_is_allowed_type($entity, $type)) {
        elgg_register_menu_item('filter', ['name' => $type, 'text' => elgg_echo("media:{$type}"), 'href' => "media/{$entity->guid}/edit/{$type}", 'selected' => $filter_context == $type]);
    }
}
echo elgg_view_menu('filter', ['class' => 'elgg-menu-hz', 'sort_by' => 'priority']);
开发者ID:hypeJunction,项目名称:elgg_media,代码行数:10,代码来源:filter.php

示例8: elgg_view_entity_icon

<?php

/**
 * Group entity view
 *
 * @package ElggGroups
 */
$group = $vars['entity'];
$icon = elgg_view_entity_icon($group, 'tiny', $vars);
$metadata = '';
if (!elgg_in_context('owner_block') && !elgg_in_context('widgets')) {
    // only show entity menu outside of widgets and owner block
    $metadata = elgg_view_menu('entity', array('entity' => $group, 'handler' => 'groups', 'sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
}
if ($vars['full_view']) {
    echo elgg_view('groups/profile/summary', $vars);
} else {
    // brief view
    $params = array('entity' => $group, 'metadata' => $metadata, 'subtitle' => $group->briefdescription);
    $params = $params + $vars;
    $list_body = elgg_view('group/elements/summary', $params);
    echo elgg_view_image_block($icon, $list_body, $vars);
}
开发者ID:cyrixhero,项目名称:Elgg,代码行数:23,代码来源:default.php

示例9: elgg_view

            $answer_link = elgg_view("output/url", array("href" => $poster->getURL(), "text" => $poster->name));
            $answer_text = elgg_echo("questions:answered:correct", array($answer_link, $answer_time));
        } elseif ($latestAnswer = $question->getLatestAnswer()) {
            $poster = $latestAnswer->getOwnerEntity();
            $answer_time = elgg_view_friendly_time($latestAnswer->time_created);
            $answer_link = elgg_view("output/url", array("href" => $poster->getURL(), "text" => $poster->name));
            $answer_text = elgg_echo("questions:answered", array($answer_link, $answer_time));
        } else {
            $answer_text = null;
        }
    }
    $title_text .= elgg_get_excerpt($question->title, 100);
    if ($workflow) {
        $title = elgg_view('questions/workflow/status', array('question' => $question));
    }
    $title .= elgg_view("output/url", array("text" => $title_text, "href" => $url, "is_trusted" => true));
    $subtitle = "{$poster_text} {$date} {$categories}";
    $content = elgg_get_excerpt($question->description);
    $params = array("entity" => $question, "title" => $title, "subtitle" => $subtitle . "<br />" . $answer_text, "tags" => $tags, "content" => $content);
    if ($workflow) {
        $params['metadata'] = elgg_view("questions/workflow/overview", array('question' => $question));
    }
    $list_body = elgg_view("object/elements/summary", $params);
    if (!$workflow) {
        $list_body .= elgg_view_menu("ffd_questions_body", array("sort_by" => "priority", "entity" => $question, "class" => "elgg-menu-hz float-alt"));
        $image_alt = elgg_view_menu("ffd_questions_alt", array("sort_by" => "priority", "entity" => $question));
    } else {
        $image_alt = null;
    }
    echo elgg_view_image_block($poster_icon, $list_body, array("image_alt" => $image_alt, "class" => "ffd-question-list-item"));
}
开发者ID:pleio,项目名称:theme_ffd,代码行数:31,代码来源:question.php

示例10: elgg_view_menu

<?php

/**
 * Body of river item
 *
 * @uses $vars['item']        ElggRiverItem
 * @uses $vars['summary']     Alternate summary (the short text summary of action)
 * @uses $vars['message']     Optional message (usually excerpt of text)
 * @uses $vars['attachments'] Optional attachments (displaying icons or other non-text data)
 * @uses $vars['responses']   Alternate respones (comments, replies, etc.)
 */
$item = $vars['item'];
$menu = elgg_view_menu('river', array('item' => $item, 'sort_by' => 'priority'));
// river item header
$timestamp = elgg_get_friendly_time($item->getPostedTime());
$summary = elgg_extract('summary', $vars, elgg_view('river/elements/summary', array('item' => $vars['item'])));
if ($summary === false) {
    $subject = $item->getSubjectEntity();
    $summary = elgg_view('output/url', array('href' => $subject->getURL(), 'text' => $subject->name, 'class' => 'elgg-river-subject'));
}
$message = elgg_extract('message', $vars, false);
if ($message !== false) {
    $message = "<div class=\"elgg-river-message\">{$message}</div>";
}
$attachments = elgg_extract('attachments', $vars, false);
if ($attachments !== false) {
    $attachments = "<div class=\"elgg-river-attachments\">{$attachments}</div>";
}
$responses = elgg_view('river/elements/responses', $vars);
if ($responses) {
    $responses = "<div class=\"elgg-river-responses\">{$responses}</div>";
开发者ID:duanhv,项目名称:mdg-social,代码行数:31,代码来源:body.php

示例11: elgg_get_context_stack

 <?php 
// capture global state necessary for menus
$state = ['contexts' => elgg_get_context_stack(), 'input' => elgg_get_config("input"), 'page_owner_guid' => elgg_get_page_owner_guid()];
// g = guid, pog = page_owner_guid, c = contexts, m = mac
$guid = (int) get_input("g", 0, false);
$page_owner_guid = (int) get_input("pog", 0, false);
$contexts = (array) get_input("c", [], false);
$mac = get_input("m", "", false);
$input = (array) get_input("i", [], false);
// verify MAC
$data = serialize([$guid, $page_owner_guid, $contexts, $input]);
if (!elgg_build_hmac($data)->matchesToken($mac)) {
    return;
}
$user = get_user($guid);
if (!$user) {
    return;
}
// render view using state as it was in the placeholder view
elgg_set_context_stack($contexts);
elgg_set_config("input", $input);
elgg_set_page_owner_guid($page_owner_guid);
$params = ["entity" => $user, "username" => $user->username, "name" => $user->name];
echo elgg_view_menu("user_hover", $params);
// revert global state
elgg_set_context_stack($state['contexts']);
elgg_set_config("input", $state['input']);
elgg_set_page_owner_guid($state['page_owner_guid']);
开发者ID:epsylon,项目名称:Hydra-dev,代码行数:28,代码来源:contents.php

示例12: elgg_push_context

 * @uses $vars['name_override'] Override name attribute (only use if you are planning to attach custom logic to assigning categories to entities)
 * @uses $vars['value'] An array of category GUIDs that should be checked by default (you can leave this empty if you are passing $vars['entity']
 * @uses $vars['entity'] An entity, which is being edited
 * @uses $vars['multiple'] If set to true, input type will be set to checkbox, otherwise radio
 * @uses $vars['required'] For now, this will be ignored as HTML spec does not provide clear guidelines
 */
elgg_push_context('categories-input');
$entity = elgg_extract('entity', $vars, false);
$name = 'categories';
if (isset($vars['name_override'])) {
    $name = elgg_extract('name_override', $vars);
}
$multiple = elgg_extract('multiple', $vars, hypeCategories()->config->allowsMultipleInput());
$required = elgg_extract('required', $vars, true);
$value = elgg_extract('value', $vars, false);
if (elgg_instanceof($entity)) {
    $batch = hypeCategories()->categories->getItemCategories($entity->guid, array(), true);
    $value = array();
    foreach ($batch as $c) {
        $value[] = $c->guid;
    }
}
$page_owner = elgg_get_page_owner_entity();
if (!elgg_instanceof($page_owner, 'group') || !hypeCategories()->config->allowsGroupCategories()) {
    $page_owner = elgg_get_site_entity();
}
echo elgg_view('input/hidden', array('name' => "{$name}", 'value' => true, 'required' => $required));
echo '<div class="categories-input">';
echo elgg_view_menu('categories', array('entity' => $page_owner, 'sort_by' => 'priority', 'input' => array('name' => $name, 'value' => $value, 'multiple' => $multiple)));
echo '</div>';
elgg_pop_context();
开发者ID:hypejunction,项目名称:hypecategories,代码行数:31,代码来源:category.php

示例13: elgg_view

        echo $vars['url'];
        ?>
mod/vrawa/sidebar/72.png) no-repeat center left; margin-bottom: 5px; padding-left: 20px; padding-top: 5px; padding-bottom: 5px; border-bottom: 1px solid #edeff4;" id="left_menu_dashboard"><h3><a href="<?php 
        echo $vars['url'];
        ?>
settings/user/<?php 
        echo $_SESSION['user']->username;
        ?>
" >Settings</a></h3></div>
	</br>

<?php 
        echo elgg_view('page/elements/comments_block');
    }
}
echo elgg_view('page/elements/owner_block', $vars);
echo elgg_view_menu('page', array('sort_by' => 'name'));
// optional 'sidebar' parameter
if (isset($vars['sidebar'])) {
    echo $vars['sidebar'];
}
// @todo deprecated so remove in Elgg 2.0
// optional second parameter of elgg_view_layout
if (isset($vars['area2'])) {
    echo $vars['area2'];
}
// @todo deprecated so remove in Elgg 2.0
// optional third parameter of elgg_view_layout
if (isset($vars['area3'])) {
    echo $vars['area3'];
}
开发者ID:T4SG,项目名称:Bangalore-Team-5,代码行数:31,代码来源:sidebar.php

示例14: elgg_echo

}
$title = elgg_echo("groups:membershiprequests");
// change page title
if ($group->isPublicMembership()) {
    $title = elgg_echo("group_tools:menu:invitations");
}
elgg_push_breadcrumb(elgg_echo("groups"), "groups/all");
elgg_push_breadcrumb($group->name, $group->getURL());
elgg_push_breadcrumb($title);
elgg_register_menu_item("title", array("name" => "groups:invite", "href" => "groups/invite/" . $group->getGUID(), "text" => elgg_echo("groups:invite"), "link_class" => "elgg-button elgg-button-action"));
$subpage = get_input("subpage");
$offset = (int) get_input("offset");
$limit = (int) get_input("limit", 25);
$dbprefix = elgg_get_config("dbprefix");
elgg_push_context("group_membershipreq");
$menu = elgg_view_menu("filter", array("entity" => $group, "class" => "elgg-menu-hz", "sort_by" => "priority", "handler" => "groups"));
elgg_pop_context();
switch ($subpage) {
    case "invites":
        // invited users
        $options = array("joins" => array("JOIN " . $dbprefix . "users_entity ue ON e.guid = ue.guid"), "type" => "user", "relationship" => "invited", "relationship_guid" => $guid, "offset" => $offset, "limit" => $limit, "count" => true, "order_by" => "ue.name ASC");
        $count = elgg_get_entities_from_relationship($options);
        unset($options["count"]);
        $invitations = elgg_get_entities_from_relationship($options);
        $content = elgg_view("group_tools/membershipreq/invites", array("invitations" => $invitations, "entity" => $group, "offset" => $offset, "limit" => $limit, "count" => $count));
        break;
    case "email_invites":
        // invited emails
        $options = array("selects" => array("SUBSTRING_INDEX(v.string, '|', -1) AS invited_email"), "annotation_name" => "email_invitation", "annotation_owner_guid" => $group->getGUID(), "wheres" => array("(v.string LIKE '%|%')"), "offset" => $offset, "limit" => $limit, "count" => true, "order_by" => "invited_email ASC");
        $count = elgg_get_annotations($options);
        unset($options["count"]);
开发者ID:n8b,项目名称:VMN,代码行数:31,代码来源:membershipreq.php

示例15: elgg_view_friendly_time

if (!$entity || !$commenter) {
    return true;
}
$moderating = false;
if (!$comment->isEnabled() && $entity && $entity->canEdit()) {
    $moderating = true;
}
$friendlytime = elgg_view_friendly_time($comment->time_created);
$commenter_icon = elgg_view_entity_icon($commenter, 'tiny');
$commenter_link = "<a href=\"{$commenter->getURL()}\">{$commenter->name}</a>";
$entity_title = $entity->title ? $entity->title : elgg_echo('untitled');
$entity_link = "<a href=\"{$entity->getURL()}\">{$entity_title}</a>";
$checkbox = elgg_view('input/checkbox', array('name' => 'guid', 'value' => $comment->guid, 'default' => false));
if ($full_view) {
    $anchor = "<a name=\"comment-{$comment->getGUID()}\"></a>";
    $menu = elgg_view_menu('entity', array('entity' => $comment, 'handler' => 'comment', 'sort_by' => 'priority', 'class' => 'elgg-menu-hz float-alt'));
    $comment_text = elgg_view("output/longtext", array('value' => $comment->description, 'class' => 'elgg-inner', 'data-role' => 'comment-text'));
    $body = <<<HTML
{$anchor}
<div class="mbn">
\t{$menu}
\t{$commenter_link}
\t<span class="elgg-subtext">
\t\t{$friendlytime}
\t</span>
\t{$comment_text}
</div>
HTML;
    if ($moderating) {
        $html = elgg_view_image_block($commenter_icon, $body);
        echo elgg_view_image_block($checkbox, $html, array('class' => 'moderated-comment'));
开发者ID:lorea,项目名称:Hydra-dev,代码行数:31,代码来源:comment.php


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