Ejemplo n.º 1
0
/**
 * Get page components to view a blog post.
 *
 * @param int $guid GUID of a blog entity.
 * @return array
 */
function blog_get_page_content_read($guid = NULL)
{
    $return = array();
    $blog = get_entity($guid);
    // no header or tabs for viewing an individual blog
    $return['filter'] = '';
    if (!elgg_instanceof($blog, 'object', 'blog')) {
        $return['content'] = elgg_echo('blog:error:post_not_found');
        return $return;
    }
    $return['title'] = htmlspecialchars($blog->title);
    $container = $blog->getContainerEntity();
    $crumbs_title = $container->name;
    if (elgg_instanceof($container, 'group')) {
        elgg_push_breadcrumb($crumbs_title, "blog/group/{$container->guid}/all");
    } else {
        elgg_push_breadcrumb($crumbs_title, "blog/owner/{$container->username}");
    }
    elgg_push_breadcrumb($blog->title);
    $return['content'] = elgg_view_entity($blog, array('full_view' => true));
    //check to see if comment are on
    if ($blog->comments_on != 'Off') {
        $return['content'] .= elgg_view_comments($blog);
    }
    return $return;
}
Ejemplo n.º 2
0
/**
 * Get page components to view a webinar.
 *
 * @param int $guid GUID of a webinar entity.
 * @return array
 */
function webinar_get_page_content_view($guid)
{
    $return = array();
    $return = array('filter' => '');
    $webinar = get_entity($guid);
    if (!elgg_instanceof($webinar, 'object', 'webinar')) {
        register_error(elgg_echo('webinar:error:not_found'));
        forward(REFERER);
    }
    //set button join, subscribe/unsubscribe and start/top
    webinar_menu_title($guid);
    //set breadcrumb
    $container = $webinar->getContainerEntity();
    $crumbs_title = $container->name;
    if (elgg_instanceof($container, 'group')) {
        elgg_push_breadcrumb($crumbs_title, "webinar/group/{$container->guid}/all");
    } else {
        elgg_push_breadcrumb($crumbs_title, "webinar/owner/{$container->username}");
    }
    //set Title
    $return['title'] = htmlspecialchars($webinar->title);
    elgg_push_breadcrumb($webinar->title);
    $return['content'] .= elgg_view_entity($webinar, array('full_view' => true));
    if ($webinar->comments_on != 'Off') {
        $return['content'] .= elgg_view_comments($webinar);
    }
    $return['sidebar'] = $webinar->getSidebar();
    return $return;
}
Ejemplo n.º 3
0
/**
 * Get page components to view a blog post.
 *
 * @param int $guid GUID of a blog entity.
 * @return array
 */
function blog_get_page_content_read($guid = NULL)
{
    $return = array();
    elgg_entity_gatekeeper($guid, 'object', 'blog');
    $blog = get_entity($guid);
    // no header or tabs for viewing an individual blog
    $return['filter'] = '';
    elgg_set_page_owner_guid($blog->container_guid);
    elgg_group_gatekeeper();
    $return['title'] = $blog->title;
    $container = $blog->getContainerEntity();
    $crumbs_title = $container->name;
    if (elgg_instanceof($container, 'group')) {
        elgg_push_breadcrumb($crumbs_title, "blog/group/{$container->guid}/all");
    } else {
        elgg_push_breadcrumb($crumbs_title, "blog/owner/{$container->username}");
    }
    elgg_push_breadcrumb($blog->title);
    $return['content'] = elgg_view_entity($blog, array('full_view' => true));
    // check to see if we should allow comments
    if ($blog->comments_on != 'Off' && $blog->status == 'published') {
        $return['content'] .= elgg_view_comments($blog);
    }
    return $return;
}
Ejemplo n.º 4
0
/**
 * Get page components to view a podcast
 *
 * @param int $guid GUID of a podcast entity.
 *
 * @return array
 */
function podcasts_get_page_content_view($guid = NULL)
{
    $return = array();
    $podcast = get_entity($guid);
    // no header or tabs for viewing an individual podcast
    $return['filter'] = '';
    if (!elgg_instanceof($podcast, 'object', 'podcast')) {
        register_error(elgg_echo('noaccess'));
        $_SESSION['last_forward_from'] = current_page_url();
        forward('');
    }
    $return['title'] = elgg_echo('podcasts:episode_title', array(podcasts_get_episode_number($podcast), $podcast->title));
    $container = $podcast->getContainerEntity();
    $crumbs_title = $container->name;
    if (elgg_instanceof($container, 'group')) {
        elgg_push_breadcrumb($crumbs_title, "podcasts/group/{$container->guid}/all");
    } else {
        elgg_push_breadcrumb($crumbs_title, "podcasts/owner/{$container->username}");
    }
    elgg_push_breadcrumb($podcast->title);
    $return['content'] = elgg_view_entity($podcast, array('full_view' => true));
    $return['content'] .= elgg_view_comments($podcast);
    $return['layout'] = 'one_sidebar';
    return $return;
}
Ejemplo n.º 5
0
/**
 * Get page components to view a blog post.
 *
 * @param int $guid GUID of a blog entity.
 * @return array
 */
function blog_get_page_content_read($guid = NULL)
{
    $return = array();
    $blog = get_entity($guid);
    // no header or tabs for viewing an individual blog
    $return['filter'] = '';
    if (!elgg_instanceof($blog, 'object', 'blog')) {
        register_error(elgg_echo('noaccess'));
        $_SESSION['last_forward_from'] = current_page_url();
        forward('');
    }
    $return['title'] = $blog->title;
    $container = $blog->getContainerEntity();
    $crumbs_title = $container->name;
    if (elgg_instanceof($container, 'group')) {
        elgg_push_breadcrumb($crumbs_title, "blog/group/{$container->guid}/all");
    } else {
        elgg_push_breadcrumb($crumbs_title, "blog/owner/{$container->username}");
    }
    elgg_push_breadcrumb($blog->title);
    $return['content'] = elgg_view_entity($blog, array('full_view' => true));
    // check to see if we should allow comments
    if ($blog->comments_on != 'Off' && $blog->status == 'published') {
        $return['content'] .= elgg_view_comments($blog);
    }
    return $return;
}
Ejemplo n.º 6
0
Archivo: blog.php Proyecto: remy40/gvrs
/**
 * Get page components to view a blog post.
 *
 * @param int $guid GUID of a blog entity.
 * @return array
 */
function blog_get_page_content_read($guid = NULL)
{
    $return = array();
    $blog = get_entity($guid);
    // no header or tabs for viewing an individual blog
    $return['filter'] = '';
    if (!elgg_instanceof($blog, 'object', 'blog')) {
        $return['content'] = elgg_echo('noaccess');
        return $return;
    }
    $return['title'] = $blog->title;
    $container = $blog->getContainerEntity();
    if (elgg_instanceof($container, 'group')) {
        elgg_pop_breadcrumb();
        elgg_push_breadcrumb(elgg_echo("gvgroups:" . $container->grouptype . "groups"), "groups/" . $container->grouptype);
        elgg_push_breadcrumb($container->name, "blog/group/{$container->guid}/all");
    } else {
        elgg_push_breadcrumb($container->name, "blog/owner/{$container->username}");
    }
    elgg_push_breadcrumb($blog->title);
    $return['content'] = elgg_view_entity($blog, array('full_view' => true));
    //check to see if comment are on
    if ($blog->comments_on != 'Off') {
        $return['content'] .= elgg_view_comments($blog);
    }
    return $return;
}
Ejemplo n.º 7
0
function shoutout_get_view_page($guid)
{
    elgg_extend_view('forms/comments/add', 'shoutout/add_river_flag');
    $title = elgg_echo('shoutout:view_title');
    $shoutout = get_entity($guid);
    if (elgg_instanceof($shoutout, 'object', 'shoutout')) {
        $content = '<div class="shoutout-view-wrapper">' . parse_urls($shoutout->description) . '</div>';
        $content .= shoutout_get_attachment_listing($shoutout);
        $list = shoutout_list_attached_entities($shoutout);
        if ($list) {
            $content .= '<br />' . $list;
        }
        $content .= elgg_view_comments($shoutout);
    } else {
        $content = elgg_echo('shoutout:bad_shoutout');
    }
    elgg_push_breadcrumb(elgg_echo('shoutout:listing_title'), 'shoutout/activity');
    $params = array('title' => $title, 'content' => $content, 'filter' => '');
    $body = elgg_view_layout("content", $params);
    return elgg_view_page($title, $body);
}
Ejemplo n.º 8
0
function polls_get_page_view($guid)
{
    elgg_load_js('elgg.polls');
    $poll = get_entity($guid);
    if (elgg_instanceof($poll, 'object', 'poll')) {
        // Set the page owner
        $page_owner = $poll->getContainerEntity();
        elgg_set_page_owner_guid($page_owner->guid);
        $title = $poll->title;
        $content = elgg_view_entity($poll, array('full_view' => TRUE));
        //check to see if comments are on
        if ($poll->comments_on != 'Off') {
            $content .= elgg_view_comments($poll);
        }
        if ($page_owner instanceof ElggGroup) {
            elgg_push_breadcrumb(elgg_echo("gvgroups:" . $page_owner->grouptype . "groups"), "groups/" . $page_owner->grouptype);
            elgg_push_breadcrumb($page_owner->name, "polls/group/" . $page_owner->guid);
        } else {
            elgg_push_breadcrumb(elgg_echo("menu:home"), "dashboard");
            elgg_push_breadcrumb($page_owner->name, "polls/owner/" . $page_owner->username);
        }
        elgg_push_breadcrumb($poll->title);
    } else {
        // Display the 'post not found' page instead
        $title = elgg_echo("polls:notfound");
        $content = elgg_view("polls/notfound");
        elgg_push_breadcrumb(elgg_echo("menu:home"), "dashboard");
        elgg_push_breadcrumb($title);
    }
    $params = array('title' => $title, 'content' => $content, 'filter' => '');
    $body = elgg_view_layout('content', $params);
    // Display page
    return elgg_view_page($title, $body);
}
Ejemplo n.º 9
0
    // reulctant to just implode with <br /> for styling reasons
    if ($subtitle_element) {
        $subtitle .= '<div>' . $subtitle_element . '</div>';
    }
}
$metadata = '';
if (!elgg_in_context('widgets')) {
    $metadata = elgg_view_menu('entity', array('entity' => $entity, 'handler' => 'events', 'sort_by' => 'priority', 'class' => 'elgg-menu-hz', 'full_view' => $full, 'ts' => $start));
}
if ($full) {
    $title = false;
    $summary = '';
    $content = elgg_view('output/longtext', array('value' => $entity->description));
    $tags = '';
    if (!elgg_is_xhr()) {
        $content .= elgg_view_comments($entity);
    }
} else {
    $title = elgg_view('output/url', array('text' => $entity->getDisplayName(), 'href' => $entity->getURL($start, $calendar->guid)));
    $summary = elgg_get_excerpt($entity->description);
    $tags = false;
    if (elgg_is_xhr()) {
        $summary .= elgg_view('output/longtext', array('value' => elgg_view('output/url', array('text' => elgg_echo('events:full:view'), 'href' => $entity->getURL($start, $calendar->guid), 'is_trusted' => true))));
    }
}
$summary = elgg_view('object/elements/summary', array('entity' => $entity, 'title' => $title, 'subtitle' => $subtitle, 'content' => $summary, 'metadata' => $metadata));
$icon = elgg_view_entity_icon($entity, 'small');
if ($full) {
    echo elgg_view('object/elements/full', array('entity' => $entity, 'summary' => $summary, 'icon' => $icon, 'body' => $content));
} else {
    echo elgg_view_image_block($icon, $summary);
Ejemplo n.º 10
0
<?php

$guid = get_input('guid');
elgg_entity_gatekeeper($guid);
$entity = get_entity($guid);
$title = $entity->title;
$view = elgg_view_entity($entity, array('full_view' => true));
$comments = elgg_view_comments($entity);
$params = array('title' => $title, 'content' => $view . $comments, 'filter' => '');
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
Ejemplo n.º 11
0
/**
 * Get page components to view a video.
 *
 * @param int $guid GUID of a video entity.
 * @return array
 */
function video_get_page_contents_view($guid = null)
{
    $video = get_entity($guid);
    if (!$video) {
        register_error(elgg_echo('noaccess'));
        $_SESSION['last_forward_from'] = current_page_url();
        forward('');
    }
    $owner = elgg_get_page_owner_entity();
    $crumbs_title = $owner->name;
    if (elgg_instanceof($owner, 'group')) {
        elgg_push_breadcrumb($crumbs_title, "video/group/{$owner->guid}/all");
    } else {
        elgg_push_breadcrumb($crumbs_title, "video/owner/{$owner->username}");
    }
    $title = $video->title;
    elgg_push_breadcrumb($title);
    if ($video->conversion_done) {
        $content = elgg_view_entity($video, array('full_view' => true));
        $content .= elgg_view_comments($video);
    } else {
        $string = elgg_echo('video:conversion_pending');
        $content = "<div>{$string}</div>";
    }
    /*
    elgg_register_menu_item('title', array(
    	'name' => 'download',
    	'text' => elgg_echo('video:download'),
    	'href' => "video/download/$video->guid",
    	'link_class' => 'elgg-button elgg-button-action',
    ));
    */
    $params = array('content' => $content, 'title' => $title, 'filter' => '');
    return $params;
}
Ejemplo n.º 12
0
/**
 * View a single page
 *
 * @package ElggPages
 */
$page_guid = get_input('guid');
$page = get_entity($page_guid);
if (!$page) {
    forward();
}
elgg_set_page_owner_guid($page->getContainerGUID());
group_gatekeeper();
$container = elgg_get_page_owner_entity();
if (!$container) {
}
$title = $page->title;
if (elgg_instanceof($container, 'group')) {
    elgg_push_breadcrumb($container->name, "pages/group/{$container->guid}/all");
} else {
    elgg_push_breadcrumb($container->name, "pages/owner/{$container->username}");
}
pages_prepare_parent_breadcrumbs($page);
elgg_push_breadcrumb($title);
$content = elgg_view_entity($page, array('full_view' => true));
$content .= elgg_view_comments($page);
if (elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) {
    $url = "pages/add/{$page->guid}";
    elgg_register_menu_item('title', array('name' => 'subpage', 'href' => $url, 'text' => elgg_echo('pages:newchild'), 'link_class' => 'elgg-button elgg-button-action'));
}
$body = elgg_view_layout('content', array('filter' => '', 'content' => $content, 'title' => $title, 'sidebar' => elgg_view('pages/sidebar/navigation')));
echo elgg_view_page($title, $body);
Ejemplo n.º 13
0
<?php

/* * ************************************************
 * PluginLotto.com                                 *
 * Copyrights (c) 2005-2010. iZAP                  *
 * All rights reserved                             *
 * **************************************************
 * @author iZAP Team "<*****@*****.**>"
 * @link http://www.izap.in/
 * @version 1.0
 * Under this agreement, No one has rights to sell this script further.
 * For more information. Contact "Tarun Jangra<*****@*****.**>"
 * For discussion about corresponding plugins, visit http://www.pluginlotto.com/pg/forums/
 * Follow us on http://facebook.com/PluginLotto and http://twitter.com/PluginLotto
 */
//this page displays the comment section at the bottom of the detail page of the challenge
echo elgg_view_comments($vars['entity']);
echo elgg_view('input/securitytoken');
Ejemplo n.º 14
0
function poll_get_page_view($guid)
{
    elgg_require_js('elgg/poll/poll');
    $poll = get_entity($guid);
    if ($poll instanceof Poll) {
        // Set the page owner
        $page_owner = $poll->getContainerEntity();
        elgg_set_page_owner_guid($page_owner->guid);
        $title = $poll->title;
        $content = elgg_view_entity($poll, array('full_view' => true));
        $allow_poll_reset = elgg_get_plugin_setting('allow_poll_reset', 'poll');
        if (elgg_is_admin_logged_in() || $allow_poll_reset == 'yes' && $poll->canEdit()) {
            elgg_register_menu_item('title', array('name' => 'poll_reset', 'href' => elgg_get_site_url() . 'action/poll/reset?guid=' . $guid, 'text' => elgg_echo('poll:poll_reset'), 'title' => elgg_echo('poll:poll_reset_description'), 'confirm' => elgg_echo('poll:poll_reset_confirmation'), 'link_class' => 'elgg-menu-content elgg-button elgg-button-action'));
        }
        //check to see if comments are on
        if ($poll->comments_on != 'Off') {
            $content .= elgg_view_comments($poll);
        }
        if (elgg_instanceof($page_owner, 'user')) {
            elgg_push_breadcrumb($page_owner->name, "poll/owner/{$page_owner->username}");
        } else {
            elgg_push_breadcrumb($page_owner->name, "poll/group/{$page_owner->guid}");
        }
        elgg_push_breadcrumb($poll->title);
    } else {
        // Display the 'post not found' page instead
        $title = elgg_echo("poll:notfound");
        $content = elgg_view("poll/notfound");
        elgg_push_breadcrumb($title);
    }
    $params = array('title' => $title, 'content' => $content, 'filter' => '');
    $body = elgg_view_layout('content', $params);
    // Display page
    return elgg_view_page($title, $body);
}
Ejemplo n.º 15
0
 * 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);
Ejemplo n.º 16
0
$project_guid = get_input('guid');
$project = get_entity($project_guid);
if (!$project) {
    forward();
}
elgg_pop_breadcrumb();
elgg_set_page_owner_guid($project->getContainerGUID());
group_gatekeeper();
$container = elgg_get_page_owner_entity();
if (!$container) {
}
$title = $project->title;
elgg_push_breadcrumb(elgg_echo('projects'), elgg_get_site_url() . "projects");
if (elgg_instanceof($container, 'group')) {
    elgg_push_breadcrumb($container->name, "projects/group/{$container->guid}/all");
} else {
    //elgg_push_breadcrumb($container->name, "projects/owner/$container->username");
}
$content = elgg_view_entity($project, array('full_view' => true));
$content .= elgg_view('object/opis', array('projectId' => $project_guid));
$content .= elgg_view('object/attachments', array('projectId' => $project_guid));
$content .= elgg_view_comments($project);
if (elgg_get_logged_in_user_guid() == $project->getOwnerGuid()) {
    $url = "projects/add/{$project->guid}";
    elgg_register_menu_item('title', array('name' => 'subproject', 'href' => $url, 'text' => elgg_echo('projects:newchild'), 'link_class' => 'elgg-button elgg-button-action'));
}
$sidebar = elgg_view('projects/sidebar/navigation');
$sidebar .= elgg_view('projects/sidebar/search');
$sidebar .= elgg_view('projects/sidebar/searchByTag');
$body = elgg_view_layout('content', array('filter' => '', 'content' => $content, 'title' => $title, 'sidebar' => $sidebar));
echo elgg_view_page($title, $body);
Ejemplo n.º 17
0
<?php

namespace hypeJunction\Interactions;

$guid = get_input('guid', $vars);
$entity = get_entity($guid);
/* @var $entity \ElggEntity */
if (!elgg_instanceof($entity)) {
    return true;
}
if (elgg_is_xhr()) {
    echo elgg_view('framework/interactions/likes', array('entity' => $entity, 'active_tab' => $comment ? 'likes' : false));
} else {
    $title = elgg_echo('interactions:likes:title', array($entity->getDisplayName()));
    $content = elgg_view_entity($entity, array('full_view' => false));
    if (!$entity instanceof Comment) {
        $content .= elgg_view_comments($entity, true, array('entity' => $entity, 'active_tab' => 'likes'));
    }
    $layout = elgg_view_layout('content', array('title' => $title, 'content' => $content, 'filter' => false, 'sidebar' => false));
    echo elgg_view_page($title, $layout);
}
Ejemplo n.º 18
0
$entity_guid = elgg_extract('guid', $vars, '');
// Get the file
$sharemaps = get_entity($entity_guid);
if (!$sharemaps) {
    register_error(elgg_echo('noaccess'));
    $_SESSION['last_forward_from'] = current_page_url();
    forward('');
}
if (elgg_instanceof($sharemaps, 'object', 'drawmap')) {
    $sharemaps = new Drawmap($entity_guid);
} else {
    $sharemaps = new SharemapsPluginMap($entity_guid);
}
$owner = elgg_get_page_owner_entity();
elgg_push_breadcrumb(elgg_echo('sharemaps'), 'sharemaps/all');
$crumbs_title = $owner->name;
if (elgg_instanceof($owner, 'group')) {
    elgg_push_breadcrumb($crumbs_title, "sharemaps/group/{$owner->guid}/all");
} else {
    elgg_push_breadcrumb($crumbs_title, "sharemaps/owner/{$owner->username}");
}
$title = $sharemaps->title;
elgg_push_breadcrumb($title);
$content = elgg_view_entity($sharemaps, array('full_view' => true));
$content .= elgg_view_comments($sharemaps);
if (!empty($sharemaps->originalfilename)) {
    // add download button only for files
    elgg_register_menu_item('title', array('name' => 'download', 'text' => elgg_echo('sharemaps:download'), 'href' => "sharemaps/download/{$sharemaps->guid}", 'link_class' => 'elgg-button elgg-button-action'));
}
$body = elgg_view_layout('content', array('content' => $content, 'title' => $title, 'filter' => ''));
echo elgg_view_page($title, $body);
Ejemplo n.º 19
0
<?php

/**
 * River item footer
 *
 * @uses $vars['item'] ElggRiverItem
 * @uses $vars['responses'] Alternate override for this item
 */
namespace hypeJunction\Interactions;

use ElggRiverItem;
if (elgg_in_context('substream-view')) {
    return true;
}
// allow river views to override the response content
$responses = elgg_extract('responses', $vars, null);
if ($responses === false) {
    return true;
}
if ($responses) {
    echo $responses;
    return true;
}
$item = elgg_extract('item', $vars, false);
if (!$item instanceof ElggRiverItem) {
    return true;
}
$object = get_river_object($item);
echo elgg_view_comments($object);
Ejemplo n.º 20
0
//echo $tblog->parent_guid;
elgg_push_breadcrumb(elgg_echo('blogbook:book'), "blogbook/all");
if ($tblog->parent_guid != '') {
    $ptblog = get_entity($tblog->parent_guid);
    recursive_breadcrumb($ptblog);
}
$title = $tblog->title;
$content = elgg_view_entity($tblog, array('full_view' => true));
$bidlist = explode(",", $tblog->bids);
foreach ($bidlist as $value) {
    $ablog = get_entity($value);
    if ($ablog != false) {
        $content .= elgg_view_entity($ablog);
    }
}
$content .= "<hr><b>" . elgg_echo('blogbook:Sub-Chapter(s)') . "</b><ul>";
$cidlist = explode(",", $tblog->cids);
foreach ($cidlist as $value) {
    $content .= "<li type=square><a href=\"/blogbook/view/";
    $content .= $value;
    $content .= "\">";
    $content .= get_entity($value)->title;
    $content .= "</a></li>";
}
$content .= "</ul>";
$content .= elgg_view_comments($tblog);
if (elgg . isloggedin) {
    elgg_register_menu_item('title', array('name' => '', 'href' => "", 'text' => elgg_view('blogbook/childlist', array('guid' => $tblog_guid)), 'link_class' => ''));
}
$body = elgg_view_layout('content', array('filter' => '', 'content' => $content, 'title' => $title, 'sidebar' => elgg_view('blogbook/sidebar/navigation')));
echo elgg_view_page("", $body);
Ejemplo n.º 21
0
$author_text = elgg_echo('byline', array($owner_link));
$date = elgg_view_friendly_time($video->time_created);
$categories = elgg_view('output/categories', $vars);
$comments_count = $video->countComments();
//only display if there are commments
if ($comments_count != 0) {
    $text = elgg_echo("comments") . " ({$comments_count})";
    $comments_link = elgg_view('output/url', array('href' => $video->getURL() . '#comments', 'text' => $text, 'is_trusted' => true));
} else {
    $comments_link = '';
}
$owner_icon = elgg_view_entity_icon($video->getOwnerEntity(), 'tiny');
$metadata = elgg_view_menu('entity', array('entity' => $video, 'handler' => 'videos', 'sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
$subtitle = "{$author_text} {$date} {$comments_link} {$categories}";
$params = array('entity' => $video, 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags);
$list_body = elgg_view('object/elements/summary', $params);
$params = array('class' => 'mbl');
$summary = elgg_view_image_block($owner_icon, $list_body, $params);
echo $summary;
// Display the video player to allow for the video to be played
echo '<div align="center" class="izapPlayer">';
echo $video->getPlayer();
echo '</div>';
if ($video->description) {
    echo elgg_view('output/longtext', array('value' => $video->description, 'class' => 'mbl'));
}
// Optional view for other plugins to extend (not used by izap_videos itself)
echo elgg_view('izap_videos/extendedPlay', $vars);
if ($video->converted == 'yes') {
    echo elgg_view_comments($video);
}
Ejemplo n.º 22
0
        $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 
}
Ejemplo n.º 23
0
$owner_link = elgg_view('output/url', array('href' => "photos/owner/" . $photo->getOwnerEntity()->username, 'text' => $photo->getOwnerEntity()->name));
$author_text = elgg_echo('byline', array($owner_link));
$date = elgg_view_friendly_time($image->time_created);
$owner_icon = elgg_view_entity_icon($photo->getOwnerEntity(), 'medium');
$metadata = elgg_view_menu('entity', array('entity' => $vars['entity'], 'handler' => 'photos', 'sort_by' => 'priority', 'class' => 'list-inline'));
$subtitle = "{$author_text} {$date}";
$params = array('entity' => $photo, 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags);
$list_body = elgg_view('object/elements/summary', $params);
$params = array('class' => 'mbl');
$summary = elgg_view_image_block($owner_icon, $list_body, $params);
echo $summary;
echo '<div class=" center">';
if ($album->getSize() > 1) {
    echo elgg_view('object/image/navigation', $vars);
}
echo elgg_view('photos/tagging/help', $vars);
echo elgg_view('photos/tagging/select', $vars);
echo $img;
echo elgg_view('photos/tagging/tags', $vars);
echo '</div>';
// alternative way to display the fivestar rating widget in case the default view defined in Elggx Fivestar is not to be used
// if (elgg_is_active_plugin('elggx_fivestar')) {
//     echo '<br>';
//     echo elgg_view('elggx_fivestar/voting', array('entity'=> $vars['entity']));
// }
if ($photo->description) {
    echo elgg_view('output/longtext', array('value' => $photo->description, 'class' => 'mbl mrgn-tp-md mrgn-bttm-md'));
}
echo '<h2 class="panel-title mrgn-lft-sm mrgn-bttm-md mrgn-tp-lg">Comments</h2>';
echo elgg_view_comments($photo);
Ejemplo n.º 24
0
    register_error(elgg_echo('noaccess'));
    $_SESSION['last_forward_from'] = current_page_url();
    forward('');
}
$page_owner = elgg_get_page_owner_entity();
$crumbs_title = $page_owner->name;
if (elgg_instanceof($page_owner, 'group')) {
    elgg_push_breadcrumb($crumbs_title, "vouchers/group/{$page_owner->guid}/all");
} else {
    elgg_push_breadcrumb($crumbs_title, "vouchers/owner/{$page_owner->username}");
}
$title = $voucher->title;
elgg_push_breadcrumb($title);
$content = elgg_view_entity($voucher, array('full_view' => true));
if ($voucher->comments_on != 'Off') {
    $content .= elgg_view_comments($voucher);
}
$sidebar = '';
// show voucher sales on sidebar if any only for voucher owner
if (elgg_is_logged_in()) {
    $user = elgg_get_logged_in_user_entity();
    if ($user && $user->guid == $page_owner->guid) {
        // set ignore access for loading all sales entries
        $ia = elgg_get_ignore_access();
        elgg_set_ignore_access(true);
        // load list buyers
        $options = array('type' => 'object', 'subtype' => 'vsales', 'limit' => 0, 'metadata_name_value_pairs' => array(array('name' => 'txn_vguid', 'value' => $voucher->guid, 'operand' => '=')));
        $buyerslist = elgg_get_entities_from_metadata($options);
        $sidebar .= '<div style="font-size:90%;">';
        $sidebar .= '<h3>' . elgg_echo('vouchers:sales') . '</h3>';
        if (is_array($buyerslist)) {
Ejemplo n.º 25
0
Archivo: view.php Proyecto: ibou77/elgg
<?php

/**
 * View a bookmark
 *
 * @package ElggBookmarks
 */
$guid = get_input('guid');
elgg_entity_gatekeeper($guid, 'object', 'bookmarks');
$bookmark = get_entity($guid);
$page_owner = elgg_get_page_owner_entity();
elgg_group_gatekeeper();
$crumbs_title = $page_owner->name;
if (elgg_instanceof($page_owner, 'group')) {
    elgg_push_breadcrumb($crumbs_title, "bookmarks/group/{$page_owner->guid}/all");
} else {
    elgg_push_breadcrumb($crumbs_title, "bookmarks/owner/{$page_owner->username}");
}
$title = $bookmark->title;
elgg_push_breadcrumb($title);
$content = elgg_view_entity($bookmark, array('full_view' => true));
$content .= elgg_view_comments($bookmark);
$body = elgg_view_layout('content', array('content' => $content, 'title' => $title, 'filter' => ''));
echo elgg_view_page($title, $body);
Ejemplo n.º 26
0
<?php

/**
 * iZAP izap_videos
 *
 * @package Elgg videotizer, by iZAP Web Solutions.
 * @license GNU Public License version 3
 * @Contact iZAP Team "<*****@*****.**>"
 * @Founder Tarun Jangra "<*****@*****.**>"
 * @link http://www.izap.in/
 * 
 */
if ($vars['video']->countAnnotations()) {
    echo elgg_view_title(elgg_echo('izap_videos:comments'));
}
echo elgg_view_comments($vars['video']);
Ejemplo n.º 27
0
				<p>
					<a href="<?php 
        echo $vars['url'];
        ?>
mod/file/edit.php?file_guid=<?php 
        echo $file->getGUID();
        ?>
"><?php 
        echo elgg_echo('edit');
        ?>
</a>&nbsp; 
					<?php 
        echo elgg_view('output/confirmlink', array('href' => $vars['url'] . "action/file/delete?file=" . $file->getGUID(), 'text' => elgg_echo("delete"), 'confirm' => elgg_echo("file:delete:confirm")));
        ?>
				</p>
	</div>

<?php 
    }
    ?>
	</div>
</div>

<?php 
    if ($vars['full']) {
        echo elgg_view_comments($file);
    }
    ?>

<?php 
}
Ejemplo n.º 28
0
							<?php 
                echo elgg_view('rate/rate', array('entity' => $vars['entity']));
                ?>
			</div>
<?php 
            }
            echo elgg_echo('image:by');
            ?>
 <b><a href="<?php 
            echo $vars['url'];
            ?>
pg/profile/<?php 
            echo $owner->username;
            ?>
"><?php 
            echo $owner->name;
            ?>
</a></b>  <?php 
            echo $friendlytime;
            ?>
		</div>
	</div> <!-- tidypics wrapper-->
<?php 
            echo elgg_view_comments($image);
            echo '<div class="clearfloat"></div>';
            echo '</div>';
            // content wrapper
        }
        // end of individual image display
    }
}
Ejemplo n.º 29
0
<?php

/**
 * View a file
 *
 * @package ElggFile
 */
$guid = elgg_extract('guid', $vars);
elgg_entity_gatekeeper($guid, 'object', 'file');
$file = get_entity($guid);
$owner = elgg_get_page_owner_entity();
elgg_group_gatekeeper();
elgg_push_breadcrumb(elgg_echo('file'), 'file/all');
$crumbs_title = $owner->name;
if (elgg_instanceof($owner, 'group')) {
    elgg_push_breadcrumb($crumbs_title, "file/group/{$owner->guid}/all");
} else {
    elgg_push_breadcrumb($crumbs_title, "file/owner/{$owner->username}");
}
$title = $file->title;
elgg_push_breadcrumb($title);
$content = elgg_view_entity($file, array('full_view' => true));
$content .= elgg_view_comments($file);
elgg_register_menu_item('title', array('name' => 'download', 'text' => elgg_echo('download'), 'href' => "file/download/{$file->guid}", 'link_class' => 'elgg-button elgg-button-action'));
$body = elgg_view_layout('content', array('content' => $content, 'title' => $title, 'filter' => ''));
echo elgg_view_page($title, $body);
Ejemplo n.º 30
0
if (!$pages) {
    forward();
}
$container = $pages->container_guid;
if ($container) {
    set_page_owner($container);
} else {
    set_page_owner($pages->owner_guid);
}
global $CONFIG;
// add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
if ($pages->canEdit()) {
    add_submenu_item(elgg_echo('pages:newchild'), "{$CONFIG->wwwroot}pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . page_owner(), 'pagesactions');
    add_submenu_item(elgg_echo('pages:delete'), "{$CONFIG->wwwroot}action/pages/delete?page={$pages->getGUID()}", 'pagesactions', true);
}
//if the page has a parent, get it
if ($parent_page = get_entity(get_input("page_guid"))) {
    $parent = $parent_page;
}
$title = $pages->title;
// Breadcrumbs
$body = elgg_view('pages/breadcrumbs', array('page_owner' => page_owner_entity(), 'parent' => $parent));
$body .= elgg_view_title($pages->title);
$body .= elgg_view_entity($pages, true);
//add comments
$body .= elgg_view_comments($pages);
pages_set_navigation_parent($pages);
$sidebar = elgg_view('pages/sidebar/tree');
$body = elgg_view_layout('two_column_left_sidebar', '', $body, $sidebar);
// Finally draw the page
page_draw($title, $body);