diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-09 09:39:34 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-09 09:39:34 +0000 |
commit | ff4779ddb3ef005553187e4486d4d775220d8b8f (patch) | |
tree | 7765c79ad2cffd028dd5da9d1db68ca176faf9a3 | |
parent | 9bb993778bc7a0c6f17673e509ed147202e69ee7 (diff) | |
download | elgg-ff4779ddb3ef005553187e4486d4d775220d8b8f.tar.gz elgg-ff4779ddb3ef005553187e4486d4d775220d8b8f.tar.bz2 |
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
63 files changed, 417 insertions, 320 deletions
diff --git a/admin/plugins.php b/admin/plugins.php index ba6a3bf6b..358c42ec5 100644 --- a/admin/plugins.php +++ b/admin/plugins.php @@ -23,6 +23,6 @@ $vars = array('installed_plugins' => get_installed_plugins()); $title = elgg_view_title(elgg_echo('admin:plugins')); $main_box = elgg_view("admin/plugins", $vars); -$content = elgg_view_layout("one_column_with_sidebar", '', $title . $main_box); +$content = elgg_view_layout("one_column_with_sidebar", $title . $main_box); page_draw(elgg_echo('admin:plugins'), $content); diff --git a/admin/site.php b/admin/site.php index ad05ea312..aed952318 100644 --- a/admin/site.php +++ b/admin/site.php @@ -18,6 +18,6 @@ admin_gatekeeper(); $title = elgg_view_title(elgg_echo('admin:site')); $main_box = elgg_view("admin/site"); -$content = elgg_view_layout("one_column_with_sidebar", '', $title . $main_box); +$content = elgg_view_layout("one_column_with_sidebar", $title . $main_box); page_draw(elgg_echo("admin:site"), $content);
\ No newline at end of file diff --git a/admin/statistics.php b/admin/statistics.php index a267937f8..9823995b5 100644 --- a/admin/statistics.php +++ b/admin/statistics.php @@ -18,6 +18,6 @@ admin_gatekeeper(); // Display main admin menu $title = elgg_view_title(elgg_echo('admin:statistics')); $main_box = elgg_view("admin/statistics"); -$content = elgg_view_layout("one_column_with_sidebar", '', $title . $main_box); +$content = elgg_view_layout("one_column_with_sidebar", $title . $main_box); page_draw(elgg_echo("admin:statistics"), $content);
\ No newline at end of file diff --git a/admin/user.php b/admin/user.php index 16163e448..f47c18b4c 100644 --- a/admin/user.php +++ b/admin/user.php @@ -31,8 +31,4 @@ set_context('admin'); // Display main admin menu page_draw(elgg_echo("admin:user"), - elgg_view_layout("one_column_with_sidebar", - '', - $title . elgg_view("admin/user") . $result - ) -); + elgg_view_layout("one_column_with_sidebar", $title . elgg_view("admin/user") . $result)); diff --git a/dashboard/latest.php b/dashboard/latest.php index 750754518..c1a3d3db5 100644 --- a/dashboard/latest.php +++ b/dashboard/latest.php @@ -24,5 +24,5 @@ if(is_plugin_enabled('riverdashboard')) { } else { $content = "Riverdashboard not loaded"; } -$content = elgg_view_layout('one_column_with_sidebar', '', $title . $content); +$content = elgg_view_layout('one_column_with_sidebar', $title . $content); page_draw(elgg_echo('content:latest'), $content); diff --git a/friends/add.php b/friends/add.php index a70dd12cf..a7bbb6218 100644 --- a/friends/add.php +++ b/friends/add.php @@ -20,8 +20,7 @@ $area2 = elgg_view('friends/forms/edit', array( ); // Format page -$body = elgg_view_layout('one_column_with_sidebar', '', - elgg_view_title(elgg_echo('friends:collections:add')) . $area2); +$body = elgg_view_layout('one_column_with_sidebar', elgg_view_title(elgg_echo('friends:collections:add')) . $area2); // Draw it page_draw(elgg_echo('friends:collections:add'),$body);
\ No newline at end of file diff --git a/friends/collections.php b/friends/collections.php index e98f4b6a6..5d3149de5 100644 --- a/friends/collections.php +++ b/friends/collections.php @@ -17,8 +17,7 @@ gatekeeper(); $area2 = elgg_view_access_collections($_SESSION['user']->getGUID()); // Format page -$body = elgg_view_layout('one_column_with_sidebar', '', - elgg_view_title(elgg_echo('friends:collections')) . $area2); +$body = elgg_view_layout('one_column_with_sidebar', elgg_view_title(elgg_echo('friends:collections')) . $area2); // Draw it page_draw(elgg_echo('friends:collections'),$body);
\ No newline at end of file diff --git a/friends/edit.php b/friends/edit.php index b9d682eb3..428b44bad 100644 --- a/friends/edit.php +++ b/friends/edit.php @@ -29,7 +29,7 @@ $collection_members = get_members_of_access_collection($collection_id); $area2 = elgg_view('friends/forms/edit', array('collection' => $collection, 'collection_members' => $collection_members)); // Format page -$body = elgg_view_layout('one_column_with_sidebar', '', $area1.$area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2); // Draw it page_draw(elgg_echo('friends:add'),$body);
\ No newline at end of file diff --git a/friends/index.php b/friends/index.php index 1a093da2e..7ddbd45cc 100644 --- a/friends/index.php +++ b/friends/index.php @@ -17,6 +17,6 @@ $friends = sprintf(elgg_echo("friends:owned"),$owner->name); $area1 = elgg_view_title($friends); $area2 = list_entities_from_relationship('friend',$owner->getGUID(),false,'user','',0,10,false); -$body = elgg_view_layout('one_column_with_sidebar', '', $area1 . $area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1 . $area2); page_draw($friends, $body); diff --git a/friends/of.php b/friends/of.php index b30b47215..f8c3b1981 100644 --- a/friends/of.php +++ b/friends/of.php @@ -17,7 +17,7 @@ $friends_of = sprintf(elgg_echo("friends:of:owned"),$owner->name); $area1 = elgg_view_title($friends_of); $area2 = list_entities_from_relationship('friend',$owner->getGUID(),true,'user','',0,10,false); -$body = elgg_view_layout('one_column_with_sidebar', '', $area1 . $area2); +$body = elgg_view_layout('one_column_with_sidebar', $area1 . $area2); page_draw($friends_of, $body); @@ -32,6 +32,6 @@ if (!trigger_plugin_hook('index', 'system', null, FALSE)) { global $autofeed; $autofeed = FALSE; - $content = elgg_view_layout('one_column_with_sidebar', elgg_view('account/forms/login'), $title . $content); + $content = elgg_view_layout('one_column_with_sidebar', $title, elgg_view('account/forms/login')); page_draw(null, $content); } 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 @@ +<?php + + /** + * Elgg view all blog posts from all users page + */ + + // Load Elgg engine + define('everyoneblog','true'); + require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + + // Get the current page's owner + $page_owner = $_SESSION['user']; + set_page_owner($_SESSION['guid']); + + //set blog title + //$area1 = elgg_view('blog/blog_header', array('context' => "everyone", 'type' => 'blog')); + set_context('search'); + $area2 .= "<div id='blogs'>" . list_entities('object','blog',0,10,false) . "<div class='clearfloat'></div></div>"; + 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 @@ -<?php - - /** - * Elgg blog archive page - * - * @package ElggBlog - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @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 +<?php
+
+/**
+ * Elgg blog archive page
+ */
+
+// 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']);
+}
+//set breadcrumbs if in a group
+//$area1 = elgg_view('elggcampus_layout/breadcrumbs_general', array('object_type' => '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 .= "<div id=\"blogs\">" . $blogs . "<div class='clearfloat'></div></div>";
+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 @@ -<?php - - /** - * Elgg blog friends page - * - * @package ElggBlog - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @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 .= "<div id='blogs'>" . list_user_friends_objects($page_owner->getGUID(),'blog',10,false) . "<div class='clearfloat'></div></div>"; - - // 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); - +<?php
+
+ /**
+ * Elgg blog friends page
+ */
+
+ // 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 blog title
+ $area1 = elgg_view('blog/blog_header', array('context' => "friends", 'type' => 'blog'));
+
+ // Get a list of blog posts
+ set_context('search');
+ $area2 .= "<div id='blogs'>" . list_user_friends_objects($page_owner->getGUID(),'blog',10,false) . "<div class='clearfloat'></div></div>";
+ 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 @@ -<?php - - /** - * Elgg blog index page - * - * @package ElggBlog - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @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 .= "<div id=\"blogs\">"; - $area2 .= elgg_list_entities(array('type' => 'object', 'subtype' => 'blog', 'container_guid' => page_owner(), 'limit' => 10, 'full_view' => FALSE, 'view_type_toggle' => FALSE)); - $area2 .= "<div class='clearfloat'></div></div>"; - - // 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 +<?php
+
+/**
+ * Elgg blog index page
+ */
+
+// 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']);
+}
+
+//set breadcrumbs if in a group
+//$area1 = elgg_view('elggcampus_layout/breadcrumbs_general', array('object_type' => '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 = "<div id=\"blogs\">" . $blogs . "<div class='clearfloat'></div></div>";
+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 @@ -<?php - - /** - * Elgg blog: preview page - * - * @package ElggBlog - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @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); - -?> +<?php
+
+ /**
+ * Elgg blog: preview page
+ */
+
+ 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("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 @@ -<?php - - /** - * Elgg read blog post page - * - * @package ElggBlog - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @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); - +<?php
+
+ /**
+ * Elgg read blog post page
+ * @package ElggBlog
+ * @copyright Curverider Ltd 2008-2009
+ */
+
+// 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)) {
+ // Set variables
+ $blog_acl = '';
+ // Set the page owner
+ if ($blogpost->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 @@ +<?php + +/** + * Elgg blog shared page + */ + +// 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 the shared access collection +$sac = get_input('sac'); + +//set breadcrumbs +//$area1 = elgg_view('elggcampus_layout/breadcrumbs_general', array('object_type' => '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 = "<div id=\"blogs\">" . $get_blogs . "<div class='clearfloat'></div></div>"; +else + $area2 = "<div class=\"ContentWrapper\">There are no blog posts in this work group.</div>"; +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 .= "</div>"; // 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)) . "<div class='members_list'>".$filter_content."</div>", '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 .= "<div class='content_header_options'><a class='action_button' href='{$ $area2 .= elgg_view("messages/forms/view",array('entity' => $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 .= "<div class='default_profile_reset'>" . 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. <br /> 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 diff --git a/settings/plugins.php b/settings/plugins.php index d26f626f7..11459a6b7 100644 --- a/settings/plugins.php +++ b/settings/plugins.php @@ -20,4 +20,4 @@ if ((!page_owner_entity()) || (!page_owner_entity()->canEdit())) { } // Display main admin menu -page_draw(elgg_echo("usersettings:plugins"),elgg_view_layout('one_column_with_sidebar', '', elgg_view_title(elgg_echo("usersettings:plugins")) . elgg_view("usersettings/plugins", array('installed_plugins' => get_installed_plugins())))); +page_draw(elgg_echo("usersettings:plugins"),elgg_view_layout('one_column_with_sidebar', elgg_view_title(elgg_echo("usersettings:plugins")) . elgg_view("usersettings/plugins", array('installed_plugins' => get_installed_plugins())))); diff --git a/settings/statistics.php b/settings/statistics.php index 48bf46a04..f354168b4 100644 --- a/settings/statistics.php +++ b/settings/statistics.php @@ -20,4 +20,4 @@ if ((!page_owner_entity()) || (!page_owner_entity()->canEdit())) { } // Display main admin menu -page_draw(elgg_echo("usersettings:statistics"),elgg_view_layout('one_column_with_sidebar','',elgg_view_title(elgg_echo("usersettings:statistics")) . elgg_view("usersettings/statistics")));
\ No newline at end of file +page_draw(elgg_echo("usersettings:statistics"),elgg_view_layout('one_column_with_sidebar', elgg_view_title(elgg_echo("usersettings:statistics")) . elgg_view("usersettings/statistics")));
\ No newline at end of file diff --git a/settings/user.php b/settings/user.php index 8bfdc87fa..7e7a3967f 100644 --- a/settings/user.php +++ b/settings/user.php @@ -22,5 +22,5 @@ if ((!page_owner_entity()) || (!page_owner_entity()->canEdit())) { // Display main admin menu page_draw( elgg_echo("usersettings:user"), - elgg_view_layout("one_column_with_sidebar", '', elgg_view_title(elgg_echo('usersettings:user')) . elgg_view("usersettings/form")) + elgg_view_layout("one_column_with_sidebar", elgg_view_title(elgg_echo('usersettings:user')) . elgg_view("usersettings/form")) );
\ No newline at end of file diff --git a/views/default/canvas/layouts/one_column_with_sidebar.php b/views/default/canvas/layouts/one_column_with_sidebar.php index f7fff4d08..d7271c9c3 100644 --- a/views/default/canvas/layouts/one_column_with_sidebar.php +++ b/views/default/canvas/layouts/one_column_with_sidebar.php @@ -12,12 +12,14 @@ <div id="elgg_sidebar"> <?php echo elgg_view('page_elements/owner_block'); - if (isset($vars['area1'])) echo $vars['area1']; - if (isset($vars['area3'])) echo $vars['area3']; + if (isset($vars['area2'])) echo $vars['area2']; + if (isset($vars['area3'])) echo $vars['area3']; ?> </div> <div id="elgg_page_contents" class="clearfloat"> - <?php if (isset($vars['area2'])) echo $vars['area2']; ?> + <?php + if (isset($vars['area1'])) echo $vars['area1']; + ?> </div> </div> |