aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/pages/actions/pages/delete.php35
-rw-r--r--mod/pages/actions/pages/edit.php114
-rw-r--r--mod/pages/actions/pages/editwelcome.php77
-rw-r--r--mod/pages/edit.php42
-rw-r--r--mod/pages/history.php50
-rw-r--r--mod/pages/images/application.pngbin464 -> 0 bytes
-rw-r--r--mod/pages/images/code.pngbin603 -> 0 bytes
-rw-r--r--mod/pages/images/css.pngbin618 -> 0 bytes
-rw-r--r--mod/pages/images/db.pngbin579 -> 0 bytes
-rw-r--r--mod/pages/images/directory.pngbin537 -> 0 bytes
-rw-r--r--mod/pages/images/doc.pngbin651 -> 0 bytes
-rw-r--r--mod/pages/images/file.gifbin110 -> 0 bytes
-rw-r--r--mod/pages/images/file.pngbin294 -> 0 bytes
-rw-r--r--mod/pages/images/film.pngbin653 -> 0 bytes
-rw-r--r--mod/pages/images/flash.pngbin582 -> 0 bytes
-rw-r--r--mod/pages/images/folder-closed.gifbin105 -> 0 bytes
-rw-r--r--mod/pages/images/folder.gifbin106 -> 0 bytes
-rw-r--r--mod/pages/images/folder_open.pngbin583 -> 0 bytes
-rw-r--r--mod/pages/images/html.pngbin734 -> 0 bytes
-rw-r--r--mod/pages/images/java.pngbin633 -> 0 bytes
-rw-r--r--mod/pages/images/linux.pngbin668 -> 0 bytes
-rw-r--r--mod/pages/images/minus.gifbin837 -> 0 bytes
-rw-r--r--mod/pages/images/music.pngbin385 -> 0 bytes
-rw-r--r--mod/pages/images/pdf.pngbin591 -> 0 bytes
-rw-r--r--mod/pages/images/php.pngbin538 -> 0 bytes
-rw-r--r--mod/pages/images/picture.pngbin606 -> 0 bytes
-rw-r--r--mod/pages/images/plus.gifbin841 -> 0 bytes
-rw-r--r--mod/pages/images/ppt.pngbin588 -> 0 bytes
-rw-r--r--mod/pages/images/psd.pngbin856 -> 0 bytes
-rw-r--r--mod/pages/images/ruby.pngbin626 -> 0 bytes
-rw-r--r--mod/pages/images/script.pngbin859 -> 0 bytes
-rw-r--r--mod/pages/images/spinner.gifbin2530 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-black-line.gifbin1877 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-black.gifbin1216 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-default-line.gifbin1993 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-default.gifbin1222 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-famfamfam-line.gifbin807 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-famfamfam.gifbin1280 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-gray-line.gifbin1877 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-gray.gifbin1230 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-red-line.gifbin1877 -> 0 bytes
-rw-r--r--mod/pages/images/treeview-red.gifbin1230 -> 0 bytes
-rw-r--r--mod/pages/images/txt.pngbin342 -> 0 bytes
-rw-r--r--mod/pages/images/xls.pngbin663 -> 0 bytes
-rw-r--r--mod/pages/images/zip.pngbin386 -> 0 bytes
-rw-r--r--mod/pages/index.php55
-rw-r--r--mod/pages/javascript/jquery.treeview.async.js72
-rw-r--r--mod/pages/javascript/jquery.treeview.js251
-rw-r--r--mod/pages/languages/en.php89
-rw-r--r--mod/pages/manifest.xml9
-rw-r--r--mod/pages/new.php44
-rw-r--r--mod/pages/pagesTree.php56
-rw-r--r--mod/pages/start.php291
-rw-r--r--mod/pages/view.php57
-rw-r--r--mod/pages/views/default/annotation/icon.php32
-rw-r--r--mod/pages/views/default/annotation/page.php40
-rw-r--r--mod/pages/views/default/forms/pages/edit.php66
-rw-r--r--mod/pages/views/default/forms/pages/editwelcome.php57
-rw-r--r--mod/pages/views/default/object/page.php21
-rw-r--r--mod/pages/views/default/object/page_top.php21
-rw-r--r--mod/pages/views/default/pages/breadcrumbs.php28
-rw-r--r--mod/pages/views/default/pages/css.php108
-rw-r--r--mod/pages/views/default/pages/groupprofile_pages.php9
-rw-r--r--mod/pages/views/default/pages/menu.php14
-rw-r--r--mod/pages/views/default/pages/metatags.php22
-rw-r--r--mod/pages/views/default/pages/pagegallery.php37
-rw-r--r--mod/pages/views/default/pages/pagelisting.php38
-rw-r--r--mod/pages/views/default/pages/pageprofile.php66
-rw-r--r--mod/pages/views/default/pages/sidebar/sidebarthis.php82
-rw-r--r--mod/pages/views/default/pages/sidebar/starter.php21
-rw-r--r--mod/pages/views/default/pages/sidebar/tree.php8
-rw-r--r--mod/pages/views/default/pages/sidebar/wrapper.php7
-rw-r--r--mod/pages/views/default/pages/welcome.php29
-rw-r--r--mod/pages/welcome.php34
-rw-r--r--mod/pages/world.php51
75 files changed, 0 insertions, 2033 deletions
diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php
deleted file mode 100644
index 6533ed520..000000000
--- a/mod/pages/actions/pages/delete.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
- $page = get_input('page');
-
- if ($page = get_entity($page)) {
-
- if ($page->canEdit()) {
-
- // Bring all child elements forward
- $parent = $page->parent_guid;
- if ($children = get_entities_from_metadata('parent_guid',$page->getGUID())) {
- foreach($children as $child) {
- $child->parent_guid = $parent;
- }
- }
- if ($page->delete()) {
- system_message(elgg_echo('pages:delete:success'));
- if ($parent) {
- if ($parent = get_entity($parent)) {
- forward($parent->getURL());
- exit;
- }
- }
- forward('pg/pages/owned/' . $_SESSION['user']->username);
- exit;
- }
-
- }
-
- }
-
- register_error(elgg_echo('pages:delete:failure'));
- forward($_SERVER['HTTP_REFERER']);
-
-?> \ No newline at end of file
diff --git a/mod/pages/actions/pages/edit.php b/mod/pages/actions/pages/edit.php
deleted file mode 100644
index a34971173..000000000
--- a/mod/pages/actions/pages/edit.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
- set_context('pages');
-
- // Get group fields
- $input = array();
- foreach($CONFIG->pages as $shortname => $valuetype) {
- $input[$shortname] = get_input($shortname);
- if ($valuetype == 'tags')
- $input[$shortname] = string_to_tag_array($input[$shortname]);
- }
-
- // Get parent
- $parent_guid = (int)get_input('parent_guid', 0);
-
- // New or old?
- $page = NULL;
- $pages_guid = (int)get_input('pages_guid');
- if ($pages_guid)
- {
- $page = get_entity($pages_guid);
- if (!$page->canEdit())
- $page = NULL; // if we can't edit it, go no further.
- }
- else
- {
- $page = new ElggObject();
- if (!$parent_guid)
- $page->subtype = 'page_top';
- else
- $page->subtype = 'page';
-
- // New instance, so set container_guid
- $container_guid = get_input('container_guid', $_SESSION['user']->getGUID());
- $page->container_guid = $container_guid;
- }
-
- // Have we got it? Can we edit it?
- if ($page instanceof ElggObject)
- {
- // Yes we have, and yes we can.
-
- // Save fields - note we always save latest description as both description and annotation
- if (sizeof($input) > 0)
- {
- foreach($input as $shortname => $value) {
- if ((!$pages_guid) || (($pages_guid) && ($shortname != 'title')))
- $page->$shortname = $value;
- }
- }
-
-
- // Validate create
- if (!$page->title)
- {
- register_error(elgg_echo("pages:notitle"));
-
- forward($_SERVER['HTTP_REFERER']);
- exit;
- }
-
- // Access ids
- $page->access_id = (int)get_input('access_id', 0);
-
- // Write access id
- $page->write_access_id = (int)get_input('write_access_id', 0);
-
- // Set parent
- $page->parent_guid = $parent_guid;
-
- // Ensure ultimate owner
- $page->owner_guid = ($page->owner_guid ? $page->owner_guid : $_SESSION['user']->guid);
-
- // finally save
- if ($page->save())
- {
-
- // Now save description as an annotation
- $page->annotate('page', $page->description, $page->access_id);
-
-
- system_message(elgg_echo("pages:saved"));
-
- // Forward to the user's profile
- forward($page->getUrl());
- exit;
- }
- else
- register_error(elgg_echo('pages:notsaved'));
-
- }
- else
- {
- register_error(elgg_echo("pages:noaccess"));
- }
-
-
- // Forward to the user's profile
- forward($page->getUrl());
- exit;
-?>
diff --git a/mod/pages/actions/pages/editwelcome.php b/mod/pages/actions/pages/editwelcome.php
deleted file mode 100644
index edf0d89f3..000000000
--- a/mod/pages/actions/pages/editwelcome.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
- /**
- * Elgg Pages Edit welcome message
- *
- * @package ElggPages
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
-
- // Get group fields
- $message = get_input("pages_welcome");
- $owner_guid = get_input("owner_guid");
- $object_guid = get_input("object_guid");
- $access_id = (int) get_input("access_id");
-
- //check to see if this is an edit or new welcome message
- if($object_guid){
-
- //it is an edit so grab the object
- $welcome = get_entity($object_guid);
- if ($welcome->getSubtype() == "pages_welcome" && $welcome->canEdit()) {
-
- $welcome->description = $message;
- $welcome->access_id = $access_id;
- $welcome->save();
- system_message(elgg_echo("pages:welcomeposted"));
-
- } else {
-
- register_error(elgg_echo("pages:welcomeerror"));
-
- }
-
-
- }else{
-
- //it is a new welcome object
- if ($owner_guid){
-
- $welcome = new ElggObject();
- // Tell the system it's a pages welcome message
- $welcome->subtype = "pages_welcome";
- $welcome->title = "Welcome";
- $welcome->description = $message;
- $welcome->access_id = $access_id;
-
- // Set the owner
- $welcome->owner_guid = $owner_guid;
-
- // save
- if (!$welcome->save()){
- register_error(elgg_echo("pages:welcomeerror"));
- } else {
- system_message(elgg_echo("pages:welcomeposted"));
- }
-
-
- } else {
-
- register_error(elgg_echo("pages:welcomeerror"));
-
- }
-
- }//end of first if statement
-
- // Forward to the main blog page
- forward("pg/pages/owned/" . get_user($owner_guid)->username);
- exit;
-
-?> \ No newline at end of file
diff --git a/mod/pages/edit.php b/mod/pages/edit.php
deleted file mode 100644
index c9d12b207..000000000
--- a/mod/pages/edit.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
-
- $page_guid = get_input('page_guid');
- $pages = get_entity($page_guid);
-
- // Get the current page's owner
- if ($container = $pages->container_guid) {
- set_page_owner($container);
- }
- $page_owner = page_owner_entity();
- if ($page_owner === false || is_null($page_owner)) {
- $page_owner = $_SESSION['user'];
- set_page_owner($page_owner->getGUID());
- }
-
- $title = elgg_echo("pages:edit");
- $body = elgg_view_title($title);
-
- if (($pages) && ($pages->canEdit()))
- {
- $body .= elgg_view("forms/pages/edit", array('entity' => $pages));
-
- } else {
- $body .= elgg_echo("pages:noaccess");
- }
-
- $body = elgg_view_layout('two_column_left_sidebar', '', $body);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/pages/history.php b/mod/pages/history.php
deleted file mode 100644
index 135ffe3d2..000000000
--- a/mod/pages/history.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
-
- $page_guid = get_input('page_guid');
-
- $pages = get_entity($page_guid);
- if ($pages->container_guid) {
- set_page_owner($pages->container_guid);
- } else {
- set_page_owner($pages->owner_guid);
- }
-
- $limit = (int)get_input('limit', 20);
- $offset = (int)get_input('offset');
-
- $page_guid = get_input('page_guid');
- $pages = get_entity($page_guid);
-
- add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username);
-
- $title = $pages->title . ": " . elgg_echo("pages:history");
- $area2 = elgg_view_title($title);
-
- $context = get_context();
-
- set_context('search');
-
- $area2 .= list_annotations($page_guid, 'page', $limit, false);
-
- set_context($context);
-
-
- pages_set_navigation_parent($pages);
- $area3 = elgg_view('pages/sidebar/tree');
-
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2, $area3);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/pages/images/application.png b/mod/pages/images/application.png
deleted file mode 100644
index 1dee9e366..000000000
--- a/mod/pages/images/application.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/code.png b/mod/pages/images/code.png
deleted file mode 100644
index 0c76bd129..000000000
--- a/mod/pages/images/code.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/css.png b/mod/pages/images/css.png
deleted file mode 100644
index f907e44b3..000000000
--- a/mod/pages/images/css.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/db.png b/mod/pages/images/db.png
deleted file mode 100644
index bddba1f98..000000000
--- a/mod/pages/images/db.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/directory.png b/mod/pages/images/directory.png
deleted file mode 100644
index 784e8fa48..000000000
--- a/mod/pages/images/directory.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/doc.png b/mod/pages/images/doc.png
deleted file mode 100644
index ae8ecbf47..000000000
--- a/mod/pages/images/doc.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/file.gif b/mod/pages/images/file.gif
deleted file mode 100644
index 7e6216798..000000000
--- a/mod/pages/images/file.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/file.png b/mod/pages/images/file.png
deleted file mode 100644
index 8b8b1ca00..000000000
--- a/mod/pages/images/file.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/film.png b/mod/pages/images/film.png
deleted file mode 100644
index b0ce7bb19..000000000
--- a/mod/pages/images/film.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/flash.png b/mod/pages/images/flash.png
deleted file mode 100644
index 5769120b1..000000000
--- a/mod/pages/images/flash.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/folder-closed.gif b/mod/pages/images/folder-closed.gif
deleted file mode 100644
index 541107888..000000000
--- a/mod/pages/images/folder-closed.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/folder.gif b/mod/pages/images/folder.gif
deleted file mode 100644
index 2b31631ca..000000000
--- a/mod/pages/images/folder.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/folder_open.png b/mod/pages/images/folder_open.png
deleted file mode 100644
index 4e3548352..000000000
--- a/mod/pages/images/folder_open.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/html.png b/mod/pages/images/html.png
deleted file mode 100644
index 6ed2490ed..000000000
--- a/mod/pages/images/html.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/java.png b/mod/pages/images/java.png
deleted file mode 100644
index b7bfcd15f..000000000
--- a/mod/pages/images/java.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/linux.png b/mod/pages/images/linux.png
deleted file mode 100644
index 52699bfee..000000000
--- a/mod/pages/images/linux.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/minus.gif b/mod/pages/images/minus.gif
deleted file mode 100644
index 47fb7b767..000000000
--- a/mod/pages/images/minus.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/music.png b/mod/pages/images/music.png
deleted file mode 100644
index a8b3ede3d..000000000
--- a/mod/pages/images/music.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/pdf.png b/mod/pages/images/pdf.png
deleted file mode 100644
index 8f8095e46..000000000
--- a/mod/pages/images/pdf.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/php.png b/mod/pages/images/php.png
deleted file mode 100644
index 7868a2594..000000000
--- a/mod/pages/images/php.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/picture.png b/mod/pages/images/picture.png
deleted file mode 100644
index 4a158fef7..000000000
--- a/mod/pages/images/picture.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/plus.gif b/mod/pages/images/plus.gif
deleted file mode 100644
index 690662162..000000000
--- a/mod/pages/images/plus.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/ppt.png b/mod/pages/images/ppt.png
deleted file mode 100644
index c4eff0387..000000000
--- a/mod/pages/images/ppt.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/psd.png b/mod/pages/images/psd.png
deleted file mode 100644
index 73c5b3f24..000000000
--- a/mod/pages/images/psd.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/ruby.png b/mod/pages/images/ruby.png
deleted file mode 100644
index f59b7c436..000000000
--- a/mod/pages/images/ruby.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/script.png b/mod/pages/images/script.png
deleted file mode 100644
index 63fe6ceff..000000000
--- a/mod/pages/images/script.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/spinner.gif b/mod/pages/images/spinner.gif
deleted file mode 100644
index 85b99d46b..000000000
--- a/mod/pages/images/spinner.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-black-line.gif b/mod/pages/images/treeview-black-line.gif
deleted file mode 100644
index e5496877a..000000000
--- a/mod/pages/images/treeview-black-line.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-black.gif b/mod/pages/images/treeview-black.gif
deleted file mode 100644
index d549b9fc5..000000000
--- a/mod/pages/images/treeview-black.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-default-line.gif b/mod/pages/images/treeview-default-line.gif
deleted file mode 100644
index 37114d306..000000000
--- a/mod/pages/images/treeview-default-line.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-default.gif b/mod/pages/images/treeview-default.gif
deleted file mode 100644
index a12ac52ff..000000000
--- a/mod/pages/images/treeview-default.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-famfamfam-line.gif b/mod/pages/images/treeview-famfamfam-line.gif
deleted file mode 100644
index 6e289cecc..000000000
--- a/mod/pages/images/treeview-famfamfam-line.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-famfamfam.gif b/mod/pages/images/treeview-famfamfam.gif
deleted file mode 100644
index 0cb178e89..000000000
--- a/mod/pages/images/treeview-famfamfam.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-gray-line.gif b/mod/pages/images/treeview-gray-line.gif
deleted file mode 100644
index 37600447d..000000000
--- a/mod/pages/images/treeview-gray-line.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-gray.gif b/mod/pages/images/treeview-gray.gif
deleted file mode 100644
index cfb8a2f09..000000000
--- a/mod/pages/images/treeview-gray.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-red-line.gif b/mod/pages/images/treeview-red-line.gif
deleted file mode 100644
index df9e749a8..000000000
--- a/mod/pages/images/treeview-red-line.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/treeview-red.gif b/mod/pages/images/treeview-red.gif
deleted file mode 100644
index 3bbb3a157..000000000
--- a/mod/pages/images/treeview-red.gif
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/txt.png b/mod/pages/images/txt.png
deleted file mode 100644
index 813f712f7..000000000
--- a/mod/pages/images/txt.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/xls.png b/mod/pages/images/xls.png
deleted file mode 100644
index b977d7e52..000000000
--- a/mod/pages/images/xls.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/images/zip.png b/mod/pages/images/zip.png
deleted file mode 100644
index fd4bbccdf..000000000
--- a/mod/pages/images/zip.png
+++ /dev/null
Binary files differ
diff --git a/mod/pages/index.php b/mod/pages/index.php
deleted file mode 100644
index ea0b8c3f6..000000000
--- a/mod/pages/index.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- global $CONFIG;
-
- // Add menus
- $owner = page_owner_entity();
- add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username);
- add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php");
- if (($owner) && ($owner->canWriteToContainer($_SESSION['user']))){
- add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . page_owner());
- add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/");
- }
-
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
-
- if($owner instanceof ElggGroup){
- $title = sprintf(elgg_echo("pages:group"),$owner->name);
- }else{
- $title = sprintf(elgg_echo("pages:user"),$owner->name);
- }
-
-
- // Get objects
- $context = get_context();
-
- set_context('search');
-
- $objects = list_entities("object", "page_top", page_owner(), $limit, false);
-
- set_context($context);
-
- //get the owners latest welcome message
- $welcome_message = get_entities("object", "pages_welcome", $owner->guid, '', 1);
-
- $body = elgg_view_title($title);
- $body .= elgg_view("pages/welcome", array('entity' => $welcome_message));
- $body .= $objects;
- $body = elgg_view_layout('two_column_left_sidebar', '', $body);
-
- // Finally draw the page
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/pages/javascript/jquery.treeview.async.js b/mod/pages/javascript/jquery.treeview.async.js
deleted file mode 100644
index 01059191f..000000000
--- a/mod/pages/javascript/jquery.treeview.async.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Async Treeview 0.1 - Lazy-loading extension for Treeview
- *
- * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
- *
- * Copyright (c) 2007 Jörn Zaefferer
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id$
- *
- */
-
-;(function($) {
-
-function load(settings, root, child, container) {
- $.getJSON(settings.url, {root: root, currentpage: settings.currentpage}, function(response) {
- function createNode(parent) {
- var current = $("<li/>").attr("id", this.id || "").html("<span>" + this.text + "</span>").appendTo(parent);
- if (this.classes) {
- current.children("span").addClass(this.classes);
- }
- if (this.expanded) {
- current.addClass("open");
- }
- if (this.hasChildren || this.children && this.children.length) {
- var branch = $("<ul/>").appendTo(current);
- if (this.hasChildren) {
- current.addClass("hasChildren");
- createNode.call({
- text:"placeholder",
- id:"placeholder",
- children:[]
- }, branch);
- }
- if (this.children && this.children.length) {
- $.each(this.children, createNode, [branch])
- }
- }
- }
- $.each(response, createNode, [child]);
- $(container).treeview({add: child}, root);
- });
-}
-
-var proxied = $.fn.treeview;
-$.fn.treeview = function(settings, source) {
- if (!settings.url) {
- return proxied.apply(this, arguments);
- }
- var container = this;
- load(settings, source, this, container);
- var userToggle = settings.toggle;
- return proxied.call(this, $.extend({}, settings, {
- collapsed: true,
- toggle: function() {
- var $this = $(this);
- if ($this.hasClass("hasChildren")) {
- var childList = $this.removeClass("hasChildren").find("ul");
- childList.empty();
- load(settings, this.id, childList, container);
- }
- if (userToggle) {
- userToggle.apply(this, arguments);
- }
- }
- }));
-};
-
-})(jQuery); \ No newline at end of file
diff --git a/mod/pages/javascript/jquery.treeview.js b/mod/pages/javascript/jquery.treeview.js
deleted file mode 100644
index bc5d9e46b..000000000
--- a/mod/pages/javascript/jquery.treeview.js
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Treeview 1.4 - jQuery plugin to hide and show branches of a tree
- *
- * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
- * http://docs.jquery.com/Plugins/Treeview
- *
- * Copyright (c) 2007 Jörn Zaefferer
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
- *
- */
-
-;(function($) {
-
- $.extend($.fn, {
- swapClass: function(c1, c2) {
- var c1Elements = this.filter('.' + c1);
- this.filter('.' + c2).removeClass(c2).addClass(c1);
- c1Elements.removeClass(c1).addClass(c2);
- return this;
- },
- replaceClass: function(c1, c2) {
- return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
- },
- hoverClass: function(className) {
- className = className || "hover";
- return this.hover(function() {
- $(this).addClass(className);
- }, function() {
- $(this).removeClass(className);
- });
- },
- heightToggle: function(animated, callback) {
- animated ?
- this.animate({ height: "toggle" }, animated, callback) :
- this.each(function(){
- jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
- if(callback)
- callback.apply(this, arguments);
- });
- },
- heightHide: function(animated, callback) {
- if (animated) {
- this.animate({ height: "hide" }, animated, callback);
- } else {
- this.hide();
- if (callback)
- this.each(callback);
- }
- },
- prepareBranches: function(settings) {
- if (!settings.prerendered) {
- // mark last tree items
- this.filter(":last-child:not(ul)").addClass(CLASSES.last);
- // collapse whole tree, or only those marked as closed, anyway except those marked as open
- this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
- }
- // return all items with sublists
- return this.filter(":has(>ul)");
- },
- applyClasses: function(settings, toggler) {
- this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) {
- toggler.apply($(this).next());
- }).add( $("a", this) ).hoverClass();
-
- if (!settings.prerendered) {
- // handle closed ones first
- this.filter(":has(>ul:hidden)")
- .addClass(CLASSES.expandable)
- .replaceClass(CLASSES.last, CLASSES.lastExpandable);
-
- // handle open ones
- this.not(":has(>ul:hidden)")
- .addClass(CLASSES.collapsable)
- .replaceClass(CLASSES.last, CLASSES.lastCollapsable);
-
- // create hitarea
- this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea).each(function() {
- var classes = "";
- $.each($(this).parent().attr("class").split(" "), function() {
- classes += this + "-hitarea ";
- });
- $(this).addClass( classes );
- });
- }
-
- // apply event to hitarea
- this.find("div." + CLASSES.hitarea).click( toggler );
- },
- treeview: function(settings) {
-
- settings = $.extend({
- cookieId: "treeview"
- }, settings);
-
- if (settings.add) {
- return this.trigger("add", [settings.add]);
- }
-
- if ( settings.toggle ) {
- var callback = settings.toggle;
- settings.toggle = function() {
- return callback.apply($(this).parent()[0], arguments);
- };
- }
-
- // factory for treecontroller
- function treeController(tree, control) {
- // factory for click handlers
- function handler(filter) {
- return function() {
- // reuse toggle event handler, applying the elements to toggle
- // start searching for all hitareas
- toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
- // for plain toggle, no filter is provided, otherwise we need to check the parent element
- return filter ? $(this).parent("." + filter).length : true;
- }) );
- return false;
- };
- }
- // click on first element to collapse tree
- $("a:eq(0)", control).click( handler(CLASSES.collapsable) );
- // click on second to expand tree
- $("a:eq(1)", control).click( handler(CLASSES.expandable) );
- // click on third to toggle tree
- $("a:eq(2)", control).click( handler() );
- }
-
- // handle toggle event
- function toggler() {
- $(this)
- .parent()
- // swap classes for hitarea
- .find(">.hitarea")
- .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
- .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
- .end()
- // swap classes for parent li
- .swapClass( CLASSES.collapsable, CLASSES.expandable )
- .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
- // find child lists
- .find( ">ul" )
- // toggle them
- .heightToggle( settings.animated, settings.toggle );
- if ( settings.unique ) {
- $(this).parent()
- .siblings()
- // swap classes for hitarea
- .find(">.hitarea")
- .replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
- .replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
- .end()
- .replaceClass( CLASSES.collapsable, CLASSES.expandable )
- .replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
- .find( ">ul" )
- .heightHide( settings.animated, settings.toggle );
- }
- }
-
- function serialize() {
- function binary(arg) {
- return arg ? 1 : 0;
- }
- var data = [];
- branches.each(function(i, e) {
- data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
- });
- $.cookie(settings.cookieId, data.join("") );
- }
-
- function deserialize() {
- var stored = $.cookie(settings.cookieId);
- if ( stored ) {
- var data = stored.split("");
- branches.each(function(i, e) {
- $(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
- });
- }
- }
-
- // add treeview class to activate styles
- this.addClass("treeview");
-
- // prepare branches and find all tree items with child lists
- var branches = this.find("li").prepareBranches(settings);
-
- switch(settings.persist) {
- case "cookie":
- var toggleCallback = settings.toggle;
- settings.toggle = function() {
- serialize();
- if (toggleCallback) {
- toggleCallback.apply(this, arguments);
- }
- };
- deserialize();
- break;
- case "location":
- var current = this.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); });
- if ( current.length ) {
- current.addClass("selected").parents("ul, li").add( current.next() ).show();
- }
- break;
- }
-
- branches.applyClasses(settings, toggler);
-
- // if control option is set, create the treecontroller and show it
- if ( settings.control ) {
- treeController(this, settings.control);
- $(settings.control).show();
- }
-
- return this.bind("add", function(event, branches) {
- $(branches).prev()
- .removeClass(CLASSES.last)
- .removeClass(CLASSES.lastCollapsable)
- .removeClass(CLASSES.lastExpandable)
- .find(">.hitarea")
- .removeClass(CLASSES.lastCollapsableHitarea)
- .removeClass(CLASSES.lastExpandableHitarea);
- $(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, toggler);
- });
- }
- });
-
- // classes used by the plugin
- // need to be styled via external stylesheet, see first example
- var CLASSES = $.fn.treeview.classes = {
- open: "open",
- closed: "closed",
- expandable: "expandable",
- expandableHitarea: "expandable-hitarea",
- lastExpandableHitarea: "lastExpandable-hitarea",
- collapsable: "collapsable",
- collapsableHitarea: "collapsable-hitarea",
- lastCollapsableHitarea: "lastCollapsable-hitarea",
- lastCollapsable: "lastCollapsable",
- lastExpandable: "lastExpandable",
- last: "last",
- hitarea: "hitarea"
- };
-
- // provide backwards compability
- $.fn.Treeview = $.fn.treeview;
-
-})(jQuery); \ No newline at end of file
diff --git a/mod/pages/languages/en.php b/mod/pages/languages/en.php
deleted file mode 100644
index 1040676a2..000000000
--- a/mod/pages/languages/en.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
- /**
- * Elgg pages plugin language pack
- *
- * @package ElggPages
- * @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.com/
- */
-
- $english = array(
-
- /**
- * Menu items and titles
- */
-
- 'pages' => "Pages",
- 'pages:yours' => "Your pages",
- 'pages:user' => "Pages home",
- 'pages:group' => "%s's pages",
- 'pages:all' => "All site pages",
- 'pages:new' => "New page",
- 'pages:groupprofile' => "Group pages",
- 'pages:edit' => "Edit this page",
- 'pages:delete' => "Delete this page",
- 'pages:history' => "Page history",
- 'pages:view' => "View page",
- 'pages:welcome' => "Edit welcome message",
- 'pages:welcomeerror' => "There was a problem saving your welcome message",
- 'pages:welcomeposted' => "Your welcome message has been posted",
- 'pages:navigation' => "Page navigation",
-
- 'item:object:page_top' => 'Top-level pages',
- 'item:object:page' => 'Pages',
- 'item:object:pages_welcome' => 'Pages welcome blocks',
-
-
- /**
- * Form fields
- */
-
- 'pages:title' => 'Pages Title',
- 'pages:description' => 'Your page entry',
- 'pages:tags' => 'Tags',
- 'pages:access_id' => 'Access',
- 'pages:write_access_id' => 'Write access',
-
- /**
- * Status and error messages
- */
- 'pages:noaccess' => 'No access to page',
- 'pages:cantedit' => 'You can not edit this page',
- 'pages:saved' => 'Pages saved',
- 'pages:notsaved' => 'Page could not be saved',
- 'pages:notitle' => 'You must specify a title for your page.',
- 'pages:delete:success' => 'Your page was successfully deleted.',
- 'pages:delete:failure' => 'The page could not be deleted.',
-
- /**
- * Page
- */
- 'pages:strapline' => 'Last updated %s by %s',
-
- /**
- * History
- */
- 'pages:revision' => 'Revision created %s by %s',
-
- /**
- * Submenu items
- */
- 'pages:label:view' => "View page",
- 'pages:label:edit' => "Edit page",
- 'pages:label:history' => "Page history",
-
- /**
- * Sidebar items
- */
- 'pages:sidebar:this' => "This page",
- 'pages:sidebar:children' => "Sub-pages",
- 'pages:sidebar:parent' => "Parent",
-
- 'pages:newchild' => "Create a sub-page",
- 'pages:backtoparent' => "Back to '%s'",
- );
-
- add_translation("en",$english);
-?> \ No newline at end of file
diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml
deleted file mode 100644
index 77da40918..000000000
--- a/mod/pages/manifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Marcus Povey" />
- <field key="version" value="1.0" />
- <field key="description" value="Elgg Pages" />
- <field key="website" value="http://www.elgg.org" />
- <field key="copyright" value="(C) Curverider 2008" />
- <field key="licence" value="GNU Public License version 2" />
-</plugin_manifest> \ No newline at end of file
diff --git a/mod/pages/new.php b/mod/pages/new.php
deleted file mode 100644
index 8dea9add1..000000000
--- a/mod/pages/new.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
- global $CONFIG;
-
- // Get the current page's owner
- if ($container = (int) get_input('container_guid')) {
- set_page_owner($container);
- }
- $page_owner = page_owner_entity();
- if ($page_owner === false || is_null($page_owner)) {
- $page_owner = $_SESSION['user'];
- set_page_owner($page_owner->getGUID());
- }
-
- //if it is a sub page, provide a link back to parent
- if(get_input('parent_guid')){
- $parent = get_entity(get_input('parent_guid'));
-
- // Breadcrumbs
- $area2 .= elgg_view('pages/breadcrumbs', array('page_owner' => $page_owner, 'parent' => $parent, 'add' => true));
- }
-
- global $CONFIG;
- add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username);
-
- $title = elgg_echo("pages:new");
- $area2 .= elgg_view_title($title);
- $area2 .= elgg_view("forms/pages/edit");
-
- $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/pages/pagesTree.php b/mod/pages/pagesTree.php
deleted file mode 100644
index 167877e00..000000000
--- a/mod/pages/pagesTree.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $page = (int) get_input('root',get_input('source'));
-
- if (!$page = get_entity($page)) {
- exit;
- }
-
- // View tree
- echo pages_get_entity_sidebar($page, $fulltree);
-
-//
-// jQuery File Tree PHP Connector
-//
-// Version 1.01
-//
-// Cory S.N. LaViska
-// A Beautiful Site (http://abeautifulsite.net/)
-// 24 March 2008
-//
-// History:
-//
-// 1.01 - updated to work with foreign characters in directory/file names (12 April 2008)
-// 1.00 - released (24 March 2008)
-//
-// Output a list of files for jQuery File Tree
-//
-
-/*
-$_POST['dir'] = urldecode($_POST['dir']);
-
-if( file_exists($root . $_POST['dir']) ) {
- $files = scandir($root . $_POST['dir']);
- natcasesort($files);
- if( count($files) > 2 ) {
- echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
- // All dirs
- foreach( $files as $file ) {
- if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_POST['dir'] . $file) ) {
- echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
- }
- }
- // All files
- foreach( $files as $file ) {
- if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && !is_dir($root . $_POST['dir'] . $file) ) {
- $ext = preg_replace('/^.*\./', '', $file);
- echo "<li class=\"file ext_$ext\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "\">" . htmlentities($file) . "</a></li>";
- }
- }
- echo "</ul>";
- }
-}
-*/
-
-?> \ No newline at end of file
diff --git a/mod/pages/start.php b/mod/pages/start.php
deleted file mode 100644
index 5ba875ca0..000000000
--- a/mod/pages/start.php
+++ /dev/null
@@ -1,291 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- /**
- * Initialise the pages plugin.
- *
- */
- function pages_init()
- {
- global $CONFIG;
-
- // Set up the menu for logged in users
- if (isloggedin())
- {
- add_menu(elgg_echo('pages'), $CONFIG->wwwroot . "pg/pages/owned/" . $_SESSION['user']->username,'pages');
- }
- else
- {
- add_menu(elgg_echo('pages'), $CONFIG->wwwroot . "mod/pages/world.php");
- }
-
- // Extend hover-over menu
- extend_view('profile/menu/links','pages/menu');
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('pages','pages_page_handler');
-
- // Register a url handler
- register_entity_url_handler('pages_url','object', 'page_top');
- register_entity_url_handler('pages_url','object', 'page');
-
- // Register some actions
- register_action("pages/edit",false, $CONFIG->pluginspath . "pages/actions/pages/edit.php");
- register_action("pages/editwelcome",false, $CONFIG->pluginspath . "pages/actions/pages/editwelcome.php");
- register_action("pages/delete",false, $CONFIG->pluginspath . "pages/actions/pages/delete.php");
-
- // Extend some views
- extend_view('css','pages/css');
- extend_view('groups/menu/links', 'pages/menu'); // Add to groups context
- extend_view('groups/right_column', 'pages/groupprofile_pages'); // Add to groups context
-
- // Register entity type
- register_entity_type('object','page');
- register_entity_type('object','page_top');
-
- // For now, we'll hard code the groups profile items as follows:
- // TODO make this user configurable
-
- // Language short codes must be of the form "pages:key"
- // where key is the array key below
- $CONFIG->pages = array(
- 'title' => 'text',
- 'description' => 'longtext',
- 'tags' => 'tags',
- 'access_id' => 'access',
- 'write_access_id' => 'access',
- );
- }
-
- function pages_url($entity) {
-
- global $CONFIG;
-
-
- return $CONFIG->url . "pg/pages/view/{$entity->guid}/";
-
- }
-
- /**
- * Sets up submenus for the pages system. Triggered on pagesetup.
- *
- */
- function pages_submenus() {
-
- global $CONFIG;
-
- $page_owner = page_owner_entity();
-
- // Group submenu option
- if ($page_owner instanceof ElggGroup && get_context() != "pages") {
- add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), $CONFIG->wwwroot . "pg/pages/owned/" . $page_owner->username);
- }
-
-
- }
-
- /**
- * Pages page handler.
- *
- * @param array $page
- */
- function pages_page_handler($page)
- {
- global $CONFIG;
-
- if (isset($page[0]))
- {
- // See what context we're using
- switch($page[0])
- {
- case "new" :
- include($CONFIG->pluginspath . "pages/new.php");
- break;
- case "welcome" :
- include($CONFIG->pluginspath . "pages/welcome.php");
- break;
- case "world":
- include($CONFIG->pluginspath . "pages/world.php");
- break;
- case "owned" :
- // Owned by a user
- if (isset($page[1]))
- set_input('username',$page[1]);
-
- include($CONFIG->pluginspath . "pages/index.php");
- break;
- case "edit" :
- if (isset($page[1]))
- set_input('page_guid', $page[1]);
-
- $entity = get_entity($page[1]);
- add_submenu_item(elgg_echo('pages:label:view'), $CONFIG->url . "pg/pages/view/{$page[1]}");
- add_submenu_item(elgg_echo('pages:user'), $CONFIG->wwwroot . "pg/pages/owned/" . $_SESSION['user']->username);
- if (($entity) && ($entity->canEdit())) add_submenu_item(elgg_echo('pages:label:edit'), $CONFIG->url . "pg/pages/edit/{$page[1]}");
- add_submenu_item(elgg_echo('pages:label:history'), $CONFIG->url . "pg/pages/history/{$page[1]}");
-
- include($CONFIG->pluginspath . "pages/edit.php");
- break;
- case "view" :
-
- if (isset($page[1]))
- set_input('page_guid', $page[1]);
-
- extend_view('metatags','pages/metatags');
-
- $entity = get_entity($page[1]);
- add_submenu_item(elgg_echo('pages:label:view'), $CONFIG->url . "pg/pages/view/{$page[1]}");
- if (($entity) && ($entity->canEdit())) add_submenu_item(elgg_echo('pages:label:edit'), $CONFIG->url . "pg/pages/edit/{$page[1]}");
- add_submenu_item(elgg_echo('pages:label:history'), $CONFIG->url . "pg/pages/history/{$page[1]}");
-
- include($CONFIG->pluginspath . "pages/view.php");
- break;
- case "history" :
- if (isset($page[1]))
- set_input('page_guid', $page[1]);
-
- extend_view('metatags','pages/metatags');
-
- $entity = get_entity($page[1]);
- add_submenu_item(elgg_echo('pages:label:view'), $CONFIG->url . "pg/pages/view/{$page[1]}");
- if (($entity) && ($entity->canEdit())) add_submenu_item(elgg_echo('pages:label:edit'), $CONFIG->url . "pg/pages/edit/{$page[1]}");
- add_submenu_item(elgg_echo('pages:label:history'), $CONFIG->url . "pg/pages/history/{$page[1]}");
-
- include($CONFIG->pluginspath . "pages/history.php");
- break;
- default:
- include($CONFIG->pluginspath . "pages/new.php");
- break;
- }
- }
-
- }
-
- /**
- * Sets the parent of the current page, for navigation purposes
- *
- * @param ElggObject $entity
- */
- function pages_set_navigation_parent(ElggObject $entity) {
-
- $guid = $entity->getGUID();
-
- while ($parent_guid = $entity->parent_guid) {
- $entity = get_entity($parent_guid);
- if ($entity) {
- $guid = $entity->getGUID();
- }
- }
-
- set_input('treeguid',$guid);
- }
-
- function pages_get_path($guid) {
-
- if (!$entity = get_entity($guid)) return array();
-
- $path = array($guid);
-
- while ($parent_guid = $entity->parent_guid) {
- $entity = get_entity($parent_guid);
- if ($entity) {
- $path[] = $entity->getGUID();
- }
- }
-
- return $path;
- }
-
- /**
- * Return the correct sidebar for a given entity
- *
- * @param ElggObject $entity
- */
- function pages_get_entity_sidebar(ElggObject $entity, $fulltree = 0)
- {
- $body = "";
-
- $children = get_entities_from_metadata('parent_guid',$entity->guid);
- $body .= elgg_view('pages/sidebar/sidebarthis', array('entity' => $entity,
- 'children' => $children,
- 'fulltree' => $fulltree));
- //$body = elgg_view('pages/sidebar/wrapper', array('body' => $body));
-
- return $body;
- }
-
- /**
- * Extend permissions checking to extend can-edit for write users.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- */
- function pages_write_permission_check($hook, $entity_type, $returnvalue, $params)
- {
- if ($params['entity']->getSubtype() == 'page'
- || $params['entity']->getSubtype() == 'page_top') {
-
- $write_permission = $params['entity']->write_access_id;
- $user = $params['user'];
-
- if (($write_permission) && ($user))
- {
- // $list = get_write_access_array($user->guid);
- $list = get_access_array($user->guid); // get_access_list($user->guid);
-
- if (($write_permission!=0) && (in_array($write_permission,$list)))
- return true;
-
- }
- }
- }
-
- /**
- * Extend container permissions checking to extend can_write_to_container for write users.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- */
- function pages_container_permission_check($hook, $entity_type, $returnvalue, $params) {
-
- if (get_context() == "pages") {
- if (page_owner()) {
- if (can_write_to_container($_SESSION['user']->guid, page_owner())) return true;
- }
- if ($page_guid = get_input('page_guid',0)) {
- $entity = get_entity($page_guid);
- } else if ($parent_guid = get_input('parent_guid',0)) {
- $entity = get_entity($parent_guid);
- }
- if ($entity instanceof ElggObject) {
- if (
- can_write_to_container($_SESSION['user']->guid, $entity->container_guid)
- || in_array($entity->write_access_id,get_access_list())
- ) {
- return true;
- }
- }
- }
-
- }
-
- // write permission plugin hooks
- register_plugin_hook('permissions_check', 'object', 'pages_write_permission_check');
- register_plugin_hook('container_permissions_check', 'object', 'pages_container_permission_check');
-
- // Make sure the pages initialisation function is called on initialisation
- register_elgg_event_handler('init','system','pages_init');
- register_elgg_event_handler('pagesetup','system','pages_submenus');
-?> \ No newline at end of file
diff --git a/mod/pages/view.php b/mod/pages/view.php
deleted file mode 100644
index 398368aab..000000000
--- a/mod/pages/view.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $page_guid = get_input('page_guid');
- set_context('pages');
-
- $pages = get_entity($page_guid);
- if (!$pages) forward();
-
- $container = $pages->container_guid;
-
- if ($container) {
- set_page_owner($container);
- } else {
- set_page_owner($pages->owner_guid);
- }
-
- global $CONFIG;
- add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username);
-
- if ($pages->canEdit()) {
- add_submenu_item(elgg_echo('pages:newchild'),"{$CONFIG->wwwroot}pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . page_owner());
- add_submenu_item(elgg_echo('pages:delete'),"{$CONFIG->wwwroot}action/pages/delete?page={$pages->getGUID()}");
- }
-
- //if the page has a parent, get it
- if($parent_page = get_entity(get_input("page_guid")))
- $parent = $parent_page;
-
- // Breadcrumbs
- $body = elgg_view('pages/breadcrumbs', array('page_owner' => page_owner_entity(), 'parent' => $parent));
-
- $body .= elgg_view_title($pages->title);
- $body .= elgg_view_entity($pages, true);
-
- //add comments
- $body .= elgg_view_comments($pages);
-
- pages_set_navigation_parent($pages);
- $sidebar = elgg_view('pages/sidebar/tree');
-
- $body = elgg_view_layout('two_column_left_sidebar', '', $body, $sidebar);
-
- // Finally draw the page
- page_draw($title, $body);
-
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/annotation/icon.php b/mod/pages/views/default/annotation/icon.php
deleted file mode 100644
index cb2548cb2..000000000
--- a/mod/pages/views/default/annotation/icon.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
-
- $annotation = $vars['annotation'];
- $entity = get_entity($annotation->entity_guid);
-
- // Get size
- if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
- $vars['size'] = "medium";
-
- // Get any align and js
- if (!empty($vars['align'])) {
- $align = " align=\"{$vars['align']}\" ";
- } else {
- $align = "";
- }
-
-
-?>
-
-<div class="groupicon">
-<a href="<?php echo $entity->getURL() . "?rev=" . $annotation->id; ?>"><img src="<?php echo $vars['url']; ?>mod/pages/graphics/default<?php echo $vars['size']; ?>.jpg" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> /></a>
-</div> \ No newline at end of file
diff --git a/mod/pages/views/default/annotation/page.php b/mod/pages/views/default/annotation/page.php
deleted file mode 100644
index ff06178ec..000000000
--- a/mod/pages/views/default/annotation/page.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- $annotation = $vars['annotation'];
- $entity = get_entity($annotation->entity_guid);
-
- $icon = elgg_view(
- "annotation/icon", array(
- 'annotation' => $vars['annotation'],
- 'size' => 'small',
- )
- );
-
- $owner_guid = $annotation->owner_guid;
- $owner = get_entity($owner_guid);
-
- $rev = sprintf(elgg_echo('pages:revision'),
- friendly_time($annotation->time_created),
-
- "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>"
- );
-
- $link = $entity->getURL() . "?rev=" . $annotation->id;
-
- $info = <<< END
-
-<div><a href="$link">{$entity->title}</a></div>
-<div>$rev</div>
-END;
-
- echo elgg_view_listing($icon, $info);
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php
deleted file mode 100644
index 8c9e5ccfc..000000000
--- a/mod/pages/views/default/forms/pages/edit.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- $parent_guid = get_input('parent_guid');
- $container_guid = get_input('container_guid');
- if (!$container_guid) $container_guid = page_owner();
-?>
-<form action="<?php echo $vars['url']; ?>action/pages/edit" method="post">
-
-<?php
-
- //var_export($vars['profile']);
- if (is_array($vars['config']->pages) && sizeof($vars['config']->pages) > 0)
- foreach($vars['config']->pages as $shortname => $valtype) {
-
- $disabled = "";
-
- if (($vars['entity']) && ($shortname == 'title'))
- {
- $disabled = true;
- }
-?>
-
- <p>
- <label>
- <?php echo elgg_echo("pages:{$shortname}") ?><br />
- <?php echo elgg_view("input/{$valtype}",array(
- 'internalname' => $shortname,
- 'value' => $vars['entity']->$shortname,
- 'disabled' => $disabled
- )); ?>
- </label>
- </p>
-
-<?php
-
- }
-
-?>
- <p>
- <?php
- if ($vars['entity'])
- {
- ?><input type="hidden" name="pages_guid" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php
- }
- ?>
- <?php
- if ($container_guid)
- {
- ?><input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" /><?php
- }
- ?>
- <input type="hidden" name="parent_guid" value="<?php if ($vars['entity']) echo $vars['entity']->parent_guid; else echo $parent_guid; ?>" />
- <input type="hidden" name="owner_guid" value="<?php if ($vars['entity']) echo $vars['entity']->owner_guid; else echo page_owner(); ?>" />
- <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
- </p>
-
-</form> \ No newline at end of file
diff --git a/mod/pages/views/default/forms/pages/editwelcome.php b/mod/pages/views/default/forms/pages/editwelcome.php
deleted file mode 100644
index d8960bf9c..000000000
--- a/mod/pages/views/default/forms/pages/editwelcome.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
- /**
- * Elgg Pages Edit welcome page
- *
- * @package ElggPages
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- //set some variables
- if($vars['entity']){
- foreach($vars['entity'] as $welcome){
- $current_message = $welcome->description;
- $object_guid = $welcome->guid;
- $access_id = $welcome->access_id;
- }
- }else{
- $current_message = '';
- $object_guid = '';
- $access_id = 0;
- }
-
- $page_owner = $vars['owner']->guid;
-
-?>
-<form action="<?php echo $vars['url']; ?>action/pages/editwelcome" method="post">
-
- <p>
- <label>
- <?php echo elgg_view("input/longtext",array(
- 'internalname' => "pages_welcome",
- 'value' => $current_message,
- 'disabled' => $disabled
- )); ?>
- </label>
- </p>
- <p>
- <label>
- <?php echo elgg_echo('access'); ?><br />
- <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
- </label>
- </p>
- <input type="hidden" name="owner_guid" value="<?php echo $page_owner; ?>" />
-
- <?php
- //if it is editing, include the object guid
- if($object_guid != ''){
- ?>
- <input type="hidden" name="object_guid" value="<?php echo $object_guid; ?>" />
- <?php
- }
- ?>
-
- <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
-</form>
diff --git a/mod/pages/views/default/object/page.php b/mod/pages/views/default/object/page.php
deleted file mode 100644
index 6a872f3ae..000000000
--- a/mod/pages/views/default/object/page.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- if ($vars['full']) {
- echo elgg_view("pages/pageprofile",$vars);
- } else {
- if (get_input('search_viewtype') == "gallery") {
- echo elgg_view('pages/pagegallery',$vars);
- } else {
- echo elgg_view("pages/pagelisting",$vars);
- }
- }
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php
deleted file mode 100644
index 6a872f3ae..000000000
--- a/mod/pages/views/default/object/page_top.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- if ($vars['full']) {
- echo elgg_view("pages/pageprofile",$vars);
- } else {
- if (get_input('search_viewtype') == "gallery") {
- echo elgg_view('pages/pagegallery',$vars);
- } else {
- echo elgg_view("pages/pagelisting",$vars);
- }
- }
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/breadcrumbs.php b/mod/pages/views/default/pages/breadcrumbs.php
deleted file mode 100644
index 52662b5bd..000000000
--- a/mod/pages/views/default/pages/breadcrumbs.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
- $page_owner = $vars['page_owner'];
- $parent = $vars['parent'];
-
- $breadcrumbs = '';
-
- $owner_url = $CONFIG->wwwroot . "pg/pages/owned/" . get_entity($page_owner)->username;
- echo "<div id=\"pages_breadcrumbs\"><b><a href=\"{$owner_url}\">" . elgg_echo('pages:user') . "</a></b>";
-
- //see if the new page's parent has a parent
- $getparent = get_entity($parent->parent_guid);
- while ($getparent instanceof ElggObject){
-
- $breadcrumbs = " &gt; <a href=\"{$getparent->getURL()}\">$getparent->title</a>" . $breadcrumbs;
- $getparent = get_entity($getparent->parent_guid);
-
- }
-
- echo $breadcrumbs;
- //if it is adding a page, make the last page a link, otherwise, don't
- if($vars['add']){
- echo " &gt; <a href=\"{$parent->getURL()}\">$parent->title</a></div>";
- }else{
- echo " &gt; $parent->title</div>";
- }
-
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/css.php b/mod/pages/views/default/pages/css.php
deleted file mode 100644
index 1fc1e5abb..000000000
--- a/mod/pages/views/default/pages/css.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-?>
-
-.treeview, .treeview ul {
- padding: 0;
- margin: 0;
- list-style: none;
-}
-
-.treeview ul {
- background-color: white;
- margin-top: 4px;
-}
-
-.treeview .hitarea {
- background: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default.gif) -64px -25px no-repeat;
- height: 16px;
- width: 16px;
- margin-left: -16px;
- float: left;
- cursor: pointer;
-}
-/* fix for IE6 */
-* html .hitarea {
- display: inline;
- float:none;
-}
-
-.treeview li {
- margin: 0;
- padding: 3px 0pt 3px 16px;
-}
-
-.treeview a.selected {
- background-color: #eee;
-}
-
-#treecontrol { margin: 1em 0; display: none; }
-
-.treeview .hover { color: red; cursor: pointer; }
-
-.treeview li { background: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default-line.gif) 0 0 no-repeat; }
-.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
-
-.treeview .expandable-hitarea { background-position: -80px -3px; }
-
-.treeview li.last { background-position: 0 -1766px }
-.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default.gif); }
-.treeview li.lastCollapsable { background-position: 0 -111px }
-.treeview li.lastExpandable { background-position: -32px -67px }
-
-.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
-
-.treeview-red li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-red-line.gif); }
-.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-red.gif); }
-
-.treeview-black li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-black-line.gif); }
-.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-black.gif); }
-
-.treeview-gray li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-gray-line.gif); }
-.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-gray.gif); }
-
-.treeview-famfamfam li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-famfamfam-line.gif); }
-.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-famfamfam.gif); }
-
-
-.filetree li { padding: 3px 0 2px 16px; }
-.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
-.filetree span.folder { background: url(<?php echo $vars['url']; ?>mod/pages/images/folder.gif) 0 0 no-repeat; }
-.filetree li.expandable span.folder { background: url(<?php echo $vars['url']; ?>mod/pages/images/folder-closed.gif) 0 0 no-repeat; }
-.filetree span.file { background: url(<?php echo $vars['url']; ?>mod/pages/images/file.gif) 0 0 no-repeat; }
-
-.pagesTreeContainer {
- margin:0;
- min-height: 200px;
- }
-
-/* delete, Dave's test addition */
-
-#pages_page .strapline {
- text-align:right;
- border-top:1px solid #efefef;
- margin:10px 0 10px 0;
-}
-
-#pages_page .tags {
- padding:0 0 0 16px;
- margin:10px 0 4px 0;
- background:transparent url(<?php echo $vars['url']; ?>_graphics/icon_tag.gif) no-repeat scroll left 2px;
-}
-
-#pages_page img[align="left"] {
- margin: 10px 20px 10px 0;
- float:left;
-}
-#pages_page img[align="right"] {
- margin: 10px 0 10px 10px;
- float:right;
-}
-
diff --git a/mod/pages/views/default/pages/groupprofile_pages.php b/mod/pages/views/default/pages/groupprofile_pages.php
deleted file mode 100644
index b32ccf3b0..000000000
--- a/mod/pages/views/default/pages/groupprofile_pages.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<div id="group_pages_widget">
-<h2><?php echo elgg_echo("pages:groupprofile"); ?></h2>
-<?php
-
- $objects = list_entities("object", "page_top", page_owner(), 5, false);
- echo $objects;
-
-?>
-</div> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/menu.php b/mod/pages/views/default/pages/menu.php
deleted file mode 100644
index ca8620f70..000000000
--- a/mod/pages/views/default/pages/menu.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
- /**
- * Elgg Pages: Add group menu
- *
- * @package ElggPages
- * @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.com/
- */
-?>
-<p class="user_menu_pages">
- <a href="<?php echo $vars['url']; ?>pg/pages/owned/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("pages"); ?></a>
- </p> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/metatags.php b/mod/pages/views/default/pages/metatags.php
deleted file mode 100644
index 895df6657..000000000
--- a/mod/pages/views/default/pages/metatags.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
- $treeguid = get_input('treeguid');
- if (empty($treeguid)) {
- $treeguid = get_input('page_guid');
- }
-
-?>
-
- <script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.js" ></script>
- <script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.async.js" ></script>
- <script type="text/javascript">
-
- $(document).ready( function() {
-
- $("#pagesTree").treeview({
- url: "<?php echo $vars['url']; ?>mod/pages/pagesTree.php",
- currentpage: "<?php echo get_input('page_guid'); ?>"
- }, "<?php echo $treeguid; ?>")
-
- });
- </script>
diff --git a/mod/pages/views/default/pages/pagegallery.php b/mod/pages/views/default/pages/pagegallery.php
deleted file mode 100644
index b49150927..000000000
--- a/mod/pages/views/default/pages/pagegallery.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- $icon = elgg_view(
- "graphics/icon", array(
- 'entity' => $vars['entity'],
- 'size' => 'medium',
- )
- );
-
- $info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->title . "</a></b></p></div>";
-
-
- $latest = $vars['entity']->getAnnotations('page', 1, 0, 'desc');
- if ($latest) {
- $latest = $latest[0];
-
- $time_updated = $latest->time_created;
- $owner_guid = $latest->owner_guid;
- $owner = get_entity($owner_guid);
-
-
- $info .= "<br /><div>".
- strip_tags(substr($latest->value, 0, 100))
- . "</div>";
- }
-
- echo elgg_view_listing($icon, $info);
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/pagelisting.php b/mod/pages/views/default/pages/pagelisting.php
deleted file mode 100644
index a04e53bd4..000000000
--- a/mod/pages/views/default/pages/pagelisting.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- $icon = elgg_view(
- "graphics/icon", array(
- 'entity' => $vars['entity'],
- 'size' => 'small',
- )
- );
-
- $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->title . "</a></b></p>";
-
-
- $latest = $vars['entity']->getAnnotations('page', 1, 0, 'desc');
- if ($latest) {
- $latest = $latest[0];
-
- $time_updated = $latest->time_created;
- $owner_guid = $latest->owner_guid;
- $owner = get_entity($owner_guid);
-
-
- $info .= "<p class=\"owner_timestamp\">".sprintf(elgg_echo("pages:strapline"),
- friendly_time($time_updated),
- "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>"
- ) . "</p>";
- }
-
- echo elgg_view_listing($icon, $info);
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/pageprofile.php b/mod/pages/views/default/pages/pageprofile.php
deleted file mode 100644
index e82e91728..000000000
--- a/mod/pages/views/default/pages/pageprofile.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- // Output body
- $entity = $vars['entity'];
-
- $rev = (int)get_input('rev');
-
- if ($rev)
- {
- $latest = get_annotation($rev);
- }
- else
- {
- $latest = $entity->getAnnotations('page', 1, 0, 'desc');
- if ($latest) $latest = $latest[0];
- }
-
-?>
-
- <div id="pages_page">
-
-<?php
- if ($entity)
- {
- echo elgg_view('output/longtext', array('value' => /*$entity->description*/ $latest->value));
-
-?>
- <!-- display tags -->
- <p class="tags">
- <?php
-
- echo elgg_view('output/tags', array('tags' => $vars['entity']->tags));
-
- ?>
- </p>
-
-<?php
- }
-
- // last edit & by whome
-?>
-
- <p class="strapline">
- <?php
-
- $time_updated = $latest->time_created;
- $owner_guid = $latest->owner_guid;
- $owner = get_entity($owner_guid);
-
- echo sprintf(elgg_echo("pages:strapline"),
- friendly_time($time_updated),
- "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>"
- );
-
- ?>
- </p>
-</div> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/sidebar/sidebarthis.php b/mod/pages/views/default/pages/sidebar/sidebarthis.php
deleted file mode 100644
index ffdc6c802..000000000
--- a/mod/pages/views/default/pages/sidebar/sidebarthis.php
+++ /dev/null
@@ -1,82 +0,0 @@
-[<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- global $CONFIG;
- $entity = $vars['entity'];
- $parent = $vars['entity']->parent_guid;
-
- $currentpage = (int) get_input('currentpage');
- if ($currentpage) {
-
- $path = pages_get_path($currentpage);
- $pathstring = implode(',',$path);
-
- } else {
- $path = array();
- }
-
- function pages_draw_child($childentity, $path) {
-
- $child = "\n\t\t{\n";
- $child .= "\t\t\t\"text\": \"<a href=\\\"{$childentity->getURL()}\\\">{$childentity->title}</a>\",\n";
-
- $haschild = get_entities_from_metadata('parent_guid',$childentity->guid,'','',0,9999);
- if ($haschild) {
- if (in_array($childentity->getGUID(),$path)) {
- $child .= "\t\t\t\"expanded\": true,";
- $child .= "\t\t\t\"children\": [\n";
-
- $childstring = "";
- foreach($haschild as $subchild) {
- if (!empty($childstring)) $childstring .= ", ";
- $childstring .= pages_draw_child($subchild,$path);
- }
-
- $child .= $childstring . "\n\t\t\t]\n";
- } else {
- $child .= "\t\t\t\"id\": \"{$childentity->getGUID()}\",\n\t\t\t\"hasChildren\": true\n";
- }
-
- }
- $child .= "\t\t}";
- return $child;
- }
-
- if (!$parent) {
- echo "{\n";
- echo "\t\"text\": \"<a href=\\\"{$vars['entity']->getURL()}\\\">{$vars['entity']->title}</a>\",\n";
- }
- $children = "";
- if (isset($vars['children']) && is_array($vars['children']) && (!isset($vars['fulltree']) || $vars['fulltree'] == 0)) {
- if (!$parent) echo "\t" . '"expanded": true,' . "\n";
- if (!$parent) echo "\t" . '"children": [' . "\n";
- foreach($vars['children'] as $child) {
- if (!empty($children)) $children .= ", \n";
- /*
- $children .= "\n\t\t{\n";
- $children .= "\t\t\t\"text\": \"<a href=\\\"{$child->getURL()}\\\">{$child->title}</a>\",\n";
-
- $haschild = get_entities_from_metadata('parent_guid',$child->guid,'','',0,10,0,'',0,true);
- if ($haschild) {
- $children .= "\t\t\t\"id\": \"{$child->getGUID()}\",\n\t\t\t\"hasChildren\": true\n";
- }
- $children .= "\t\t}";
- */
- $children .= pages_draw_child($child,$path);
- }
- echo $children;
- if (!$parent) echo "\t\t" . ']' . "\n";
-
- }
-
- if (!$parent) echo "}";
-
-?>] \ No newline at end of file
diff --git a/mod/pages/views/default/pages/sidebar/starter.php b/mod/pages/views/default/pages/sidebar/starter.php
deleted file mode 100644
index 234ec28e5..000000000
--- a/mod/pages/views/default/pages/sidebar/starter.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
- if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) {
-
-?>
-
-<script type="text/javascript">
-
- $(document).ready( function() {
-
- $("#pagetree<?php echo $vars['entity']->getGUID(); ?>").click();
-
- });
-
-</script>
-
-<?php
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/sidebar/tree.php b/mod/pages/views/default/pages/sidebar/tree.php
deleted file mode 100644
index 1424eeebe..000000000
--- a/mod/pages/views/default/pages/sidebar/tree.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-?>
-<div id="sidebar_page_tree">
- <h3><?php echo elgg_echo("pages:navigation"); ?></h3>
- <div id="pagesTree" class="pagesTreeContainer"></div>
-</div>
-<br class="clearfloat" /> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/sidebar/wrapper.php b/mod/pages/views/default/pages/sidebar/wrapper.php
deleted file mode 100644
index 08e6a5b7d..000000000
--- a/mod/pages/views/default/pages/sidebar/wrapper.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
- echo "[";
- echo $vars['body'];
- echo "]";
-
-?> \ No newline at end of file
diff --git a/mod/pages/views/default/pages/welcome.php b/mod/pages/views/default/pages/welcome.php
deleted file mode 100644
index 0974ba151..000000000
--- a/mod/pages/views/default/pages/welcome.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
- /**
- * Elgg Pages welcome message
- *
- * @package ElggPages
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- if($vars['entity']){
-
- foreach($vars['entity'] as $welcome){
-
- echo $welcome->description;
-
- }
-
- } else {
-
-?>
-
- <p>Welcome to this Elgg pages plugin. This feature allows you to create pages on any topic and select who can view them and edit them.</p>
-
-<?php
- }
-?> \ No newline at end of file
diff --git a/mod/pages/welcome.php b/mod/pages/welcome.php
deleted file mode 100644
index ecd27b313..000000000
--- a/mod/pages/welcome.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
- /**
- * Elgg Pages welcome intro
- * The user or group owner can set an introduction to their wiki pages
- *
- * @package ElggPages
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
- global $CONFIG;
-
- // 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 the owners welcome message if it exists
- $welcome_message = get_entities("object", "pages_welcome", $page_owner->getGUID(), '', 1);
-
- $title = elgg_echo("pages:welcome");
- $area2 .= elgg_view_title($title);
- $area2 .= elgg_view("forms/pages/editwelcome", array('entity' => $welcome_message, 'owner' => $page_owner));
-
- $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/pages/world.php b/mod/pages/world.php
deleted file mode 100644
index 04ecd4312..000000000
--- a/mod/pages/world.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
- /**
- * Elgg Pages
- *
- * @package ElggPages
- * @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.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- global $CONFIG;
-
- // 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($_SESSION['guid']);
- }
-
- add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php");
- if (($page_owner) && ($page_owner->canWriteToContainer($_SESSION['user']))){
- add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/");
- add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/");
- add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username);
- }
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
-
- $title = sprintf(elgg_echo("pages:all"),page_owner_entity()->name);
-
-
- // Get objects
- $context = get_context();
-
- set_context('search');
-
- $objects = list_entities("object", "page_top", 0, $limit, false);
-
- set_context($context);
-
- $body = elgg_view_title($title);
- $body .= $objects;
- $body = elgg_view_layout('two_column_left_sidebar','',$body);
-
- // Finally draw the page
- page_draw($title, $body);
-?> \ No newline at end of file