From 4562cfbb1a630b14fd194271f99f1f8c098dc38d Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 19 Nov 2011 12:10:46 -0500 Subject: basic pages for viewing all/mine/friends and viewing an album --- views/default/object/album.php | 154 +++-------------------------------------- 1 file changed, 11 insertions(+), 143 deletions(-) (limited to 'views/default/object/album.php') diff --git a/views/default/object/album.php b/views/default/object/album.php index 13b94aed5..51b25b7da 100644 --- a/views/default/object/album.php +++ b/views/default/object/album.php @@ -1,150 +1,18 @@ getGUID(); -$owner = $album->getOwnerEntity(); -$tags = $album->tags; -$title = $album->title; -$desc = $album->description; -$friendlytime = friendly_time($album->time_created); -$mime = $album->mimetype; - -if (get_context() == "search") { - - if (get_input('search_viewtype') == "gallery") { - -/****************************************************************************** - * - * Gallery view of an album object + * Album view * - * This is called when looking at page of albums - * - * - *****************************************************************************/ - - $album_cover_guid = $album->getCoverImageGuid(); - if ($album_cover_guid) { - $album_cover = '' . $title . ''; - } else { - $album_cover = 'new album'; - } -?> - -' . $title . '

'; - $info .= "

username}\">{$owner->name} {$friendlytime}"; - $numcomments = elgg_count_comments($album); - if ($numcomments) { - $info .= ", getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")"; - } - $info .= "

"; +$album = elgg_extract('entity', $vars); +$full_view = elgg_extract('full_view', $vars, false); - $album_cover_guid = $album->getCoverImageGuid(); - if ($album_cover_guid) { - $icon = "getURL()}\">" . 'thumbnail'; - } else { - $icon = "getURL()}\">" . 'new album'; - } - echo elgg_view_listing($icon, $info); - } +if ($full_view) { + echo elgg_view('object/album/full', $vars); } else { - -/****************************************************************************** - * - * Individual view of an album object - * - * This is called when getting a listing of the photos in an album - * - * - *****************************************************************************/ - - $page = get_input("page"); - list($album_placeholder, $album_id, $album_title) = split("/", $page); - - $photo_ratings = get_plugin_setting('photo_ratings', 'tidypics'); - if ($photo_ratings == "enabled") { - add_submenu_item( elgg_echo("tidypics:highestrated"), - $CONFIG->wwwroot . "pg/photos/highestrated/group:" . $album_id, - 'photos'); - } - echo elgg_view_title($title); -?> -
-
- -
-' . autop($desc) . '
'; - - $offset = (int)get_input('offset', 0); - echo $album->viewImages(16, $offset); - // echo '
' . elgg_echo('image:none') . '
'; - // $num_images = 0; - //} - -?> -
-
- -
$tags));?>
- - name; ?>
- getSize(); ?>
- -
- : - -
- -'; -} // end of individual album view - + echo elgg_view('object/album/summary', $vars); +} -- cgit v1.2.3