aboutsummaryrefslogtreecommitdiff
path: root/mod/file/start.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-06 21:06:15 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-06 21:06:15 +0000
commit0e23ac4909bfa0971bd7253dcde80d6c174d05fc (patch)
treece9e8838a22e1e5325376265770cffd7133472a8 /mod/file/start.php
parentc5628aeb49123fcddeb8ce3f7bd315b3f7369530 (diff)
downloadelgg-0e23ac4909bfa0971bd7253dcde80d6c174d05fc.tar.gz
elgg-0e23ac4909bfa0971bd7253dcde80d6c174d05fc.tar.bz2
Added upload support to file embed.
git-svn-id: http://code.elgg.org/elgg/trunk@6646 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/start.php')
-rw-r--r--mod/file/start.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index f3da33caf..a2785386f 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -65,6 +65,8 @@
// embed support
register_plugin_hook('embed_get_sections', 'all', 'file_embed_get_sections');
register_plugin_hook('embed_get_items', 'file', 'file_embed_get_items');
+ register_plugin_hook('embed_get_upload_sections', 'all', 'file_embed_get_upload_sections');
+
}
/**
@@ -226,9 +228,9 @@
*/
function file_embed_get_sections($hook, $type, $value, $params) {
$value['file'] = array(
- 'name' => elgg_echo('file:files'),
+ 'name' => elgg_echo('file'),
'layout' => 'list',
- 'icon_size' => 'medium',
+ 'icon_size' => 'small',
);
return $value;
@@ -265,6 +267,24 @@
}
/**
+ * Register file as an embed type.
+ *
+ * @param unknown_type $hook
+ * @param unknown_type $type
+ * @param unknown_type $value
+ * @param unknown_type $params
+ */
+ function file_embed_get_upload_sections($hook, $type, $value, $params) {
+ $value['file'] = array(
+ 'name' => elgg_echo('file'),
+ 'view' => 'file/embed_upload'
+ );
+
+ return $value;
+ }
+
+
+ /**
* Populates the ->getUrl() method for file objects
*
* @param ElggEntity $entity File entity