{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/ee2dd22690eaad38d8dd3653265f6c36?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ee2dd22690eaad38d8dd3653265f6c36","url":"https://api.github.com/users/lianglee","login":"lianglee","id":805066},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-11-13T03:26:05Z","comments":0,"closed_at":null,"url":"https://api.github.com/repos/cash/Tidypics/issues/5","body":"<?php\r\n/**\r\n * Tidypics image view\r\n * \r\n * Display a view of a single image\r\n */\r\n\r\ngroup_gatekeeper();\r\n\r\n// get the photo entity\r\n$photo_guid = (int) get_input('guid');\r\n$photo = get_entity($photo_guid);\r\n\r\n// set page owner based on owner of photo album\r\n$album = $photo->getContainerEntity();\r\nif ($album) {\r\n\telgg_set_page_owner_guid($album->getContainerGUID());\r\n}\r\n$owner = page_owner_entity();\r\n\r\n//set the title\r\n$title = elgg_echo('album:user');\r\n// set up breadcrumbs\r\nelgg_push_breadcrumb(elgg_echo('photos'), $CONFIG->wwwroot . \"photos/all\");\r\nelgg_push_breadcrumb($owner->name, \"photos/owner/\".$owner->username);\r\nelgg_push_breadcrumb($album->title, $album->getURL());\r\nelgg_push_breadcrumb($photo->title);\r\n\r\n// add download button to title menu\r\nelgg_register_menu_item('title', array(\r\n\t'name' => 'download',\r\n\t'href' => \"photos/download/$photo_guid\",\r\n\t'text' => elgg_echo('image:download'),\r\n\t'link_class' => 'elgg-button elgg-button-action',\r\n));\r\n\r\n$content = elgg_view_entity($photo, true);\r\n\r\n$body = elgg_view_layout('content', array(\r\n\t'filter' => false,\r\n\t'content' => $content,\r\n\t'title' => $photo->title,\r\n\t'sidebar' => elgg_view('tidypics/sidebar', array(\r\n\t\t'page' => 'view',\r\n\t\t'image' => $photo,\r\n\t)),\r\n));\r\n\r\necho elgg_view_page($title, $body);\r\n","html_url":"https://github.com/cash/Tidypics/issues/5","title":"new viewimage.php elgg 1.8","number":5,"id":2220029,"created_at":"2011-11-13T03:26:05Z"},"action":"opened"}