From 0e23ac4909bfa0971bd7253dcde80d6c174d05fc Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 6 Jul 2010 21:06:15 +0000 Subject: Added upload support to file embed. git-svn-id: http://code.elgg.org/elgg/trunk@6646 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/start.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'mod/file/start.php') 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; @@ -264,6 +266,24 @@ return $value; } + /** + * 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 * -- cgit v1.2.3