本文整理汇总了PHP中elgg_view_title函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_view_title函数的具体用法?PHP elgg_view_title怎么用?PHP elgg_view_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elgg_view_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jpatchwork_page_handler
function jpatchwork_page_handler($page)
{
if (!isset($page[0])) {
$page[0] = 'sample';
}
elgg_set_context('jpatchwork');
$page_type = $page[0];
switch ($page_type) {
case 'sample':
$area2 = elgg_view_title(elgg_echo('jpatchwork:sample_title'));
// Add the form to this section
elgg_set_viewtype('xml');
$area2 .= elgg_view('jpatchwork/sample');
elgg_set_viewtype('default');
break;
case 'frozenbubble':
$area2 = elgg_view_title(elgg_echo('jpatchwork:frozenbubble_title'));
// Add the form to this section
elgg_set_viewtype('xml');
$area2 .= elgg_view('jpatchwork/frozenbubble');
elgg_set_viewtype('default');
break;
default:
return false;
}
// Format page
$body = elgg_view('page/layouts/one_sidebar', array('content' => $area2));
// Draw it
echo elgg_view_page(elgg_echo('jpatchwork:title'), $body);
return true;
}
示例2: expages_page_handler
/**
* External pages page handler
*
* @param array $page URL segements
* @param string $handler Handler identifier
* @return bool
*/
function expages_page_handler($page, $handler)
{
if ($handler == 'expages') {
expages_url_forwarder($page[1]);
}
$type = strtolower($handler);
$title = elgg_echo("expages:{$type}");
$header = elgg_view_title($title);
$object = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
if ($object) {
$content .= elgg_view('output/longtext', array('value' => $object[0]->description));
} else {
$content .= elgg_echo("expages:notset");
}
$content = elgg_view('expages/wrapper', array('content' => $content));
if (elgg_is_logged_in() || !elgg_get_config('walled_garden')) {
$body = elgg_view_layout('one_column', array('title' => $title, 'content' => $content));
echo elgg_view_page($title, $body);
} else {
elgg_load_css('elgg.walled_garden');
$body = elgg_view_layout('walled_garden', array('content' => $header . $content));
echo elgg_view_page($title, $body, 'walled_garden');
}
return true;
}
示例3: expages_page_handler
/**
* External pages page handler
*
* @param array $page URL segements
* @param string $handler Handler identifier
* @return bool
*/
function expages_page_handler($page, $handler)
{
if ($handler == 'expages') {
expages_url_forwarder($page[1]);
}
$type = strtolower($handler);
$title = elgg_echo("expages:{$type}");
$header = elgg_view_title($title);
$object = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
if ($object) {
$content .= elgg_view('output/longtext', array('value' => $object[0]->description));
} else {
$content .= elgg_echo("expages:notset");
}
$content = elgg_view('expages/wrapper', array('content' => $content));
if (elgg_is_admin_logged_in()) {
elgg_register_menu_item('title', array('name' => 'edit', 'text' => elgg_echo('edit'), 'href' => "admin/appearance/expages?type={$type}", 'link_class' => 'elgg-button elgg-button-action'));
}
if (elgg_is_logged_in() || !elgg_get_config('walled_garden')) {
$body = elgg_view_layout('one_column', array('title' => $title, 'content' => $content));
echo elgg_view_page($title, $body);
} else {
elgg_load_css('elgg.walled_garden');
$body = elgg_view_layout('walled_garden', array('content' => $header . $content));
echo elgg_view_page($title, $body, 'walled_garden');
}
return true;
}
示例4: au_group_tag_menu_page_handler
function au_group_tag_menu_page_handler($page, $identifier)
{
//show the page of search results
// assumes url of group/guid/tag
// if the tag is 'all' then will display a tagcloud
switch ($page[0]) {
case 'group':
$entity = get_entity($page[1]);
if (!elgg_instanceof($entity, 'group') || $entity->au_group_tag_menu_enable == 'no') {
return false;
}
elgg_push_breadcrumb($entity->name, $entity->getURL());
//should be OK if this is empty
$tag = $page[2];
elgg_push_breadcrumb($tag);
if ($tag == "all") {
//show a tag cloud for all group tags
//arbitrarily set to a max of 640 tags - should be enough for anyone :-)
$title = elgg_echo("au_group_tag_menu:tagcloud");
$options = array('container_guid' => $entity->getGUID(), 'type' => 'object', 'threshold' => 0, 'limit' => 640, 'tag_names' => array('tags'));
$thetags = elgg_get_tags($options);
//make it an alphabetical tag cloud, not with most popular first
sort($thetags);
//find the highest tag count for scaling the font
$max = 0;
foreach ($thetags as $key) {
if ($key->total > $max) {
$max = $key->total;
}
}
$content = " ";
//loop through and generate tags so they display nicely
//in the group, not as a dumb search page
foreach ($thetags as $key) {
$url = elgg_get_site_url() . "group_tag_menu/group/" . $entity->getGUID() . "/" . urlencode($key->tag);
$taglink = elgg_view('output/url', array('text' => ' ' . $key->tag, 'href' => $url, 'title' => "{$key->tag} ({$key->total})", 'rel' => 'tag'));
// get the font size for the tag (taken from elgg's own tagcloud code - not sure I love this)
$size = round(log($key->total) / log($max + 0.0001) * 100) + 30;
if ($size < 100) {
$size = 100;
}
// generate the link
$content .= " <a href='{$url}' style='font-size:{$size}%'>" . $key->tag . "</a> ";
}
} else {
//show the results for the selected tag
$title = elgg_echo("au_group_tag_menu:title") . "{$tag}";
$options = array('type' => 'object', 'metadata_name' => 'tags', 'metadata_value' => $tag, 'container_guid' => $entity->guid, 'full_view' => false);
$content = elgg_list_entities_from_metadata($options);
}
//display the page
if (!$content) {
$content = elgg_echo('au_group_tag_menu:noresults');
}
$layout = elgg_view_layout('content', array('title' => elgg_view_title($title), 'content' => $content, 'filter' => false));
echo elgg_view_page($title, $layout);
break;
}
return true;
}
示例5: reportedcontent_page_handler
/**
* Reported content page handler
*
* Serves the add report page
*
* @param array $page Array of page routing elements
*/
function reportedcontent_page_handler($page)
{
// only logged in users can report things
gatekeeper();
$content .= elgg_view_title(elgg_echo('reportedcontent:this'));
$content .= elgg_view_form('reportedcontent/add');
$sidebar = elgg_echo('reportedcontent:instructions');
$params = array('content' => $content, 'sidebar' => $sidebar);
$body = elgg_view_layout('one_sidebar', $params);
echo elgg_view_page(elgg_echo('reportedcontent:this'), $body);
}
示例6: sitepages_get_page_content
/**
* Assembles html for displaying site pages
*
* @param string $page_type
* @return string Formatted html
*/
function sitepages_get_page_content($page_type)
{
$body = elgg_view_title(elgg_echo("sitepages:" . strtolower($page_type)));
$sitepage = sitepages_get_sitepage_object($page_type);
if ($sitepage) {
$body .= elgg_view('page_elements/elgg_content', array('body' => $sitepage->description));
} else {
$body .= elgg_view('page_elements/elgg_content', array('body' => elgg_echo('sitepages:notset')));
}
$content = elgg_view_layout('one_column_with_sidebar', $body);
return $content;
}
示例7: profile_get_user_edit_content
/**
* Dispatch the html for the edit section
*
* @param unknown_type $user
* @param unknown_type $page
* @return string
*/
function profile_get_user_edit_content($user, $page)
{
$section = isset($page[2]) ? $page[2] : 'details';
switch ($section) {
case 'icon':
$content .= elgg_view_title(elgg_echo('profile:edit'));
$content .= elgg_view("profile/editicon", array('entity' => $user));
break;
default:
case 'details':
$content = elgg_view_title(elgg_echo('profile:edit'));
$content .= elgg_view("profile/edit", array('entity' => $user));
break;
}
return $content;
}
示例8: expages_page_handler
/**
* External pages page handler
*
* @param array $page URL segements
* @param string $handler Handler identifier
*/
function expages_page_handler($page, $handler)
{
if ($handler == 'expages') {
expages_url_forwarder($page[1]);
}
$type = strtolower($handler);
$title = elgg_echo("expages:{$type}");
$content = elgg_view_title($title);
$object = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
if ($object) {
$content .= elgg_view('output/longtext', array('value' => $object[0]->description));
} else {
$content .= elgg_echo("expages:notset");
}
$body = elgg_view_layout("one_sidebar", array('content' => $content));
echo elgg_view_page($title, $body);
}
示例9: elgg_load_library
<?php
elgg_load_library('elgg:video');
$guid = get_input('guid');
$video = get_entity($guid);
if (!elgg_instanceof($video, 'object', 'video')) {
register_error(elgg_echo('notfound'));
forward(REFERER);
}
echo elgg_view_title($video->title);
/**
* Display video info
*/
$filepath = $video->getFilenameOnFilestore();
$rows = array(array('guid', $video->getGUID()), array(elgg_echo('video:location'), $filepath), array(elgg_echo('video:resolution'), $video->resolution), array(elgg_echo('video:bitrate'), $video->bitrate), array(elgg_echo('video:size'), filesize($filepath)));
$table = elgg_view('output/table', array('rows' => $rows, 'table_class' => 'elgg-table-alt'));
echo elgg_view_module('inline', elgg_echo('video:info'), $table);
/**
* Dispaly summary of different video versions
*/
$headers = array(elgg_echo('video:format'), elgg_echo('video:size'), elgg_echo('video:resolution'), elgg_echo('video:bitrate'), elgg_echo('video:location'), elgg_echo('video:status'), '');
$rows = array();
$total_size = 0;
foreach ($video->getSources() as $source) {
$delete_link = elgg_view('output/confirmlink', array('href' => "action/video/delete_format?guid={$source->getGUID()}", 'text' => elgg_echo('delete')));
$file = $source->getFilenameOnFilestore();
if (file_exists($file)) {
$filesize = filesize($file);
} else {
$filesize = "-";
}
示例10: dirname
<?php
/**
* Tidypics full view of an image
* Given a GUID, this page will try and display any entity
*
*/
// Load Elgg engine
include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
global $CONFIG;
$prefix = $CONFIG->dbprefix;
$max = 24;
//find timestamps for first and last days of this month
$time_info = new stdClass();
$time_info->start = mktime(0, 0, 0, date("m"), 1, date("Y"));
$time_info->end = mktime();
//this works but is wildly inefficient
//$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
$sql = "SELECT ent.guid, count( * ) AS views\n\t\t\tFROM " . $prefix . "entities ent\n\t\t\tINNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id\n\t\t\tAND sub.subtype = 'image'\n\t\t\tINNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid AND ann1.owner_guid != ent.owner_guid\n\t\t\tINNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id\n\t\t\tAND ms.string = 'tp_view'\n\t\t\tWHERE ann1.time_created BETWEEN {$time_info->start} AND {$time_info->end}\n\t\t\tGROUP BY ent.guid\n\t\t\tORDER BY views DESC\n\t\t\tLIMIT {$max}";
$result = get_data($sql);
$entities = array();
foreach ($result as $entity) {
$entities[] = get_entity($entity->guid);
}
tidypics_mostviewed_submenus();
$title = elgg_echo("tidypics:mostviewedthismonth");
$area2 = elgg_view_title($title);
$area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
page_draw($title, $body);
示例11: 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);
示例12: 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 <info@elgg.com>
* @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);
示例13: foreach
<?php
global $NOTIFICATION_HANDLERS;
foreach ($NOTIFICATION_HANDLERS as $method => $foo) {
$subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => $vars['user']->guid, 'types' => 'group', 'limit' => 99999));
$tmparray = array();
if ($subsbig[$method]) {
foreach ($subsbig[$method] as $tmpent) {
$tmparray[] = $tmpent->guid;
}
}
$subsbig[$method] = $tmparray;
}
echo elgg_view_title(elgg_echo('notifications:subscriptions:changesettings:groups'));
?>
<div class="notification_groups margin_top">
<?php
echo elgg_view('notifications/subscriptions/jsfuncs', $vars);
?>
<p>
<?php
echo elgg_echo('notifications:subscriptions:groups:description');
?>
</p>
<?php
if (isset($vars['groups']) && !empty($vars['groups'])) {
?>
<table id="notificationstable" cellspacing="0" cellpadding="4" border="0" width="100%">
<tr>
<td> </td>
示例14: elgg_echo
} else {
if (empty($objecttype)) {
$objecttype = 'object';
}
$itemtitle = 'item:' . $objecttype;
if (!empty($subtype)) {
$itemtitle .= ':' . $subtype;
}
$itemtitle = elgg_echo($itemtitle);
$title = sprintf(elgg_echo('advancedsearchtitle'), $itemtitle, $tag);
}
global $CONFIG;
$tagSearch = false;
if (strpos(current_page_url(), $CONFIG->wwwroot . 'tag') > -1 || strpos(current_page_url(), $CONFIG->wwwroot . 'search/?tag') > -1) {
$tagSearch = true;
}
if (!empty($tag)) {
$body = "";
$body .= elgg_view_title($title);
// elgg_view_title(sprintf(elgg_echo('searchtitle'),$tag));
//the custom search doesn't work with tag searching
if (!$tagSearch) {
$body .= trigger_plugin_hook('search', '', $tag, "");
}
$body .= elgg_view('search/startblurb', array('tag' => $tag));
$body .= list_entities_from_metadata($md_type, $tag, $objecttype, $subtype, $owner_guid_array, 10, false, false);
$body = elgg_view_layout('two_column_left_sidebar', '', $body);
}
if ($tagSearch) {
page_draw($title, $body);
}
示例15: get_input
* Elgg Market Plugin
* @package market
*/
// Get the specified market post
$post = (int) get_input('marketpost');
// If we can get out the market post ...
if ($marketpost = get_entity($post)) {
// Load colorbox
elgg_load_js('lightbox');
elgg_load_css('lightbox');
$category = $marketpost->marketcategory;
elgg_push_breadcrumb(elgg_echo('market:title'), "market/category");
elgg_push_breadcrumb(elgg_echo("market:category:{$category}"), "market/category/{$category}");
elgg_push_breadcrumb($marketpost->title);
// Display it
$content = elgg_view_entity($marketpost, array('full_view' => true));
if (elgg_get_plugin_setting('market_comments', 'market') == 'yes') {
$content .= elgg_view_comments($marketpost);
}
// Set the title appropriately
$title = elgg_echo("market:category") . ": " . elgg_echo("market:category:{$category}");
} else {
// Display the 'post not found' page instead
$content = elgg_view_title(elgg_echo("market:notfound"));
$title = elgg_echo("market:notfound");
}
// Show market sidebar
//$sidebar = elgg_view("market/sidebar");
$params = array('content' => $content, 'title' => $title, 'sidebar' => $sidebar, 'filter' => '', 'header' => '');
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);