aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/index.php26
-rw-r--r--admin/plugins/index.php3
-rw-r--r--admin/settings/index.php3
-rw-r--r--admin/users/index.php3
-rw-r--r--languages/en.php8
-rw-r--r--mod/blog/actions/add.php66
-rw-r--r--mod/blog/actions/comments/add.php44
-rw-r--r--mod/blog/actions/comments/delete.php34
-rw-r--r--mod/blog/actions/delete.php38
-rw-r--r--mod/blog/actions/edit.php70
-rw-r--r--mod/blog/add.php25
-rw-r--r--mod/blog/edit.php31
-rw-r--r--mod/blog/everyone.php23
-rw-r--r--mod/blog/index.php32
-rw-r--r--mod/blog/languages/en.php52
-rw-r--r--mod/blog/read.php52
-rw-r--r--mod/blog/start.php111
-rw-r--r--mod/blog/views/default/blog/css.php58
-rw-r--r--mod/blog/views/default/blog/forms/edit.php89
-rw-r--r--mod/blog/views/default/blog/notfound.php21
-rw-r--r--mod/blog/views/default/blog/view.php26
-rw-r--r--mod/blog/views/default/object/blog-comment.php50
-rw-r--r--mod/blog/views/default/object/blog-comments.php52
-rw-r--r--mod/blog/views/default/object/blog.php88
-rw-r--r--mod/file/actions/download.php38
-rw-r--r--mod/file/actions/upload.php46
-rw-r--r--mod/file/friends.php34
-rw-r--r--mod/file/index.php30
-rw-r--r--mod/file/languages/en.php45
-rw-r--r--mod/file/start.php131
-rw-r--r--mod/file/upload.php15
-rw-r--r--mod/file/views/default/file/file.php40
-rw-r--r--mod/file/views/default/file/footer.php29
-rw-r--r--mod/file/views/default/file/icon.php23
-rw-r--r--mod/file/views/default/file/upload.php25
-rw-r--r--mod/file/world.php31
-rw-r--r--mod/tasklist/index.php72
-rw-r--r--mod/tasklist/start.php83
-rw-r--r--mod/tasklist/views/default/tasklist/item.php32
-rw-r--r--mod/tasklist/views/default/tasklist/main.php18
-rw-r--r--mod/tasklist/views/default/tasklist/newtask.php18
-rw-r--r--views/default/admin/main.php20
-rw-r--r--views/default/editmenu.php2
-rw-r--r--views/default/navigation/topmenu.php19
44 files changed, 80 insertions, 1676 deletions
diff --git a/admin/index.php b/admin/index.php
new file mode 100644
index 000000000..9011e7e8b
--- /dev/null
+++ b/admin/index.php
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Elgg administration system index
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ // Get the Elgg framework
+ require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
+
+ // Make sure only valid users can see this
+ gatekeeper();
+ if (!$_SESSION['user']->admin && !$_SESSION['user']->siteadmin) forward();
+
+ $menuoptions = get_register("admin");
+
+ // Display main admin menu
+ page_draw(elgg_echo("admin"),elgg_view("admin/main"));
+
+?> \ No newline at end of file
diff --git a/admin/plugins/index.php b/admin/plugins/index.php
new file mode 100644
index 000000000..0165eb215
--- /dev/null
+++ b/admin/plugins/index.php
@@ -0,0 +1,3 @@
+<?php
+
+?> \ No newline at end of file
diff --git a/admin/settings/index.php b/admin/settings/index.php
new file mode 100644
index 000000000..0165eb215
--- /dev/null
+++ b/admin/settings/index.php
@@ -0,0 +1,3 @@
+<?php
+
+?> \ No newline at end of file
diff --git a/admin/users/index.php b/admin/users/index.php
new file mode 100644
index 000000000..0165eb215
--- /dev/null
+++ b/admin/users/index.php
@@ -0,0 +1,3 @@
+<?php
+
+?> \ No newline at end of file
diff --git a/languages/en.php b/languages/en.php
index aac6af52f..2a5b21086 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -57,12 +57,20 @@
*/
'account' => "Account",
+ 'settings' => "Settings",
'register' => "Register",
'registerok' => "You have successfully registered for %s.",
'registerbad' => "Your registration was unsuccessful. The username may already exist, or your passwords might not match.",
/**
+ * Administration
+ */
+
+ 'admin' => "Administration",
+ 'admin:description' => "The admin panel allows you to control all aspects of the system, from user management to how plugins behave. Choose an option below to get started.",
+
+ /**
* Generic action words
*/
diff --git a/mod/blog/actions/add.php b/mod/blog/actions/add.php
deleted file mode 100644
index f51bbedac..000000000
--- a/mod/blog/actions/add.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
- /**
- * Elgg blog: add post action
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
-
- // Get input data
- $title = get_input('blogtitle');
- $body = get_input('blogbody');
- $tags = get_input('blogtags');
-
- // Cache to the session
- $_SESSION['blogtitle'] = $title;
- $_SESSION['blogbody'] = $body;
- $_SESSION['blogtags'] = $tags;
-
- // Convert string of tags into a preformatted array
- $tagarray = string_to_tag_array($tags);
-
- // Make sure the title / description aren't blank
- if (empty($title) || empty($body)) {
- register_error(elgg_echo("blog:blank"));
- forward("mod/blog/add.php");
-
- // Otherwise, save the blog post
- } else {
-
- // Initialise a new ElggObject
- $blog = new ElggObject();
- // Tell the system it's a blog post
- $blog->subtype = "blog";
- // Set its owner to the current user
- $blog->owner_guid = $_SESSION['user']->getGUID();
- // For now, set its access to public (we'll add an access dropdown shortly)
- $blog->access_id = 2;
- // Set its title and description appropriately
- $blog->title = $title;
- $blog->description = $body;
- // Before we can set metadata, we need to save the blog post
- if (!$blog->save()) {
- register_error(elgg_echo("blog:error"));
- forward("mod/blog/add.php");
- }
- // Now let's add tags. We can pass an array directly to the object property! Easy.
- if (is_array($tagarray)) {
- $blog->tags = $tagarray;
- }
- // Success message
- system_message(elgg_echo("blog:posted"));
- // Remove the blog post cache
- unset($_SESSION['blogtitle']); unset($_SESSION['blogbody']); unset($_SESSION['blogtags']);
- // Forward to the main blog page
- forward("mod/blog/?username=" . $_SESSION['user']->username);
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/blog/actions/comments/add.php b/mod/blog/actions/comments/add.php
deleted file mode 100644
index 8a54cde13..000000000
--- a/mod/blog/actions/comments/add.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
- /**
- * Elgg blog: add comment action
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in; forward to the front page if not
- if (!isloggedin()) forward();
-
- // Get input
- $blogpost_guid = (int) get_input('blogpost_guid');
- $comment = get_input('comment');
-
- // Let's see if we can get an entity with the specified GUID, and that it's a blog post
- if ($blogpost = get_entity($blogpost_guid)) {
- if ($blogpost->getSubtype() == "blog") {
-
- // If posting the comment was successful, say so
- if ($blogpost->annotate('comment',$comment,$blogpost->access_id, $_SESSION['guid'])) {
-
- system_message(elgg_echo("comment:success"));
-
- } else {
- system_message(elgg_echo("comment:failure"));
- }
-
- }
-
- } else {
-
- system_message(elgg_echo("blog:notfound"));
-
- }
-
- // Forward to the
- forward("mod/blog/read.php?blogpost=" . $blogpost_guid);
-
-?> \ No newline at end of file
diff --git a/mod/blog/actions/comments/delete.php b/mod/blog/actions/comments/delete.php
deleted file mode 100644
index 8eee2c961..000000000
--- a/mod/blog/actions/comments/delete.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
- /**
- * Elgg blog: delete comment action
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- */
-
- // Ensure we're logged in
- if (!isloggedin()) forward();
-
- // Make sure we can get the comment in question
- $comment_id = (int) get_input('comment_id');
- if ($comment = get_annotation($comment_id)) {
-
- $url = "mod/blog/read.php?blogpost=" . $comment->entity_guid;
- if ($comment->canEdit()) {
- $comment->delete();
- system_message(elgg_echo("comment:deleted"));
- forward($url);
- }
-
- } else {
- $url = "";
- }
-
- system_message(elgg_echo("comment:notdeleted"));
- forward($url);
-
-?> \ No newline at end of file
diff --git a/mod/blog/actions/delete.php b/mod/blog/actions/delete.php
deleted file mode 100644
index cb494e59f..000000000
--- a/mod/blog/actions/delete.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- /**
- * Elgg blog: delete post action
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
-
- // Get input data
- $guid = (int) get_input('blogpost');
-
- // Make sure we actually have permission to edit
- $blog = get_entity($guid);
- if ($blog->getSubtype() == "blog" && $blog->canEdit()) {
-
- // Get owning user
- $owner = get_entity($blog->getOwner());
- // Delete it!
- $rowsaffected = $blog->delete();
- if ($rowsaffected > 0) {
- // Success message
- system_message(elgg_echo("blog:deleted"));
- } else {
- system_message(elgg_echo("blog:notdeleted"));
- }
- // Forward to the main blog page
- forward("mod/blog/?username=" . $owner->username);
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/blog/actions/edit.php b/mod/blog/actions/edit.php
deleted file mode 100644
index fba4763a6..000000000
--- a/mod/blog/actions/edit.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
- /**
- * Elgg blog: edit post action
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
-
- // Get input data
- $guid = (int) get_input('blogpost');
- $title = get_input('blogtitle');
- $body = get_input('blogbody');
- $tags = get_input('blogtags');
-
- // Make sure we actually have permission to edit
- $blog = get_entity($guid);
- if ($blog->getSubtype() == "blog" && $blog->canEdit()) {
-
- // Cache to the session
- $_SESSION['blogtitle'] = $title;
- $_SESSION['blogbody'] = $body;
- $_SESSION['blogtags'] = $tags;
-
- // Convert string of tags into a preformatted array
- $tagarray = string_to_tag_array($tags);
-
- // Make sure the title / description aren't blank
- if (empty($title) || empty($body)) {
- register_error(elgg_echo("blog:blank"));
- forward("mod/blog/add.php");
-
- // Otherwise, save the blog post
- } else {
-
- // Get owning user
- $owner = get_entity($blog->getOwner());
- // For now, set its access to public (we'll add an access dropdown shortly)
- $blog->access_id = 2;
- // Set its title and description appropriately
- $blog->title = $title;
- $blog->description = $body;
- // Before we can set metadata, we need to save the blog post
- if (!$blog->save()) {
- register_error(elgg_echo("blog:error"));
- forward("mod/blog/add.php");
- }
- // Now let's add tags. We can pass an array directly to the object property! Easy.
- $blog->clearMetadata('tags');
- if (is_array($tagarray)) {
- $blog->tags = $tagarray;
- }
- // Success message
- system_message(elgg_echo("blog:posted"));
- // Remove the blog post cache
- unset($_SESSION['blogtitle']); unset($_SESSION['blogbody']); unset($_SESSION['blogtags']);
- // Forward to the main blog page
- forward("mod/blog/?username=" . $owner->username);
-
- }
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/blog/add.php b/mod/blog/add.php
deleted file mode 100644
index 15abe819e..000000000
--- a/mod/blog/add.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
- /**
- * Elgg blog add entry page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // If we're not logged in, forward to the front page
- if (!isloggedin()) forward();
-
- // Get the current page's owner
- $page_owner = page_owner();
-
- // Display page
- page_draw(elgg_echo('blog:addpost'),elgg_view("blog/forms/edit"));
-
-?> \ No newline at end of file
diff --git a/mod/blog/edit.php b/mod/blog/edit.php
deleted file mode 100644
index 262973f54..000000000
--- a/mod/blog/edit.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
- /**
- * Elgg blog edit entry page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // Get the post, if it exists
- $blogpost = (int) get_input('blogpost');
- if ($post = get_entity($blogpost)) {
-
- if ($post->canEdit()) {
-
- $body = elgg_view("blog/forms/edit", array('entity' => $post));
-
- }
-
- }
-
- // Display page
- page_draw(sprintf(elgg_echo('blog:editpost'),$post->title),$body);
-
-?> \ No newline at end of file
diff --git a/mod/blog/everyone.php b/mod/blog/everyone.php
deleted file mode 100644
index a97733c46..000000000
--- a/mod/blog/everyone.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
- /**
- * Elgg view all blog posts from all users page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- if ($blogposts = get_entities('object','blog')) {
- $body = elgg_view("blog/view",array('posts' => $blogposts));
- }
-
- // Display page
- page_draw(elgg_echo('blog:everyone'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/blog/index.php b/mod/blog/index.php
deleted file mode 100644
index b7f1912f6..000000000
--- a/mod/blog/index.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
- /**
- * Elgg blog index page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // Get the current page's owner
- $page_owner = page_owner_entity();
- if ($page_owner === false || is_null($page_owner)) {
- $page_owner = $_SESSION['user'];
- set_page_owner($page_owner->getGUID());
- }
-
- // Get any blog posts to display
- $posts = $page_owner->getObjects('blog');
-
- // Display them
- $body = elgg_view("blog/view",array('posts' => $posts));
-
- // Display page
- page_draw(sprintf(elgg_echo('blog:user'),$page_owner->name),$body);
-
-?> \ No newline at end of file
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php
deleted file mode 100644
index 845303700..000000000
--- a/mod/blog/languages/en.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
- $english = array(
-
- /**
- * Menu items and titles
- */
-
- 'blog' => "Blog",
- 'blog:user' => "%s's blog",
- 'blog:posttitle' => "%s's blog: %s",
- 'blog:everyone' => "All blog posts",
-
- 'blog:read' => "Read blog",
-
- 'blog:addpost' => "Write an entry",
- 'blog:editpost' => "Edit entry (%s)",
-
- 'blog:text' => "Blog text",
-
- 'blog:strapline' => "%s",
-
- 'blog:comment:add' => "Add a comment",
- 'blog:comment:text' => "Comment text",
-
- 'comments' => "Comments",
-
- /**
- * Status messages
- */
-
- 'blog:posted' => "Your blog post was successfully posted.",
- 'comment:success' => "Your comment was successfully added.",
- 'blog:deleted' => "Your blog post was successfully deleted.",
- 'comment:deleted' => "The comment was successfully deleted.",
-
- /**
- * Error messages
- */
-
- 'blog:blank' => "Sorry; you need to fill in both the title and body before you can make a post.",
- 'blog:notfound' => "Sorry; we could not find the specified blog post.",
- 'blog:notdeleted' => "Sorry; we could not delete this blog post.",
-
- 'comment:failure' => "An unexpected error occurred when adding your comment. Please try again.",
- 'comment:notdeleted' => "The comment could not be deleted.",
-
- );
-
- add_translation("en",$english);
-
-?> \ No newline at end of file
diff --git a/mod/blog/read.php b/mod/blog/read.php
deleted file mode 100644
index 84e29d0ea..000000000
--- a/mod/blog/read.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
- /**
- * Elgg read blog post page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // Get the specified blog post
- $post = (int) get_input('blogpost');
-
- // If we can get out the blog post ...
- if ($blogpost = get_entity($post)) {
-
- // Get any comments
- $comments = $blogpost->getAnnotations('comments');
-
- // Set the page owner
- set_page_owner($blogpost->getOwner());
- $page_owner = get_entity($blogpost->getOwner());
-
- // Display it
- $body = elgg_view("object/blog",array(
- 'entity' => $blogpost,
- 'entity_owner' => $page_owner,
- 'comments' => $comments,
- 'full' => true
- ));
-
- // Set the title appropriately
- $title = sprintf(elgg_echo("blog:posttitle"),$page_owner->name,$blogpost->title);
-
- // If we're not allowed to see the blog post
- } else {
-
- // Display the 'post not found' page instead
- $body = elgg_view("blog/notfound");
- $title = elgg_echo("blog:notfound");
-
- }
-
- // Display page
- page_draw($title,$body);
-
-?> \ No newline at end of file
diff --git a/mod/blog/start.php b/mod/blog/start.php
deleted file mode 100644
index 8a39e4435..000000000
--- a/mod/blog/start.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-
- /**
- * Elgg blog plugin
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- /**
- * Blog initialisation
- *
- * These parameters are required for the event API, but we won't use them:
- *
- * @param unknown_type $event
- * @param unknown_type $object_type
- * @param unknown_type $object
- */
-
- function blog_init() {
-
- // Load system configuration
- global $CONFIG;
-
- // Load the language file
- register_translations($CONFIG->pluginspath . "blog/languages/");
-
- // Set up menu for logged in users
- if (isloggedin()) {
- add_menu(elgg_echo('blog'), $CONFIG->wwwroot . "pg/blog/",array(
- menu_item(elgg_echo('blog:read'),$CONFIG->wwwroot."pg/blog/" . $_SESSION['user']->username),
- menu_item(elgg_echo('blog:addpost'),$CONFIG->wwwroot."mod/blog/add.php"),
- menu_item(elgg_echo('blog:everyone'),$CONFIG->wwwroot."mod/blog/everyone.php"),
- ));
- // And for logged out users
- } else {
- add_menu(elgg_echo('blog'), $CONFIG->wwwroot . "mod/blog/everyone.php",array(
- menu_item(elgg_echo('blog:everyone'),$CONFIG->wwwroot."mod/blog/everyone.php"),
- ));
- }
-
- // Extend system CSS with our own styles, which are defined in the blog/css view
- extend_view('css','blog/css');
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('blog','blog_page_handler');
-
- // Register a URL handler for blog posts
- register_entity_url_handler('blog_url','object','blog');
- }
-
- /**
- * Blog page handler; allows the use of fancy URLs
- *
- * @param array $page From the page_handler function
- * @return true|false Depending on success
- */
- function blog_page_handler($page) {
-
- // The first component of a blog URL is the username
- if (isset($page[0])) {
- set_input('username',$page[0]);
- }
-
- // The second part dictates what we're doing
- if (isset($page[1])) {
- switch($page[1]) {
- case "read": set_input('blogpost',$page[2]);
- @include(dirname(__FILE__) . "/read.php");
- break;
- case "friends": // TODO: add friends blog page here
- break;
- }
- // If the URL is just 'blog/username', or just 'blog/', load the standard blog index
- } else {
- @include(dirname(__FILE__) . "/index.php");
- return true;
- }
-
- return false;
-
- }
-
- /**
- * Populates the ->getUrl() method for blog objects
- *
- * @param ElggEntity $blogpost Blog post entity
- * @return string Blog post URL
- */
- function blog_url($blogpost) {
-
- global $CONFIG;
- return $CONFIG->url . "pg/blog/" . $blogpost->getOwnerEntity()->username . "/read/" . $blogpost->getGUID();
-
- }
-
- // Make sure the blog initialisation function is called on initialisation
- register_event_handler('init','system','blog_init');
-
- // Register actions
- global $CONFIG;
- register_action("blog/add",false,$CONFIG->pluginspath . "blog/actions/add.php");
- register_action("blog/edit",false,$CONFIG->pluginspath . "blog/actions/edit.php");
- register_action("blog/delete",false,$CONFIG->pluginspath . "blog/actions/delete.php");
- register_action("blog/comments/add",false,$CONFIG->pluginspath . "blog/actions/comments/add.php");
- register_action("blog/comments/delete",false,$CONFIG->pluginspath . "blog/actions/comments/delete.php");
-
-?> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/css.php b/mod/blog/views/default/blog/css.php
deleted file mode 100644
index 2808508d6..000000000
--- a/mod/blog/views/default/blog/css.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
- /**
- * Elgg blog CSS extender
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-?>
-
-.blog-post {
-
- margin-bottom: 30px;
- border: 0px;
- border-bottom: 1px;
- border-style: solid;
- border-color: #aaa;
-
-}
-
-.blog-post a {
-
- text-decoration: underline;
- color: #777;
-
-}
-
-.blog-post h3 {
-
- font-size: 200%;
- margin-bottom: 15px;
-
-}
-
-.blog-post h3 a {
-
- text-decoration: none;
-
-}
-
-.blog-post .strapline {
-
- font-size: 130%;
- margin-bottom: 20px;
- color: #aaa;
-
-}
-
-.blog-post .strapline a {
-
- text-decoration: none;
- color: #aaa;
-
-} \ No newline at end of file
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php
deleted file mode 100644
index ff8ae8767..000000000
--- a/mod/blog/views/default/blog/forms/edit.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
- /**
- * Elgg blog edit/add page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- * @uses $vars['object'] Optionally, the blog post to edit
- */
-
- // Set title, form destination
- if (isset($vars['entity'])) {
- $title = sprintf(elgg_echo("blog:editpost"),$object->title);
- $action = "blog/edit";
- $title = $vars['entity']->title;
- $body = $vars['entity']->description;
- $tags = $vars['entity']->tags;
- } else {
- $title = elgg_echo("blog:addpost");
- $action = "blog/add";
- $tags = "";
- $title = "";
- $description = "";
- }
-
- // Just in case we have some cached details
- if (isset($vars['blogtitle'])) {
- $title = $vars['blogtitle'];
- $body = $vars['blogbody'];
- $tags = $vars['blogtags'];
- }
-
-?>
-
- <h2>
- <?php echo $title; ?>
- </h2>
- <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
-
- <p>
- <label><?php echo elgg_echo("title"); ?><br />
- <?php
-
- echo elgg_view("input/text", array(
- "internalname" => "blogtitle",
- "value" => $title,
- ));
-
- ?>
- </label>
- </p>
- <p>
- <label><?php echo elgg_echo("blog:text"); ?><br />
- <?php
-
- echo elgg_view("input/longtext",array(
- "internalname" => "blogbody",
- "value" => $body,
- ));
- ?>
- </label>
- </p>
- <p>
- <label><?php echo elgg_echo("tags"); ?><br />
- <?php
-
- echo elgg_view("input/tags", array(
- "internalname" => "blogtags",
- "value" => $tags,
- ));
-
- ?>
- </p>
- <p>
- <?php
-
- if (isset($vars['entity'])) {
- ?><input type="hidden" name="blogpost" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php
- }
-
- ?>
- <input type="submit" value="<?php echo elgg_echo('save'); ?>" />
- </p>
-
- </form> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/notfound.php b/mod/blog/views/default/blog/notfound.php
deleted file mode 100644
index ae716df89..000000000
--- a/mod/blog/views/default/blog/notfound.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
- /**
- * Elgg blog not found page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-?>
-
- <p>
- <?php
-
- echo elgg_echo("blog:notfound");
-
- ?>
- </p> \ No newline at end of file
diff --git a/mod/blog/views/default/blog/view.php b/mod/blog/views/default/blog/view.php
deleted file mode 100644
index 24d0bde7d..000000000
--- a/mod/blog/views/default/blog/view.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
- /**
- * Elgg blog view page
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- * @uses $vars['posts'] An array of posts to view
- */
-
- // If there are any posts to view, view them
- if (is_array($vars['posts']) && sizeof($vars['posts']) > 0) {
-
- foreach($vars['posts'] as $post) {
-
- echo elgg_view_entity($post);
-
- }
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/blog/views/default/object/blog-comment.php b/mod/blog/views/default/object/blog-comment.php
deleted file mode 100644
index 344eb5a9c..000000000
--- a/mod/blog/views/default/object/blog-comment.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Elgg blog individual comment view
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The comment to view
- */
-
-
-?>
-
- <li>
- <div class="blog-comment">
- <p class="blog-comment-text"><?php echo elgg_view("output/longtext",array("value" => $vars['entity']->value)); ?></p>
- <p class="blog-comment-byline">
- <?php
-
- if ($owner = get_entity($vars['entity']->owner_guid)) {
- echo $owner->name;
- }
-
- ?>, <?php echo date("F j, g:i a",$vars['entity']->time_created); ?>
- </p>
- <?php
-
- if ($vars['entity']->canEdit()) {
-?>
- <p class="blog-comment-menu">
- <?php
-
- echo elgg_view("output/confirmlink",array(
- 'href' => $vars['url'] . "action_handler.php?action=blog/comments/delete&comment_id=" . $vars['entity']->id,
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- ));
-
- ?>
- </p>
-<?php
- }
-
- ?>
- </div>
- </li> \ No newline at end of file
diff --git a/mod/blog/views/default/object/blog-comments.php b/mod/blog/views/default/object/blog-comments.php
deleted file mode 100644
index 188214ff1..000000000
--- a/mod/blog/views/default/object/blog-comments.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
- /**
- * Elgg blog aggregate comments view
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- * @uses $vars['comments'] Array of comments
- */
-
-?>
-
- <div class="blog-comments">
-
-<?php
- if (isset($vars['comments']) && is_array($vars['comments']) && sizeof($vars['comments']) > 0) {
-
- echo "<h3>". elgg_echo("comments") ."</h3><ol>";
- foreach($vars['comments'] as $comment) {
-
- echo elgg_view("object/blog-comment",array('entity' => $comment));
-
- }
- echo "</ol>";
-
- }
-
-?>
- <form action="<?php echo $vars['url']; ?>action/blog/comments/add" method="post">
- <h3>
- <?php echo elgg_echo("blog:comment:add"); ?>
- </h3>
- <p>
- <label><?php echo elgg_echo("blog:comment:text"); ?>
- <?php
-
- echo elgg_view("input/longtext",array('internalname' => 'comment'));
-
- ?>
- </label>
- </p>
- <p>
- <input type="hidden" name="blogpost_guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
- <input type="submit" value="<?php echo elgg_echo("save"); ?>" />
- </p>
- </form>
-
- </div> \ No newline at end of file
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
deleted file mode 100644
index e6b6b7129..000000000
--- a/mod/blog/views/default/object/blog.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
- /**
- * Elgg blog individual post view
- *
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Ben Werdmuller <ben@curverider.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] Optionally, the blog post to view
- */
-
- if (isset($vars['entity'])) {
-
-?>
-
- <div class="blog-post">
- <h3><a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo $vars['entity']->title; ?></a></h3>
- <p class="strapline">
- <?php
-
- echo sprintf(elgg_echo("blog:strapline"),
- date("F j",$vars['entity']->time_created)
- );
-
- ?>
- </p>
- <p style="float: left">
- <?php
- echo elgg_view("profile/icon",array('entity' => $vars['entity']->getOwnerEntity(), 'size' => 'medium'));
- ?><br />
- <a href="<?php echo $vars['url']; ?>pg/blog/<?php echo $vars['entity']->getOwnerEntity()->username; ?>"><?php echo $vars['entity']->getOwnerEntity()->name; ?></a>
- </p>
- <p style="margin-left: 110px; min-height: 110px">
- <?php
-
- echo nl2br($vars['entity']->description);
-
- ?>
- </p>
- <p style="margin-left: 110px">
- <?php
-
- echo elgg_view('output/tags', array('tags' => $vars['entity']->tags));
-
- ?>
- </p>
- <p style="margin-left: 110px">
- <?php
-
- if ($vars['entity']->canEdit()) {
-
- ?>
- <a href="<?php echo $vars['url']; ?>mod/blog/edit.php?blogpost=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("edit"); ?></a>
- <?php
-
- echo elgg_view("output/confirmlink", array(
- 'href' => $vars['url'] . "action_handler.php?action=blog/delete&blogpost=" . $vars['entity']->getGUID(),
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- ));
-
- // Allow the menu to be extended
- echo elgg_view("editmenu",array('entity' => $vars['entity']));
-
- ?>
- <?php
- }
-
- ?>
- </p>
- </div>
-
-<?php
-
- // If we've been asked to display the full view
- if (isset($vars['full']) && $vars['full'] == true) {
- echo elgg_view('object/blog-comments',array('entity' => $vars['entity'], 'comments' => $vars['entity']->getAnnotations('comment')));
- }
-
- // Display comments if any
- // echo elgg_view('object/blog-comments',array('entity' => $vars['entity'], 'comments' => $vars['comments']));
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/file/actions/download.php b/mod/file/actions/download.php
deleted file mode 100644
index 19ef86d90..000000000
--- a/mod/file/actions/download.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
- /**
- * Elgg file browser download action.
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Get the guid
- $file_guid = get_input("file_guid");
-
- // Get the file
- $file = get_entity($file_guid);
-
- if ($file)
- {
- $mime = $file->getMimeType();
- if (!$mime) $mime = "application/octet-stream";
-
- $filename = $file->getFilename();
-
- header("Content-type: $mime");
- header("Content-Disposition: attachment; filename=\"$filename\"");
-
- $file->open("read");
-
- while (!$file->eof())
- {
- echo $file->read(10240, $file->tell());
- }
-
- $file->close();
- }
- else
- system_message(elgg_echo("file:downloadfailed"));
-?> \ No newline at end of file
diff --git a/mod/file/actions/upload.php b/mod/file/actions/upload.php
deleted file mode 100644
index 410fecc95..000000000
--- a/mod/file/actions/upload.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
- /**
- * Elgg file browser uploader action
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- global $CONFIG;
-
- // Get variables
- $title = get_input("title");
- $desc = get_input("description");
- $tags = get_input("tags");
-
- // Extract file from, save to default filestore (for now)
- $prefix = "/file/";
- $file = new ElggFile();
- $result = $file->save();
-
- if ($result)
- {
- $file->setFilename($prefix.$_FILES['upload']['name']);
- $file->setMimeType($_FILES['upload']['type']);
-
- $file->open("write");
- $file->write(get_uploaded_file('upload'));
- $file->close();
-
- $file->title = $title;
- $file->description = $desc;
-
- $result = $file->save();
-
- // Save tags
- $tags = explode(",", $tags);
- $file->tag = $tags;
- }
-
- if ($result)
- system_message(elgg_echo("file:saved"));
- else
- system_message(elgg_echo("file:uploadfailed"));
-?> \ No newline at end of file
diff --git a/mod/file/friends.php b/mod/file/friends.php
deleted file mode 100644
index a58912485..000000000
--- a/mod/file/friends.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
- /**
- * Elgg file browser
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
-
- // Get objects of friends
- $owners = array();
- $users = get_entities_from_relationship("friend", page_owner(), false, "", "", 0, "time_created desc", $limit, $offset);
- if ($users)
- {
- foreach ($users as $user)
- $owners[] = $user->getOwner();
- $objects = get_entities("object","file", $owners, "time_created desc", $limit, $offset);
- }
-
- // Draw page
- $body .= file_draw($objects);
-
- // Draw footer
- $body .= file_draw_footer($limit, $offset);
-
- // Finally draw the page
- page_draw(sprintf(elgg_echo("file:friends"),$_SESSION['user']->name), $body);
-?> \ No newline at end of file
diff --git a/mod/file/index.php b/mod/file/index.php
deleted file mode 100644
index 896eb9e94..000000000
--- a/mod/file/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
- /**
- * Elgg file browser
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- *
- * TODO: File icons, download & mime types
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
-
- // Get objects
- $objects = get_entities("object","file", page_owner(), "time_created desc", $limit, $offset);
-
- // Draw page
- $body .= file_draw($objects);
-
- // Draw footer
- $body .= file_draw_footer($limit, $offset);
-
- // Finally draw the page
- page_draw(sprintf(elgg_echo("file:yours"),$_SESSION['user']->name), $body);
-?> \ No newline at end of file
diff --git a/mod/file/languages/en.php b/mod/file/languages/en.php
deleted file mode 100644
index eeae1de02..000000000
--- a/mod/file/languages/en.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
- /**
- * Elgg file plugin language pack
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- $english = array(
-
- /**
- * Menu items and titles
- */
-
- 'file' => "Files",
- 'file:yours' => "%s's files",
- 'file:friends' => "%s's friend's files",
- 'file:all' => "All files",
-
- 'file:upload' => "Upload a file",
-
- 'file:file' => "File",
- 'file:title' => "Title",
- 'file:desc' => "Description",
- 'file:tags' => "Tags",
-
- /**
- * Status messages
- */
-
- 'file:saved' => "Your file was successfully saved.",
-
- /**
- * Error messages
- */
-
- 'file:uploadfailed' => "Sorry; we could not save your file.",
- 'file:downloadfailed' => "Sorry; this file is not available at this time.",
-
- );
-
- add_translation("en",$english);
-?> \ No newline at end of file
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 @@
-<?php
- /**
- * Elgg file browser
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-
- /**
- * File plugin initialisation functions.
- */
- function file_init()
- {
- // Get config
- global $CONFIG;
-
- // Set up menu for logged in users
- if (isloggedin())
- {
- add_menu(elgg_echo('file'), $CONFIG->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
diff --git a/mod/file/upload.php b/mod/file/upload.php
deleted file mode 100644
index 51da6be3a..000000000
--- a/mod/file/upload.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
- /**
- * Elgg file browser uploader
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- gatekeeper();
-
- // Render the file upload page
- page_draw(elgg_echo("file:upload"), elgg_view("file/upload", NULL));
-?> \ No newline at end of file
diff --git a/mod/file/views/default/file/file.php b/mod/file/views/default/file/file.php
deleted file mode 100644
index d2efa1b0c..000000000
--- a/mod/file/views/default/file/file.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
- /**
- * Elgg file browser.
- * File renderer.
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- global $CONFIG;
-
- $file_guid = $vars['file_guid'];
- $tags = $vars['tags'];
- $title = $vars['title'];
- $desc = $vars['description'];
-
- $mime = $vars['mimetype'];
-
-?>
-<div class="file">
- <table width="100%">
- <tr>
- <td valign="top" width="100">
- <div class="file_icon">
- <a href="<?php echo $vars['url']; ?>action/file/download?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_view("file/icon", array("mimetype" => $mime)); ?></a>
- </div>
- </td>
- <td valign="top">
- <div class="title"><?php echo $title; ?></div>
- <div class="description"><?php echo $desc; ?></div>
- <div class="tags"><?php
- foreach ($tags as $tag)
- echo "<a href=\"" . $CONFIG->wwwroot . "pg/file/". $_SESSION['user']->username . "/world/?tag=$tag\">$tag</a> ";
- ?></div>
- </td>
- </tr>
- </table>
-</div>
diff --git a/mod/file/views/default/file/footer.php b/mod/file/views/default/file/footer.php
deleted file mode 100644
index 149c87e5a..000000000
--- a/mod/file/views/default/file/footer.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
- /**
- * Elgg file browser footer
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- $limit = $vars['limit'];
- $offset = $vars['offset'];
- $url = $_SERVER['request_uri'];
-?>
-<div id="navbar">
- <table width="100%">
- <tr>
- <td>
- <div id="prev"><?php if ($offset>0) { ?><a href="<?php echo "$url?offset=" . ($offset-$limit); ?>">Prev</a><?php } ?>
- </div>
- </td>
- <td align="right">
- <div id="next">
- <a href="<?php echo "$url?offset=" . ($offset+$limit); ?>">Next</a>
- </div>
- </td>
- </tr>
- </table>
-</div> \ No newline at end of file
diff --git a/mod/file/views/default/file/icon.php b/mod/file/views/default/file/icon.php
deleted file mode 100644
index 266a60a47..000000000
--- a/mod/file/views/default/file/icon.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
- /**
- * Elgg file icons.
- * Displays an icon, depending on its mime type, for a file.
- * Optionally you can specify a size.
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-
- $mime = $vars['mimetype'];
-
- $width = $vars['width'];
- $height = $vars['height'];
-
- if (!$width) $width = 100;
- if (!$height) $height = 100;
-
- echo $mime;
-?> \ No newline at end of file
diff --git a/mod/file/views/default/file/upload.php b/mod/file/views/default/file/upload.php
deleted file mode 100644
index d318b85a3..000000000
--- a/mod/file/views/default/file/upload.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
- /**
- * Elgg file browser uploader
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- global $CONFIG;
-
-?>
-<form action="<?php echo $vars['url']; ?>action/file/upload" enctype="multipart/form-data" method="post">
-
- <table>
- <tr><td><?php echo elgg_echo("file:file");?>:</td><td><div id="file"><input type="file" name="upload" /></div></td></tr>
- <tr><td><?php echo elgg_echo("file:title");?>:</td><td><div id="title"><input type="text" name="title" size="49" /></div></td></tr>
- <tr><td valign="top"><?php echo elgg_echo("file:desc");?>:</td><td><div id="description"><textarea name="description" cols="50" rows="10"></textarea></div></td></tr>
- <tr><td valign="top"><?php echo elgg_echo("file:tags");?>:</td><td><div id="tags"><textarea name="tags" cols="50"></textarea></div></td></tr>
- </table>
-
- <input type="submit" name="Upload" value="Upload" />
-
-</form> \ No newline at end of file
diff --git a/mod/file/world.php b/mod/file/world.php
deleted file mode 100644
index ffb689050..000000000
--- a/mod/file/world.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
- /**
- * Elgg file browser
- *
- * @package ElggFile
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
- $tag = get_input("tag");
-
- // Get objects
- if ($tag!="")
- $objects = get_entities_from_metadata("tag", $tag, "object", "file", $limit, $offset);
- else
- $objects = get_entities("object","file", "", "time_created desc", $limit, $offset);
-
- // Draw page
- $body .= file_draw($objects);
-
- // Draw footer
- $body .= file_draw_footer($limit, $offset);
-
- // Finally draw the page
- page_draw(sprintf(elgg_echo("file:yours"),$_SESSION['user']->name), $body);
-?> \ No newline at end of file
diff --git a/mod/tasklist/index.php b/mod/tasklist/index.php
deleted file mode 100644
index e21303638..000000000
--- a/mod/tasklist/index.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- require_once("../../engine/start.php");
-
- global $CONFIG;
- $_SESSION['id'] = 2;
-
- // Get the user
- $owner_id = page_owner();
- $owner = get_user(page_owner());
-
- $description = get_input("task");
- $status = get_input("status");
- $action = get_input("action");
- $guid = get_input("guid");
- $tags = get_input("tags");
-
- $limit = get_input("limit",10);
- $offset = get_input("offset",0);
-
- switch ($action)
- {
- case 'newtask' :
- $taskid = create_entity("object", "task", $owner_id, 0);
-
- if ($taskid)
- {
- $entity = get_entity($taskid);
-
- $entity->setMetaData('task', $task, 'text');
- $entity->setMetaData('status', 'notdone', 'text');
-
- if ($tags!="")
- {
- $tags = explode(",",$tags);
-
- foreach ($tags as $tag)
- {
- $tag = sanitise_string($tag);
- $entity->setMetaData($tag, $tag);
- }
- }
-
- $entity->save();
- } else echo "error";
-
- break;
-
- case 'tick' :
- $entity = get_entity($guid);
-
- $entity->setMetaData('status', 'done', 'text');
- break;
- }
-
- $body = elgg_view("tasklist/main", array(
- "name" => $owner->name,
- "tasklist" => tasklist_drawtasks($owner_id, $limit, $offset),
- "newtask" => tasklist_draw_newtask_form($owner_id)
- ));
- page_draw("Tasklist",$body);
-
-?> \ No newline at end of file
diff --git a/mod/tasklist/start.php b/mod/tasklist/start.php
deleted file mode 100644
index 720114238..000000000
--- a/mod/tasklist/start.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- /**
- * Simple tasklist plugin
- *
- * These parameters are required for the event API, but we won't use them:
- *
- * @param unknown_type $event
- * @param unknown_type $object_type
- * @param unknown_type $object
- */
- function tasklist_init($event, $object_type, $object = null) {
-
- global $CONFIG;
-
- add_menu("Tasklist",$CONFIG->wwwroot . "mod/tasklist/",array(
- menu_item("The tasklist plugin",$CONFIG->wwwroot."mod/tasklist/"),
- ));
- }
-
- /**
- * The entity.
- *
- * @param ElggObject $entity
- */
- function tasklist_draw_task($entity)
- {
- // Get the status
- $status = $entity->getMetaData("status");
-
- // Task
- $task = $entity->getMetaData("task");
-
- // Render the item
- return elgg_view("tasklist/item", array(
- "owner_id" => $entity->owner_guid,
- "task" => $task,
- "status" => $status,
- "guid" => $entity->guid
- ));
- }
-
- function tasklist_drawtasks($ownerid, $offset = 0, $limit = 10)
- {
- // Get all entities of task
- //$entities = get_entities("object","task",$ownerid, "time_created desc", $limit, $offset);
- $entities = get_entities_from_metadata("status", "notdone", "object", "task", $limit, $offset);
-
- if (($entities) && (is_array($entities)))
- {
- $display = "<table>";
-
- foreach($entities as $e)
- $display .= tasklist_draw_task($e);
-
- $display .= "</table>";
-
- return $display;
- }
-
- return "No tasks present for user.";
- }
-
- function tasklist_draw_newtask_form($ownerid)
- {
- return elgg_view("tasklist/newtask", array(
- "owner_id" => $ownerid
- ));
- }
-
- // Make sure test_init is called on initialisation
- register_event_handler('init','system','tasklist_init');
-
-?> \ No newline at end of file
diff --git a/mod/tasklist/views/default/tasklist/item.php b/mod/tasklist/views/default/tasklist/item.php
deleted file mode 100644
index 009d30aa4..000000000
--- a/mod/tasklist/views/default/tasklist/item.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-?>
-<tr>
- <td><b><?php echo $vars['task'] ?></b></td>
-
- <td>
- <?php if ($vars['status']=='done')
- echo "done";
- else
- {
-?>
- <form method = "post">
- <input type="hidden" name="action" value="tick" />
- <input type="hidden" name="status" value="done" />
- <input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>"/>
- <input type="hidden" name="guid" value="<?php echo $vars['guid']; ?>"/>
- <input type="submit" name="Done" value="Done" />
- </form>
-<?php
- }
-?>
- </td>
-</tr> \ No newline at end of file
diff --git a/mod/tasklist/views/default/tasklist/main.php b/mod/tasklist/views/default/tasklist/main.php
deleted file mode 100644
index b371339bf..000000000
--- a/mod/tasklist/views/default/tasklist/main.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-?>
-<h1><?php echo $vars['name'] ?>'s Tasklist</h1>
-<?php echo $vars['tasklist']; ?>
-
-<?php echo $vars['newtask']; ?>
-
-
diff --git a/mod/tasklist/views/default/tasklist/newtask.php b/mod/tasklist/views/default/tasklist/newtask.php
deleted file mode 100644
index 579e27e6d..000000000
--- a/mod/tasklist/views/default/tasklist/newtask.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-?>
-<form method="post">
- <textarea name="task"></textarea>
- <input type="text" name="tags" />
- <input type="hidden" name="action" value="newtask"/>
- <input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>"/>
- <input type="submit" name="submit" />
-</form> \ No newline at end of file
diff --git a/views/default/admin/main.php b/views/default/admin/main.php
new file mode 100644
index 000000000..7a1358f03
--- /dev/null
+++ b/views/default/admin/main.php
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Elgg administration main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ **/
+
+ // Description of what's going on
+ echo "<p>" . nl2br(elgg_echo("admin:description")) . "</p>";
+
+ // Main menu items
+ echo elgg_view("admin/mainmenu");
+
+?> \ No newline at end of file
diff --git a/views/default/editmenu.php b/views/default/editmenu.php
index e08a512d1..5d05e7a14 100644
--- a/views/default/editmenu.php
+++ b/views/default/editmenu.php
@@ -9,5 +9,5 @@
* @author Curverider Ltd
* @copyright Curverider Ltd 2008
* @link http://elgg.org/
-
+ **/
?> \ No newline at end of file
diff --git a/views/default/navigation/topmenu.php b/views/default/navigation/topmenu.php
index fe289a7ba..a8211f67a 100644
--- a/views/default/navigation/topmenu.php
+++ b/views/default/navigation/topmenu.php
@@ -27,9 +27,22 @@
?>
</div>
<ul>
- <li><a href="<?php echo $vars['url']; ?>mod/dashboard/"><?php echo elgg_echo('dashboard'); ?></a></li>
- <li><a href=""><?php echo elgg_echo('profile'); ?></a></li>
- <li><a href=""><?php echo elgg_echo('account'); ?></a></li>
+ <li><a href="<?php echo $vars['url']; ?>pg/dashboard/"><?php echo elgg_echo('dashboard'); ?></a></li>
+ <li><a href="<?php echo $vars['url']; ?>pg/settings/"><?php echo elgg_echo('settings'); ?></a></li>
+<?php
+
+ // The administration link is for admin or site admin users only
+ if ($vars['user']->admin || $vars['user']->siteadmin) {
+
+?>
+
+ <li><a href="<?php echo $vars['url']; ?>pg/admin/"><?php echo elgg_echo("admin"); ?></a></li>
+
+<?php
+
+ }
+
+?>
<li><a href="<?php echo $vars['url']; ?>action/logout"><?php echo elgg_echo('logout'); ?></a></li>
</ul>
</div>