aboutsummaryrefslogtreecommitdiff
path: root/mod/file/view.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 13:37:26 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 13:37:26 +0000
commit59cb58582f64b4f239da53ede602ad2c82f02077 (patch)
tree033c3fd53ba1920fd5415cd85272cec3206c9c45 /mod/file/view.php
parent6412a94c3c21ce163c68546e33bdeb9c8650e9f9 (diff)
downloadelgg-59cb58582f64b4f239da53ede602ad2c82f02077.tar.gz
elgg-59cb58582f64b4f239da53ede602ad2c82f02077.tar.bz2
forgot to add this file for the fie plugin
git-svn-id: http://code.elgg.org/elgg/trunk@7739 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/view.php')
-rw-r--r--mod/file/view.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/mod/file/view.php b/mod/file/view.php
new file mode 100644
index 000000000..db123d3ad
--- /dev/null
+++ b/mod/file/view.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * View a file
+ *
+ * @package ElggFile
+ */
+
+$file = get_entity(get_input('guid'));
+
+elgg_set_page_owner_guid($file->getContainerGUID());
+$owner = elgg_get_page_owner();
+
+elgg_push_breadcrumb(elgg_echo('file'), 'pg/file/all');
+
+$crumbs_title = elgg_echo('blog:owned_blogs', array($owner->name));
+if (elgg_instanceof($owner, 'group')) {
+ elgg_push_breadcrumb($crumbs_title, "pg/file/group/$owner->guid/owner");
+} else {
+ elgg_push_breadcrumb($crumbs_title, "pg/file/owner/$owner->username");
+}
+
+$title = $file->title;
+
+elgg_push_breadcrumb($title);
+
+$content = elgg_view_entity($file, true);
+//$content .= elgg_view_comments($file);
+
+$body = elgg_view_layout('content', array(
+ 'content' => $content,
+ 'title' => $title,
+ 'filter' => '',
+ 'header' => '',
+));
+
+echo elgg_view_page($title, $body);