From b0f15fbebe3781626ba6b086d63ed364f6822209 Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 9 Nov 2011 03:10:35 +0100 Subject: Sidebar. --- views/default/object/videolist_item.php | 11 +++++---- views/default/page/elements/videolist_block.php | 33 +++++++++++++++++++++++++ views/default/videolist/sidebar.php | 28 +++++++++++++++++++++ 3 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 views/default/page/elements/videolist_block.php create mode 100644 views/default/videolist/sidebar.php (limited to 'views/default') diff --git a/views/default/object/videolist_item.php b/views/default/object/videolist_item.php index 63f3e6334..bda333a2d 100644 --- a/views/default/object/videolist_item.php +++ b/views/default/object/videolist_item.php @@ -16,8 +16,6 @@ $owner = $entity->getOwnerEntity(); $container = $entity->getContainerEntity(); $categories = elgg_view('output/categories', $vars); $excerpt = elgg_get_excerpt($entity->description); -$mime = $entity->mimetype; -$base_type = substr($mime, 0, strpos($mime,'/')); $body = elgg_view('output/longtext', array('value' => $entity->description)); @@ -88,9 +86,12 @@ HTML; } elseif (elgg_in_context('gallery')) { echo ''; } else { // brief view diff --git a/views/default/page/elements/videolist_block.php b/views/default/page/elements/videolist_block.php new file mode 100644 index 000000000..264862ccf --- /dev/null +++ b/views/default/page/elements/videolist_block.php @@ -0,0 +1,33 @@ + $container_guid, + 'limit' => elgg_extract('limit', $vars, 4), + 'type' => 'object', + 'subtypes' => 'videolist_item', + 'full_view' => false, +); + +if($container) { + $title = elgg_echo('videolist:user', array($container->name)); +} else { + $title = elgg_echo('videolist'); +} + +elgg_push_context('gallery'); +$content = elgg_list_entities($options); +elgg_pop_context('gallery'); + +echo elgg_view_module('aside', $title, $content); diff --git a/views/default/videolist/sidebar.php b/views/default/videolist/sidebar.php new file mode 100644 index 000000000..4a9e1cdda --- /dev/null +++ b/views/default/videolist/sidebar.php @@ -0,0 +1,28 @@ + elgg_get_page_owner_guid(), + )); +} + +if($show_comments) { + echo elgg_view('page/elements/comments_block', array( + 'subtypes' => 'videolist_item', + 'owner_guid' => elgg_get_page_owner_guid(), + )); +} + +if($show_tags) { + echo elgg_view('page/elements/tagcloud_block', array( + 'subtypes' => 'videolist_item', + 'owner_guid' => elgg_get_page_owner_guid(), + )); +} -- cgit v1.2.3