blob: 8231bef3dc1918fd8bad4802e655b62c03f1fc16 (
plain)
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
|
<?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(__FILE__))) . "/engine/start.php");
// get the album entity
$photo_guid = (int) get_input('guid');
$photo = get_entity($photo_guid);
// panic if we can't get it
if (!$photo) forward();
// container of photo should always be set, but just in case
set_page_owner($photo->owner_guid);
$album = get_entity($photo->container_guid);
if ($album) {
$owner_guid = $album->container_guid;
if ($owner_guid)
set_page_owner($owner_guid);
}
add_submenu_item( elgg_echo('image:edit'),
$CONFIG->wwwroot . 'pg/photos/edit/' . $photo_guid,
'photos');
add_submenu_item( elgg_echo('image:delete'),
$CONFIG->wwwroot . 'pg/photos/delete/' . $photo_guid,
'photos',
true);
$title = $photo->title;
$area2 = elgg_view_title($title);
$area2 .= elgg_view_entity($photo, true);
$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
page_draw($title, $body);
?>
|