From ff4779ddb3ef005553187e4486d4d775220d8b8f Mon Sep 17 00:00:00 2001 From: pete Date: Tue, 9 Mar 2010 09:39:34 +0000 Subject: Updated new page canvases (and calls to elgg_view_layout) so that empty vars are not required. git-svn-id: http://code.elgg.org/elgg/trunk@5316 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/all.php | 39 +++++++++ mod/blog/archive.php | 106 +++++++++++++------------ mod/blog/everyone.php | 2 +- mod/blog/friends.php | 86 ++++++++++---------- mod/blog/index.php | 108 ++++++++++++------------- mod/blog/preview.php | 88 ++++++++++----------- mod/blog/read.php | 123 +++++++++++++++-------------- mod/blog/shared.php | 59 ++++++++++++++ mod/bookmarks/add.php | 2 +- mod/bookmarks/all.php | 2 +- mod/bookmarks/bookmarklet.php | 2 +- mod/bookmarks/friends.php | 2 +- mod/bookmarks/index.php | 2 +- mod/diagnostics/index.php | 2 +- mod/externalpages/index.php | 2 +- mod/externalpages/read.php | 2 +- mod/groups/addtopic.php | 2 +- mod/groups/all.php | 2 +- mod/groups/discussions.php | 2 +- mod/groups/edit.php | 2 +- mod/groups/edittopic.php | 2 +- mod/groups/forum.php | 2 +- mod/groups/groupprofile.php | 4 +- mod/groups/index.php | 2 +- mod/groups/invitations.php | 2 +- mod/groups/invite.php | 2 +- mod/groups/membership.php | 2 +- mod/groups/membershipreq.php | 2 +- mod/groups/new.php | 2 +- mod/groups/topicposts.php | 2 +- mod/logbrowser/index.php | 2 +- mod/members/index.php | 2 +- mod/messages/index.php | 2 +- mod/messages/read.php | 2 +- mod/messages/send.php | 2 +- mod/messages/sent.php | 2 +- mod/profile/defaultprofile.php | 2 +- mod/profile/edit.php | 2 +- mod/profile/editicon.php | 2 +- mod/reportedcontent/add.php | 2 +- mod/reportedcontent/index.php | 2 +- mod/search/index.php | 2 +- mod/search/views/default/search/layout.php | 2 +- mod/sitepages/sitepages_functions.php | 4 +- mod/thewire/add.php | 2 +- mod/thewire/everyone.php | 2 +- mod/thewire/index.php | 2 +- mod/walledgarden/index.php | 2 +- 48 files changed, 398 insertions(+), 297 deletions(-) create mode 100644 mod/blog/all.php create mode 100644 mod/blog/shared.php (limited to 'mod') diff --git a/mod/blog/all.php b/mod/blog/all.php new file mode 100644 index 000000000..ab1832d99 --- /dev/null +++ b/mod/blog/all.php @@ -0,0 +1,39 @@ + "everyone", 'type' => 'blog')); + set_context('search'); + $area2 .= "
" . list_entities('object','blog',0,10,false) . "
"; + set_context('blog'); + + // Get categories, if they're installed + global $CONFIG; + //$area3 = elgg_view('blog/categorylist',array('baseurl' => $CONFIG->wwwroot . 'search/?subtype=blog&tagtype=universal_categories&tag=','subtype' => 'blog')); + //include a view for plugins to extend + //$area3 .= elgg_view("blogs/favourite", array("object_type" => 'blog')); + //get the latest comments on all blogs + $comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc"); + //$area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments)); + //include a view for plugins to extend + //$area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog')); + + $area3 .= elgg_view('blog/stats'); + + $body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3); + + // Display page + page_draw(elgg_echo('blog:all'),$body); + +?> \ No newline at end of file diff --git a/mod/blog/archive.php b/mod/blog/archive.php index a1a6a528e..9648c75c0 100644 --- a/mod/blog/archive.php +++ b/mod/blog/archive.php @@ -1,50 +1,56 @@ - - * @copyright Curverider Ltd 2008-2010 - * @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($_SESSION['guid']); - } - - // Get timestamp upper and lower bounds - $timelower = (int) get_input('param2'); - $timeupper = (int) get_input('param3'); - if (empty($timelower)) { - forward('pg/blog/'.$page_owner->username); - exit; - } - if (empty($timeupper)) { - $timeupper = $timelower + (86400 * 30); - } - - // Set blog title - $area2 = elgg_view_title(sprintf(elgg_echo('date:month:'.date('m',$timelower)),date('Y',$timelower))); - - // Get a list of blog posts - $area2 .= list_user_objects($page_owner->getGUID(),'blog',10,false,false,true,$timelower,$timeupper); - - // Get blog tags - - // Get blog categories - - // Display them in the page - $body = elgg_view_layout("two_column_left_sidebar", '', $area1 . $area2); - - // Display page - page_draw(sprintf(elgg_echo('blog:user'),$page_owner->name),$body); - -?> \ No newline at end of file + 'blog')); +// Get timestamp upper and lower bounds +$timelower = (int) get_input('param2'); +$timeupper = (int) get_input('param3'); +if (empty($timelower)) { + forward('pg/blog/'.$page_owner->username); + exit; +} +if (empty($timeupper)) { + $timeupper = $timelower + (86400 * 30); +} + +// Set blog title +$area2 = elgg_view_title(sprintf(elgg_echo('date:month:'.date('m',$timelower)),date('Y',$timelower))); + +set_context('search'); +// Get a list of blog posts +$blogs = list_user_objects($page_owner->getGUID(),'blog',10,false,false,true,$timelower,$timeupper); +$area2 .= "
" . $blogs . "
"; +set_context('blog'); + +///if the logged in user is not looking at their stuff, display the ownerblock otherwise +//show the users favourites +if(page_owner() != get_loggedin_user()->guid){ + $area3 = elgg_view('blog/ownerblock'); +} + +//get the latest comments on user's blog posts +$comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc",0,0,page_owner()); +$area3 .= elgg_view('elggcampus_layout/latest_comments', array('comments' => $comments)); +//a view for the favourites plugin to extend +$area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog')); +//display archive +$area3 .= elgg_view("blog/archive"); + +// Display them in the page +$body = elgg_view_layout("one_column_with_sidebar", $area1 . $area2, $area3); + +// Display page +page_draw(sprintf(elgg_echo('blog:user'),$page_owner->name),$body); \ No newline at end of file diff --git a/mod/blog/everyone.php b/mod/blog/everyone.php index 47d22f35b..9270b33a6 100644 --- a/mod/blog/everyone.php +++ b/mod/blog/everyone.php @@ -29,7 +29,7 @@ global $CONFIG; $area3 = elgg_view('blog/categorylist',array('baseurl' => $CONFIG->wwwroot . 'search/?subtype=blog&tagtype=universal_categories&tag=','subtype' => 'blog')); - $body = elgg_view_layout("two_column_left_sidebar", '', $area2, $area3); + $body = elgg_view_layout("one_column_with_sidebar", $area2, $area3); // Display page page_draw(elgg_echo('blog:everyone'),$body); diff --git a/mod/blog/friends.php b/mod/blog/friends.php index 2cef9c9e8..24aa36c8b 100644 --- a/mod/blog/friends.php +++ b/mod/blog/friends.php @@ -1,47 +1,41 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - // Load Elgg engine - define('everyoneblog','true'); - 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($_SESSION['guid']); - } - if (!($page_owner instanceof ElggEntity)) forward(); - - //set the title - if($page_owner == $_SESSION['user']){ - $title = elgg_echo('blog:yourfriends'); - }else{ - $title = $page_owner->name . "'s " . elgg_echo('blog:friends'); - } - - $area2 = elgg_view_title($title); - - // Get a list of blog posts - $area2 .= "
" . list_user_friends_objects($page_owner->getGUID(),'blog',10,false) . "
"; - - // Get categories, if they're installed - global $CONFIG; - $area3 = elgg_view('blog/categorylist',array('baseurl' => $CONFIG->wwwroot . 'search/?subtype=blog&owner_guid='.$page_owner->guid.'&friends='.$page_owner->guid.'&tagtype=universal_categories&tag=','subtype' => 'blog')); - - // Display them in the page - $body = elgg_view_layout("two_column_left_sidebar", '', $area1 . $area2, $area3); - - // Display page - page_draw($title, $body); - + "friends", 'type' => 'blog')); + + // Get a list of blog posts + set_context('search'); + $area2 .= "
" . list_user_friends_objects($page_owner->getGUID(),'blog',10,false) . "
"; + set_context('blog'); + + // Get categories, if they're installed + global $CONFIG; + //$area3 .= elgg_view("blogs/favourite", array("object_type" => 'blog')); + $comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc"); + $area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments)); + //include a view for plugins to extend + $area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog')); + + // Display them in the page + $body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3); + + // Display page + page_draw(elgg_echo('blog:friends'),$body); + ?> \ No newline at end of file diff --git a/mod/blog/index.php b/mod/blog/index.php index 7c23e4089..5d03ce485 100644 --- a/mod/blog/index.php +++ b/mod/blog/index.php @@ -1,53 +1,55 @@ - - * @copyright Curverider Ltd 2008-2010 - * @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)) { - - // guess that logged in user is the owner - if no logged in send to all blogs page - if (!isloggedin()) { - forward('mod/blog/everyone.php'); - } - - $page_owner = $_SESSION['user']; - set_page_owner($_SESSION['guid']); - } - - //set blog title - if($page_owner == $_SESSION['user']){ - $area2 = elgg_view_title(elgg_echo('blog:your')); - }else{ - //$area1 = elgg_view_title($page_owner->username . "'s " . elgg_echo('blog')); - } - - // Get a list of blog posts - $area2 .= "
"; - $area2 .= elgg_list_entities(array('type' => 'object', 'subtype' => 'blog', 'container_guid' => page_owner(), 'limit' => 10, 'full_view' => FALSE, 'view_type_toggle' => FALSE)); - $area2 .= "
"; - - // Get blog tags - - // Get categories, if they're installed - global $CONFIG; - $area3 = elgg_view('blog/categorylist',array('baseurl' => $CONFIG->wwwroot . 'search/?subtype=blog&owner_guid='.$page_owner->guid.'&tagtype=universal_categories&tag=','subtype' => 'blog', 'owner_guid' => $page_owner->guid)); - - // Display them in the page - $body = elgg_view_layout("two_column_left_sidebar", '', $area1 . $area2, $area3); - - // Display page - page_draw(sprintf(elgg_echo('blog:user'),$page_owner->name),$body); - -?> \ No newline at end of file + 'blog')); + +//set blog header +if(page_owner()== get_loggedin_user()->guid){ + $area1 .= elgg_view('blog/blog_header', array('context' => "own", 'type' => 'blog')); +}elseif($page_owner instanceof ElggGroup){ + $area1 .= elgg_view('groups/blog_header_group'); +}else{ + $area1 .= elgg_view('blog/blog_header_visit', array('type' => 'blog')); +} + +// Get a list of blog posts +set_context('search'); +$blogs = list_user_objects($page_owner->getGUID(),'blog',10,false, false); +if(!$blogs && ($page_owner->guid == get_loggedin_user()->guid)) + $blogs = elgg_view('help/blogs'); +$area2 = "
" . $blogs . "
"; +set_context('blog'); +//if the logged in user is not looking at their stuff, display the ownerblock otherwise +//show the users favourites +if(page_owner() != get_loggedin_user()->guid){ + $area3 = elgg_view('blog/ownerblock'); +}else{ + //a view for the favourites plugin to extend + //$area3 .= elgg_view("blogs/favourite", array("object_type" => 'blog')); +} +//get the latest comments on user's blog posts +$comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc",0,0,page_owner()); +$area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments)); +//a view for the favourites plugin to extend +$area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog')); +//display archive +$area3 .= elgg_view("blog/archive"); +// Display them in the page +$body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3); + +// Display page +page_draw(sprintf(elgg_echo('blog:user'),$page_owner->name),$body); \ No newline at end of file diff --git a/mod/blog/preview.php b/mod/blog/preview.php index 88d293487..93e11c222 100644 --- a/mod/blog/preview.php +++ b/mod/blog/preview.php @@ -1,47 +1,41 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.org/ - */ - - require_once(dirname(dirname(dirname(__FILE__))).'/engine/start.php'); - - // Make sure we're logged in (send us to the front page if not) - gatekeeper(); - - // Get input data - - $blogpost = new stdClass; - $blogpost->title = get_input('blogtitle'); - $blogpost->description = get_input('blogbody'); - $blogpost->tags = get_input('blogtags'); - $blogpost->access = get_input('access_id'); - $blogpost->comments_on = get_input('comments_select'); - $blogpost->time_created = time(); - - // Convert string of tags into a preformatted array - $blogpost->tags = string_to_tag_array($blogpost->tags); - - // Display it - $area2 = elgg_view("blog/previewpane") . - elgg_view("object/blog",array( - 'entity' => $blogpost, - 'entity_owner' => $_SESSION['user']->guid, - 'comments' => false, - 'full' => true - )); - - // Set the title appropriately - $title = sprintf(elgg_echo("blog:posttitle"),$_SESSION['user']->name,$blogpost->title); - - // Display through the correct canvas area - $body = elgg_view_layout("two_column_left_sidebar", '', $area1 . $area2); - page_draw($blogpost->title,$body); - -?> +title = get_input('blogtitle'); + $blogpost->description = get_input('blogbody'); + $blogpost->tags = get_input('blogtags'); + $blogpost->access = get_input('access_id'); + $blogpost->comments_on = get_input('comments_select'); + $blogpost->time_created = time(); + + // Convert string of tags into a preformatted array + $blogpost->tags = string_to_tag_array($blogpost->tags); + + // Display it + $area2 = elgg_view("blog/previewpane") . + elgg_view("object/blog",array( + 'entity' => $blogpost, + 'entity_owner' => $_SESSION['user']->guid, + 'comments' => false, + 'full' => true + )); + + // Set the title appropriately + $title = sprintf(elgg_echo("blog:posttitle"),$_SESSION['user']->name,$blogpost->title); + + // Display through the correct canvas area + $body = elgg_view_layout("one_column_with_sidebar", $area1 . $area2); + echo page_draw($blogpost->title,$body); + +?> diff --git a/mod/blog/read.php b/mod/blog/read.php index 7be396759..291a7bdf8 100644 --- a/mod/blog/read.php +++ b/mod/blog/read.php @@ -1,59 +1,66 @@ - - * @copyright Curverider Ltd 2008-2010 - * @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 - if ($blogpost->container_guid) { - set_page_owner($blogpost->container_guid); - } else { - set_page_owner($blogpost->owner_guid); - } - - // Display it - $area2 = elgg_view_entity($blogpost, true); - /*$area2 = 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); - - // Display through the correct canvas area - $body = elgg_view_layout("two_column_left_sidebar", '', $area1 . $area2); - - // 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); - +container_guid) + set_page_owner($blogpost->container_guid); + else + set_page_owner($blogpost->owner_guid); + + //set breadcrumbs + //$area2 = elgg_view('elggcampus_layout/breadcrumbs', array('object_title' => $blogpost->title, 'object_type' => 'blog')); + // Display it + $area2 .= elgg_view_entity($blogpost, true); + //get the blog's access level + $blog_acl = get_readable_access_level($blogpost->access_id); + // Set the title appropriately + $title = $blogpost->title; + //set blog ownerblock if not your own + if($blogpost->owner_guid != get_loggedin_user()->guid){ + $area3 = elgg_view('blog/ownerblock'); + } + //display the read sidebar + //$area3 .= elgg_view('blog/read_sidebar', array('blog_acl' => $blog_acl, 'entity' => $blogpost)); + //if the logged in user is not looking at their stuff, display the ownerblock otherwise + //show the users favourites + if(page_owner() != get_loggedin_user()->guid){ + $area3 = elgg_view('blog/ownerblock'); + }else{ + //a view for the favourites plugin to extend + $area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog')); + } + //display archive + $area3 .= elgg_view("blog/archive"); + //get the latest comments on user's blog posts + $comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc",0,0,page_owner()); + $area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments)); + + // Display through the correct canvas area + $body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3); + +// 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/shared.php b/mod/blog/shared.php new file mode 100644 index 000000000..67dae202e --- /dev/null +++ b/mod/blog/shared.php @@ -0,0 +1,59 @@ + 'blog', 'context' => 'shared', 'sac' => $sac)); + +//set blog header +if(page_owner()== get_loggedin_user()->guid){ + $area1 .= elgg_view('blog/blog_header', array('context' => "own", 'type' => 'blog')); +}elseif($page_owner instanceof ElggGroup){ + $area1 .= elgg_view('groups/blog_header_group'); +}else{ + $area1 .= elgg_view('blog/blog_header_visit', array('type' => 'blog')); +} + +// Get a list of blog posts +set_context('search'); +$get_blogs = list_entities_from_access_id($sac, "object", "blog", 0, 10, false, false,true); +if($get_blogs != "") + $area2 = "
" . $get_blogs . "
"; +else + $area2 = "
There are no blog posts in this work group.
"; +set_context('blog'); +//if the logged in user is not looking at their stuff, display the ownerblock otherwise +//show the users favourites +if(page_owner() != get_loggedin_user()->guid){ + $area3 = elgg_view('blog/ownerblock'); +}else{ + //a view for the favourites plugin to extend + $area3 .= elgg_view("blogs/favourite", array("object_type" => 'blog')); +} +//get the latest comments on user's blog posts +$comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc",0,0,page_owner()); +$area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments)); +//a view for the favourites plugin to extend +$area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog')); +//display archive +$area3 .= elgg_view("blog/archive"); +// Display them in the page +$body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3); + +// Display page +page_draw(sprintf(elgg_echo('blog:workgroup'),$page_owner->name),$body); \ No newline at end of file diff --git a/mod/bookmarks/add.php b/mod/bookmarks/add.php index baf059e75..6f4ca7889 100644 --- a/mod/bookmarks/add.php +++ b/mod/bookmarks/add.php @@ -53,7 +53,7 @@ $area3 .= elgg_view("bookmarks/bookmarklet"); $area3 .= elgg_view("bookmarks/sidebar_options", array("object_type" => 'bookmarks')); // Format page -$body = elgg_view_layout('one_column_with_sidebar', $area3, $area1.$area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); // Draw it echo page_draw(elgg_echo('bookmarks:add'),$body); \ No newline at end of file diff --git a/mod/bookmarks/all.php b/mod/bookmarks/all.php index 6f9a898b5..8f816b285 100644 --- a/mod/bookmarks/all.php +++ b/mod/bookmarks/all.php @@ -36,7 +36,7 @@ $area3 .= elgg_view("bookmarks/sidebar_options", array("object_type" => 'bookmar //include stats $area3 .= elgg_view("bookmarks/stats"); // Format page -$body = elgg_view_layout('one_column_with_sidebar', $area3, $area1.$area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); // Draw it echo page_draw(elgg_echo('bookmarks:all'),$body); \ No newline at end of file diff --git a/mod/bookmarks/bookmarklet.php b/mod/bookmarks/bookmarklet.php index 2262cadff..f068e7c50 100644 --- a/mod/bookmarks/bookmarklet.php +++ b/mod/bookmarks/bookmarklet.php @@ -33,7 +33,7 @@ $area2 .= elgg_view('bookmarks/bookmarklet', array('pg_owner' => $page_owner)); $area3 = elgg_view("bookmarks/bookmarklet"); // Format page -$body = elgg_view_layout('one_column_with_sidebar', $area3, $area1.$area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); // Draw it echo page_draw(elgg_echo('bookmarks:bookmarklet'),$body); \ No newline at end of file diff --git a/mod/bookmarks/friends.php b/mod/bookmarks/friends.php index 3fc4a0d2d..c4e3e3c58 100644 --- a/mod/bookmarks/friends.php +++ b/mod/bookmarks/friends.php @@ -27,7 +27,7 @@ $area3 = elgg_view("bookmarks/sidebar_options", array("object_type" => 'bookmark $area3 .= elgg_view("bookmarks/bookmarklet"); // Format page -$body = elgg_view_layout('one_column_with_sidebar', $area3, $area1.$area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); // Draw it echo page_draw(elgg_echo('bookmarks:friends'),$body); \ No newline at end of file diff --git a/mod/bookmarks/index.php b/mod/bookmarks/index.php index 042ac7346..baff805bf 100644 --- a/mod/bookmarks/index.php +++ b/mod/bookmarks/index.php @@ -53,7 +53,7 @@ if(page_owner() != get_loggedin_user()->guid){ //include a view for plugins to extend $area3 .= elgg_view("bookmarks/sidebar_options", array("object_type" => 'bookmarks')); // Format page -$body = elgg_view_layout('one_column_with_sidebar', $area3, $area1.$area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); // Draw it echo page_draw(sprintf(elgg_echo("bookmarks:user"),page_owner_entity()->name), $body); \ No newline at end of file diff --git a/mod/diagnostics/index.php b/mod/diagnostics/index.php index 324790f29..6ff8b7bde 100644 --- a/mod/diagnostics/index.php +++ b/mod/diagnostics/index.php @@ -39,4 +39,4 @@ $body .= elgg_view('page_elements/elgg_content', array( ); $body .= ""; // create page -page_draw(elgg_echo('diagnostics'), elgg_view_layout("one_column_with_sidebar", '', $body)); +page_draw(elgg_echo('diagnostics'), elgg_view_layout("one_column_with_sidebar", $body)); diff --git a/mod/externalpages/index.php b/mod/externalpages/index.php index a7c33a515..abfa53199 100644 --- a/mod/externalpages/index.php +++ b/mod/externalpages/index.php @@ -29,5 +29,5 @@ $edit = elgg_view('expages/forms/edit', array('type' => $type)); $body = elgg_view('page_elements/elgg_content',array('body' => elgg_view('expages/menu', array('type' => $type)).$edit)); // Display -page_draw(elgg_echo('expages'),elgg_view_layout("one_column_with_sidebar", '', $title . $body)); +page_draw(elgg_echo('expages'),elgg_view_layout("one_column_with_sidebar", $title . $body)); ?> \ No newline at end of file diff --git a/mod/externalpages/read.php b/mod/externalpages/read.php index 10ef4e3a1..466c3a0be 100644 --- a/mod/externalpages/read.php +++ b/mod/externalpages/read.php @@ -30,7 +30,7 @@ if($contents){ $area1 .= elgg_view('page_elements/elgg_content',array('body' => elgg_echo("expages:notset"))); // Display through the correct canvas area -$body = elgg_view_layout("one_column_with_sidebar", '', $area1); +$body = elgg_view_layout("one_column_with_sidebar", $area1); // Display page page_draw($title,$body); \ No newline at end of file diff --git a/mod/groups/addtopic.php b/mod/groups/addtopic.php index 04a040745..ed9343fef 100644 --- a/mod/groups/addtopic.php +++ b/mod/groups/addtopic.php @@ -21,7 +21,7 @@ // sort the display $area2 = elgg_view("forms/forums/addtopic"); - $body = elgg_view_layout('one_column_with_sidebar','',$area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); // Display page page_draw(elgg_echo('groups:addtopic'),$body); diff --git a/mod/groups/all.php b/mod/groups/all.php index 51c337238..11c3235d1 100644 --- a/mod/groups/all.php +++ b/mod/groups/all.php @@ -61,7 +61,7 @@ $title = sprintf(elgg_echo("groups:all"),page_owner_entity()->name); $area2 = elgg_view_title($title); $area2 .= elgg_view("groups/group_sort_menu", array("count" => $group_count, "filter" => $filter)) . $objects; - $body = elgg_view_layout('one_column_with_sidebar',$area1,$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area2, $area1); // Finally draw the page page_draw($title, $body); diff --git a/mod/groups/discussions.php b/mod/groups/discussions.php index 31dd2b7ef..1568bf88e 100644 --- a/mod/groups/discussions.php +++ b/mod/groups/discussions.php @@ -23,7 +23,7 @@ $area2 .= list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 40, 0, 0, false, true); set_context('groups'); - $body = elgg_view_layout("one_column_with_sidebar", '', $area2); + $body = elgg_view_layout("one_column_with_sidebar", $area2); // Display page page_draw(elgg_echo('groups:latestdiscussion'),$body); diff --git a/mod/groups/edit.php b/mod/groups/edit.php index 5d33d2bc3..94160891a 100644 --- a/mod/groups/edit.php +++ b/mod/groups/edit.php @@ -27,7 +27,7 @@ $body .= elgg_echo('groups:noaccess'); } - $body = elgg_view_layout('one_column_with_sidebar', '', $body); + $body = elgg_view_layout('one_column_with_sidebar', $body); page_draw($title, $body); ?> \ No newline at end of file diff --git a/mod/groups/edittopic.php b/mod/groups/edittopic.php index 2f8f14a02..6c4b97a25 100644 --- a/mod/groups/edittopic.php +++ b/mod/groups/edittopic.php @@ -28,7 +28,7 @@ // sort the display $area2 = elgg_view("forms/forums/edittopic", array('entity' => $topic)); - $body = elgg_view_layout('one_column_with_sidebar', '', $area2); + $body = elgg_view_layout('one_column_with_sidebar', $area2); // Display page page_draw(elgg_echo('groups:edittopic'),$body); diff --git a/mod/groups/forum.php b/mod/groups/forum.php index f9c5131cc..531cc1fd6 100644 --- a/mod/groups/forum.php +++ b/mod/groups/forum.php @@ -23,7 +23,7 @@ $area2 = elgg_view("forum/topics", array('topics' => $topics)); set_context('groups'); - $body = elgg_view_layout('one_column_with_sidebar','', $area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); $title = elgg_echo('item:object:groupforumtopic'); diff --git a/mod/groups/groupprofile.php b/mod/groups/groupprofile.php index 721604691..42875b52f 100644 --- a/mod/groups/groupprofile.php +++ b/mod/groups/groupprofile.php @@ -45,14 +45,14 @@ } - $body = elgg_view_layout('one_column_with_sidebar', $area3, $area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); } else { $title = elgg_echo('groups:notfound'); $area2 = elgg_view_title($title); $area2 .= elgg_echo('groups:notfound:details'); - $body = elgg_view_layout('one_column_with_sidebar', '', $area2); + $body = elgg_view_layout('one_column_with_sidebar', $area2); } // Finally draw the page diff --git a/mod/groups/index.php b/mod/groups/index.php index 36137033d..94853d373 100644 --- a/mod/groups/index.php +++ b/mod/groups/index.php @@ -24,7 +24,7 @@ set_context('groups'); $area2 .= $objects; - $body = elgg_view_layout('one_column_with_sidebar','', $area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); // Finally draw the page page_draw($title, $body); diff --git a/mod/groups/invitations.php b/mod/groups/invitations.php index e9b8f1cf1..f2594c786 100644 --- a/mod/groups/invitations.php +++ b/mod/groups/invitations.php @@ -28,6 +28,6 @@ if ($user) { $area2 .= elgg_echo("groups:noaccess"); } -$body = elgg_view_layout('one_column_with_sidebar', '', $area2); +$body = elgg_view_layout('one_column_with_sidebar', $area2); page_draw($title, $body); \ No newline at end of file diff --git a/mod/groups/invite.php b/mod/groups/invite.php index 1ce9fd863..f83ad51eb 100644 --- a/mod/groups/invite.php +++ b/mod/groups/invite.php @@ -28,7 +28,7 @@ $area2 .= elgg_echo("groups:noaccess"); } - $body = elgg_view_layout('one_column_with_sidebar', '', $area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); page_draw($title, $body); ?> \ No newline at end of file diff --git a/mod/groups/membership.php b/mod/groups/membership.php index 66cd5ed16..4b5d6b89f 100644 --- a/mod/groups/membership.php +++ b/mod/groups/membership.php @@ -30,7 +30,7 @@ set_context('groups'); $area2 .= $objects; - $body = elgg_view_layout('one_column_with_sidebar','',$area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); // Finally draw the page page_draw($title, $body); diff --git a/mod/groups/membershipreq.php b/mod/groups/membershipreq.php index a812a213c..ed41c76bf 100644 --- a/mod/groups/membershipreq.php +++ b/mod/groups/membershipreq.php @@ -30,7 +30,7 @@ $area2 .= elgg_echo("groups:noaccess"); } - $body = elgg_view_layout('one_column_with_sidebar', '',$area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); page_draw($title, $body); ?> \ No newline at end of file diff --git a/mod/groups/new.php b/mod/groups/new.php index 3459c3f4a..32b8d1902 100644 --- a/mod/groups/new.php +++ b/mod/groups/new.php @@ -16,7 +16,7 @@ $area2 = elgg_view_title($title); $area2 .= elgg_view("forms/groups/edit"); - $body = elgg_view_layout('one_column_with_sidebar', '',$area1.$area2); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); page_draw($title, $body); ?> \ No newline at end of file diff --git a/mod/groups/topicposts.php b/mod/groups/topicposts.php index 70d3c199b..9f8c962d7 100644 --- a/mod/groups/topicposts.php +++ b/mod/groups/topicposts.php @@ -29,7 +29,7 @@ // Display them $area2 = elgg_view("forum/viewposts", array('entity' => $topic)); - $body = elgg_view_layout("one_column_with_sidebar", '', $area2); + $body = elgg_view_layout("one_column_with_sidebar", $area2); // Display page page_draw($topic->title,$body); diff --git a/mod/logbrowser/index.php b/mod/logbrowser/index.php index f3c9e4d41..3629b94d5 100644 --- a/mod/logbrowser/index.php +++ b/mod/logbrowser/index.php @@ -59,6 +59,6 @@ set_context('admin'); // Display main admin menu - page_draw(elgg_echo('logbrowser'),elgg_view_layout("one_column_with_sidebar", '', $title . $form . $result)); + page_draw(elgg_echo('logbrowser'),elgg_view_layout("one_column_with_sidebar", $title . $form . $result)); ?> diff --git a/mod/members/index.php b/mod/members/index.php index d9ef0a732..c19ed8b4a 100644 --- a/mod/members/index.php +++ b/mod/members/index.php @@ -73,7 +73,7 @@ switch($filter){ $area2 .= elgg_view('page_elements/elgg_content', array('body' => elgg_view("members/members_navigation", array("count" => $members, "filter" => $filter)) . "
".$filter_content."
", 'subclass' => 'members')); //select the correct canvas area -$body = elgg_view_layout("one_column_with_sidebar", $area1, $area2); +$body = elgg_view_layout("one_column_with_sidebar", $area2, $area1); // Display page page_draw(sprintf(elgg_echo('members:members'), $page_owner->name), $body); \ No newline at end of file diff --git a/mod/messages/index.php b/mod/messages/index.php index e5124a71a..97c1cfff4 100644 --- a/mod/messages/index.php +++ b/mod/messages/index.php @@ -45,7 +45,7 @@ $area2 .= elgg_view("messages/forms/view",array('entity' => $messages, 'page_vie //$area3 = elgg_view("messages/menu_options", array('context' => 'inbox')); // format -$body = elgg_view_layout("one_column_with_sidebar",'',$area2); +$body = elgg_view_layout("one_column_with_sidebar", $area2); // Draw page diff --git a/mod/messages/read.php b/mod/messages/read.php index 2c3c5af50..9e84a3e67 100644 --- a/mod/messages/read.php +++ b/mod/messages/read.php @@ -52,7 +52,7 @@ $content = elgg_view("messages/messages",array( $sidebar = elgg_view("messages/menu_options"); -$body = elgg_view_layout("one_column_with_sidebar", $sidebar, $content); +$body = elgg_view_layout("one_column_with_sidebar", $content, $sidebar); // Display page page_draw(sprintf(elgg_echo('messages:message')),$body); \ No newline at end of file diff --git a/mod/messages/send.php b/mod/messages/send.php index ecab60073..f918eec5c 100644 --- a/mod/messages/send.php +++ b/mod/messages/send.php @@ -36,7 +36,7 @@ $area2 .= elgg_view("messages/forms/send",array('friends' => $friends)); $area3 = elgg_view("messages/menu_options"); // Format -$body = elgg_view_layout("one_column_with_sidebar", $area3, $area2); +$body = elgg_view_layout("one_column_with_sidebar", $area2, $area3); // Draw page page_draw(sprintf(elgg_echo('messages:send'),$page_owner->name),$body); \ No newline at end of file diff --git a/mod/messages/sent.php b/mod/messages/sent.php index 750e932e7..4f432b47f 100644 --- a/mod/messages/sent.php +++ b/mod/messages/sent.php @@ -37,7 +37,7 @@ $area2 .= "
$messages, 'page_view' => "sent", 'limit' => $limit, 'offset' => $offset)); // Format -$body = elgg_view_layout("one_column_with_sidebar",'',$area2); +$body = elgg_view_layout("one_column_with_sidebar", $area2); // Draw page page_draw(sprintf(elgg_echo('messages:sentMessages'),$page_owner->name),$body); \ No newline at end of file diff --git a/mod/profile/defaultprofile.php b/mod/profile/defaultprofile.php index 1e2884582..233214c15 100644 --- a/mod/profile/defaultprofile.php +++ b/mod/profile/defaultprofile.php @@ -46,4 +46,4 @@ $listing .= "
" . elgg_view('input/form', set_context('admin'); -page_draw(elgg_echo('profile:edit:default'),elgg_view_layout("one_column_with_sidebar", '', $title . $form . $listing)); \ No newline at end of file +page_draw(elgg_echo('profile:edit:default'),elgg_view_layout("one_column_with_sidebar", $title . $form . $listing)); \ No newline at end of file diff --git a/mod/profile/edit.php b/mod/profile/edit.php index 313d144fe..9894ce35d 100644 --- a/mod/profile/edit.php +++ b/mod/profile/edit.php @@ -40,7 +40,7 @@ $area1 = ""; set_context('profile_edit'); // get the required canvas area -$body = elgg_view_layout("one_column_with_sidebar", $area1, $area2); +$body = elgg_view_layout("one_column_with_sidebar", $area2, $area1); // Draw the page page_draw(elgg_echo("profile:edit"),$body); diff --git a/mod/profile/editicon.php b/mod/profile/editicon.php index 1c5c20d30..65b4b10da 100644 --- a/mod/profile/editicon.php +++ b/mod/profile/editicon.php @@ -37,7 +37,7 @@ $area2 .= elgg_view("profile/edit_icon", array('user' => $user)); set_context('profile_edit'); // Get the form and correct canvas area -$body = elgg_view_layout("one_column_with_sidebar", '', $area2); +$body = elgg_view_layout("one_column_with_sidebar", $area2); // Draw the page page_draw(elgg_echo("profile:editicon"), $body); diff --git a/mod/reportedcontent/add.php b/mod/reportedcontent/add.php index 4087012cf..17076df01 100644 --- a/mod/reportedcontent/add.php +++ b/mod/reportedcontent/add.php @@ -27,7 +27,7 @@ $area2 .= elgg_view('reportedcontent/form'); $area3 .= elgg_echo('reportedcontent:warning'); // Format page -$body = elgg_view_layout('one_column_with_sidebar', '', $area2,$area3); +$body = elgg_view_layout('one_column_with_sidebar', $area2, $area3); // Draw it page_draw(elgg_echo('reportedcontent:this'),$body); \ No newline at end of file diff --git a/mod/reportedcontent/index.php b/mod/reportedcontent/index.php index 400e0dc1f..3f3a4c5fe 100644 --- a/mod/reportedcontent/index.php +++ b/mod/reportedcontent/index.php @@ -24,4 +24,4 @@ $reported = elgg_get_entities(array('types' => 'object', 'subtypes' => 'reported $area2 = elgg_view("reportedcontent/listing", array('entity' => $reported)); // Display main admin menu -page_draw(elgg_echo('reportedcontent'),elgg_view_layout("one_column_with_sidebar", '', $title . $area2)); \ No newline at end of file +page_draw(elgg_echo('reportedcontent'),elgg_view_layout("one_column_with_sidebar", $title . $area2)); \ No newline at end of file diff --git a/mod/search/index.php b/mod/search/index.php index ff251dddc..a09c688ed 100644 --- a/mod/search/index.php +++ b/mod/search/index.php @@ -134,7 +134,7 @@ if (!$query) { $body = elgg_view_title(elgg_echo('search:search_error')); $body .= elgg_view('page_elements/elgg_content', array('body' => elgg_echo('search:no_query'))); - $layout = elgg_view_layout('one_column_with_sidebar', '', $body); + $layout = elgg_view_layout('one_column_with_sidebar', $body); page_draw($title, $layout); return; diff --git a/mod/search/views/default/search/layout.php b/mod/search/views/default/search/layout.php index 5a66ac47c..28b0ff235 100644 --- a/mod/search/views/default/search/layout.php +++ b/mod/search/views/default/search/layout.php @@ -8,4 +8,4 @@ * @link http://elgg.org/ */ -echo elgg_view_layout('one_column_with_sidebar', '', $vars['body']); \ No newline at end of file +echo elgg_view_layout('one_column_with_sidebar', $vars['body']); \ No newline at end of file diff --git a/mod/sitepages/sitepages_functions.php b/mod/sitepages/sitepages_functions.php index 0341b590b..000a5eb1a 100644 --- a/mod/sitepages/sitepages_functions.php +++ b/mod/sitepages/sitepages_functions.php @@ -86,7 +86,7 @@ function sitepages_get_edit_section_content($page_type) { $form .= elgg_view($view, array('page_type' => $page_type)); $body = $title . $menu . $form; - $content = elgg_view_layout('one_column_with_sidebar', '', $body, $keywords); + $content = elgg_view_layout('one_column_with_sidebar', $body, $keywords); return $content; } @@ -107,7 +107,7 @@ function sitepages_get_page_content($page_type) { $body .= elgg_view('page_elements/elgg_content', array('body' => elgg_echo('sitepages:notset'))); } - $content = elgg_view_layout('one_column_with_sidebar', '', $body); + $content = elgg_view_layout('one_column_with_sidebar', $body); return $content; } diff --git a/mod/thewire/add.php b/mod/thewire/add.php index 6012338fa..213b633c7 100644 --- a/mod/thewire/add.php +++ b/mod/thewire/add.php @@ -21,7 +21,7 @@ $area2 = elgg_view_title(elgg_echo('thewire:add')); $area2 .= elgg_view("thewire/forms/add"); - $body = elgg_view_layout("one_column_with_sidebar", '',$area2); + $body = elgg_view_layout("one_column_with_sidebar", $area2); // Display page page_draw(elgg_echo('thewire:addpost'),$body); diff --git a/mod/thewire/everyone.php b/mod/thewire/everyone.php index db35f4410..1f0913ab3 100644 --- a/mod/thewire/everyone.php +++ b/mod/thewire/everyone.php @@ -19,7 +19,7 @@ $area2 .= elgg_view("thewire/forms/add"); $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'thewire')); - $body = elgg_view_layout("one_column_with_sidebar", '', $area2); + $body = elgg_view_layout("one_column_with_sidebar", $area2); // Display page page_draw(elgg_echo('thewire:everyone'),$body); diff --git a/mod/thewire/index.php b/mod/thewire/index.php index 078e93271..a1e0a97ab 100644 --- a/mod/thewire/index.php +++ b/mod/thewire/index.php @@ -34,7 +34,7 @@ $area2 .= list_user_objects($page_owner->getGUID(),'thewire'); //select the correct canvas area - $body = elgg_view_layout("one_column_with_sidebar", '', $area2); + $body = elgg_view_layout("one_column_with_sidebar", $area2); // Display page page_draw(sprintf(elgg_echo('thewire:user'),$page_owner->name),$body); diff --git a/mod/walledgarden/index.php b/mod/walledgarden/index.php index 251725496..b5b6e57c6 100644 --- a/mod/walledgarden/index.php +++ b/mod/walledgarden/index.php @@ -20,6 +20,6 @@ $area1 = "This site is running in walled garden mode.
Therefore you will need to be invited & logged in to see anything."; //display the contents in our new canvas layout -$body = elgg_view_layout('one_column_with_sidebar', $login, $area1); +$body = elgg_view_layout('one_column_with_sidebar', $area1, $login); page_draw($title, $body); \ No newline at end of file -- cgit v1.2.3