From 1a08a1f4a273737afb508c781d5f39cef021a273 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 15 May 2008 13:35:37 +0000 Subject: Moving some stuff into the plugins repo, where it belongs. git-svn-id: https://code.elgg.org/elgg/trunk@646 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/start.php | 131 ----------------------------------------------------- 1 file changed, 131 deletions(-) delete mode 100644 mod/file/start.php (limited to 'mod/file/start.php') diff --git a/mod/file/start.php b/mod/file/start.php deleted file mode 100644 index 2783e6e64..000000000 --- a/mod/file/start.php +++ /dev/null @@ -1,131 +0,0 @@ -wwwroot . "pg/file/" . $_SESSION['user']->username, array( - menu_item(sprintf(elgg_echo("file:yours"),$_SESSION['user']->name), $CONFIG->wwwroot . "pg/file/" . $_SESSION['user']->username), - menu_item(sprintf(elgg_echo('file:friends'),$_SESSION['user']->name), $CONFIG->wwwroot . "pg/file/". $_SESSION['user']->username . "/friends/"), - menu_item(elgg_echo('file:all'), $CONFIG->wwwroot . "pg/file/". $_SESSION['user']->username . "/world/"), - menu_item(elgg_echo('file:upload'), $CONFIG->wwwroot . "pg/file/". $_SESSION['user']->username . "/new/") - )); - } - else - { - add_menu(elgg_echo('file'), $CONFIG->wwwroot . "pg/file/" . $_SESSION['user']->username . "/", array( - menu_item(elgg_echo('file:all'), $CONFIG->wwwroot . "pg/file/". $_SESSION['user']->username . "/world/"), - )); - } - - // Register a page handler, so we can have nice URLs - register_page_handler('file','file_page_handler'); - - } - - /** - * File page handler - * - * @param array $page Array of page elements, forwarded by the page handling mechanism - */ - function file_page_handler($page) { - - global $CONFIG; - - // The username should be the file we're getting - if (isset($page[0])) { - set_input('username',$page[0]); - } - - if (isset($page[1])) - { - switch($page[1]) - { - case "friends": - include($CONFIG->pluginspath . "file/friends.php"); - break; - case "world": - include($CONFIG->pluginspath . "file/world.php"); - break; - case "new": - include($CONFIG->pluginspath . "file/upload.php"); - break; - } - } - else - { - // Include the standard profile index - include($CONFIG->pluginspath . "file/index.php"); - } - - } - - /** - * Draw an individual file. - * - * @param ElggFile $file - */ - function file_draw_file(ElggFile $file) - { - // Get tags - $tags = $file->getMetaData("tag"); - if (!is_array($tags)) - $tags = array($tags); - - // Draw file - return elgg_view("file/file", array( - "file_guid" => $file->guid, - "tags" => $tags, - "title" => $file->title, - "description" => $file->description, - "mimetype" => $file->getMimeType() - )); - } - - /** - * Draw a given set of objects. - * - * @param array $objects - */ - function file_draw(array $objects) - { - $body = ""; - - foreach ($objects as $object) - $body .= file_draw_file($object); - - return $body; - } - - function file_draw_footer($limit, $offset) - { - return elgg_view("file/footer", array( - "limit" => $limit, - "offset" => $offset - )); - } - - // Make sure test_init is called on initialisation - register_event_handler('init','system','file_init'); - - // Register actions - register_action("file/upload", false, $CONFIG->pluginspath . "file/actions/upload.php"); - register_action("file/download", false, $CONFIG->pluginspath. "file/actions/download.php"); - -?> \ No newline at end of file -- cgit v1.2.3