1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
<?php
/**
* Full view of an image
*
* @uses $vars['entity'] TidypicsImage
*
* @author Cash Costello
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
*/
$image = $photo = $vars['entity'];
$img = elgg_view_entity_icon($image, 'large', array(
'href' => $image->getIconURL('master'),
'img_class' => 'tidypics-photo',
'link_class' => 'tidypics-lightbox',
));
elgg_load_js('lightbox');
elgg_load_css('lightbox');
$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));
$owner_icon = elgg_view_entity_icon($photo->getOwnerEntity(), 'tiny');
$metadata = elgg_view_menu('entity', array(
'entity' => $vars['entity'],
'handler' => 'photos',
'sort_by' => 'priority',
'class' => 'elgg-menu-hz',
));
$subtitle = "$author_text $date $categories $comments_link";
$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="tidypics-wrapper-photo">';
echo elgg_view('object/image/navigation', $vars);
echo elgg_view('photos/tagging/help', $vars);
echo elgg_view('photos/tagging/select', $vars);
echo $img;
echo '</div>';
if ($photo->description) {
echo elgg_view('output/longtext', array(
'value' => $photo->description,
'class' => 'mbl',
));
}
echo elgg_view_comments($photo);
|