]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated new page canvases (and calls to elgg_view_layout) so that empty vars are...
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Mar 2010 09:39:34 +0000 (09:39 +0000)
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Mar 2010 09:39:34 +0000 (09:39 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5316 36083f99-b078-4883-b0ff-0f9b5a30f544

63 files changed:
admin/plugins.php
admin/site.php
admin/statistics.php
admin/user.php
dashboard/latest.php
friends/add.php
friends/collections.php
friends/edit.php
friends/index.php
friends/of.php
index.php
mod/blog/all.php [new file with mode: 0644]
mod/blog/archive.php
mod/blog/everyone.php
mod/blog/friends.php
mod/blog/index.php
mod/blog/preview.php
mod/blog/read.php
mod/blog/shared.php [new file with mode: 0644]
mod/bookmarks/add.php
mod/bookmarks/all.php
mod/bookmarks/bookmarklet.php
mod/bookmarks/friends.php
mod/bookmarks/index.php
mod/diagnostics/index.php
mod/externalpages/index.php
mod/externalpages/read.php
mod/groups/addtopic.php
mod/groups/all.php
mod/groups/discussions.php
mod/groups/edit.php
mod/groups/edittopic.php
mod/groups/forum.php
mod/groups/groupprofile.php
mod/groups/index.php
mod/groups/invitations.php
mod/groups/invite.php
mod/groups/membership.php
mod/groups/membershipreq.php
mod/groups/new.php
mod/groups/topicposts.php
mod/logbrowser/index.php
mod/members/index.php
mod/messages/index.php
mod/messages/read.php
mod/messages/send.php
mod/messages/sent.php
mod/profile/defaultprofile.php
mod/profile/edit.php
mod/profile/editicon.php
mod/reportedcontent/add.php
mod/reportedcontent/index.php
mod/search/index.php
mod/search/views/default/search/layout.php
mod/sitepages/sitepages_functions.php
mod/thewire/add.php
mod/thewire/everyone.php
mod/thewire/index.php
mod/walledgarden/index.php
settings/plugins.php
settings/statistics.php
settings/user.php
views/default/canvas/layouts/one_column_with_sidebar.php

index ba6a3bf6bad3936aa76bb288fa01ea117070f302..358c42ec5a52ff87feeb20846cc6e0cbae73044e 100644 (file)
@@ -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);
index ad05ea312dd2dc8573e7c8240cbf87def3a85699..aed9523186ff9267d9349a738e7c171cb1859eef 100644 (file)
@@ -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
index a267937f86aad144c9c0ff6530d02b3e07658951..9823995b50b53c646dcaa79f8b7d10ba2f31aa8e 100644 (file)
@@ -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
index 16163e448989ca5edbdadd89849836122def036f..f47c18b4c4b3f70d8adae71bcbfb74202356c998 100644 (file)
@@ -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));
index 75075451874faa75b88eee1aaa264fb7e21a3598..c1a3d3db55aec62018dd3657feda37c7a1ad5436 100644 (file)
@@ -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);
index a70dd12cf4a9d771d1cf838440fbcb6631b84675..a7bbb6218e5401e41e787b5c35bca35d2d6a834e 100644 (file)
@@ -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
index e98f4b6a62107d4181c91b0bf3718bc153b55dae..5d3149de5b7c5663fe96e2ca2465effe47160dea 100644 (file)
@@ -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
index b9d682eb3c6134c8c747746d475cb88ceb7e0790..428b44bad5a0a4f9e578650ce067b39b2e8398c7 100644 (file)
@@ -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
index 1a093da2e1b36470b0ca412e05f1929ca4a8bd8c..7ddbd45cc290713bd538a5daf5f37098f02304e9 100644 (file)
@@ -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);
index b30b4721597f64f9702b79a360e65b9fce416680..f8c3b1981d37f2e9575fb048175314140d4955c8 100644 (file)
@@ -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);
 
index f289fe20bc793b48155775845d4cfb26b7e5e21b..c559df5b3eb4f376a6da2f2e60ba0ab067c16cdc 100644 (file)
--- a/index.php
+++ b/index.php
@@ -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 (file)
index 0000000..ab1832d
--- /dev/null
@@ -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
index a1a6a528e8865a67efd695438dee1b75c04ef1f1..9648c75c040c8e4b7a98088c6d355a8951d4fd0b 100644 (file)
@@ -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\r
+\r
+/**\r
+ * Elgg blog archive page\r
+ */\r
+\r
+// Load Elgg engine\r
+require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");\r
+               \r
+// Get the current page's owner\r
+$page_owner = page_owner_entity();\r
+if ($page_owner === false || is_null($page_owner)) {\r
+       $page_owner = $_SESSION['user'];\r
+       set_page_owner($_SESSION['guid']);\r
+}\r
+//set breadcrumbs if in a group\r
+//$area1 = elgg_view('elggcampus_layout/breadcrumbs_general', array('object_type' => 'blog')); \r
+// Get timestamp upper and lower bounds\r
+$timelower = (int) get_input('param2');\r
+$timeupper = (int) get_input('param3');\r
+if (empty($timelower)) {\r
+       forward('pg/blog/'.$page_owner->username);\r
+       exit;\r
+}\r
+if (empty($timeupper)) {\r
+       $timeupper = $timelower + (86400 * 30);\r
+}\r
+\r
+// Set blog title\r
+$area2 = elgg_view_title(sprintf(elgg_echo('date:month:'.date('m',$timelower)),date('Y',$timelower)));\r
+\r
+set_context('search');\r
+// Get a list of blog posts\r
+$blogs = list_user_objects($page_owner->getGUID(),'blog',10,false,false,true,$timelower,$timeupper);\r
+$area2 .= "<div id=\"blogs\">" . $blogs  . "<div class='clearfloat'></div></div>";\r
+set_context('blog');\r
+\r
+///if the logged in user is not looking at their stuff, display the ownerblock otherwise\r
+//show the users favourites\r
+if(page_owner()        != get_loggedin_user()->guid){\r
+       $area3 = elgg_view('blog/ownerblock');\r
+}\r
+\r
+//get the latest comments on user's blog posts\r
+$comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc",0,0,page_owner());\r
+$area3 .= elgg_view('elggcampus_layout/latest_comments', array('comments' => $comments));\r
+//a view for the favourites plugin to extend\r
+$area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog'));\r
+//display archive\r
+$area3 .= elgg_view("blog/archive");\r
+               \r
+// Display them in the page\r
+$body = elgg_view_layout("one_column_with_sidebar", $area1 . $area2, $area3);\r
+               \r
+// Display page\r
+page_draw(sprintf(elgg_echo('blog:user'),$page_owner->name),$body);
\ No newline at end of file
index 47d22f35b4fe342c75275b2e5b52db4feb400a98..9270b33a62a768f4f5c8057f98088c2b477eecc3 100644 (file)
@@ -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);
index 2cef9c9e8ced96b163e9aca8f168a1e8eccdaafc..24aa36c8b9fdbfe73ec15a3df1f7227225db132e 100644 (file)
@@ -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\r
+\r
+       /**\r
+        * Elgg blog friends page\r
+        */\r
+\r
+       // Load Elgg engine\r
+               define('everyoneblog','true');\r
+               require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");\r
+               \r
+       // Get the current page's owner\r
+               $page_owner = page_owner_entity();\r
+               if ($page_owner === false || is_null($page_owner)) {\r
+                       $page_owner = $_SESSION['user'];\r
+                       set_page_owner($_SESSION['guid']);\r
+               }\r
+               if (!($page_owner instanceof ElggEntity)) forward();\r
+\r
+       //set blog title\r
+               $area1 = elgg_view('blog/blog_header', array('context' => "friends", 'type' => 'blog'));\r
+               \r
+       // Get a list of blog posts\r
+               set_context('search');\r
+               $area2 .= "<div id='blogs'>" . list_user_friends_objects($page_owner->getGUID(),'blog',10,false) . "<div class='clearfloat'></div></div>";\r
+               set_context('blog');\r
+               \r
+       // Get categories, if they're installed\r
+               global $CONFIG;\r
+               //$area3 .= elgg_view("blogs/favourite", array("object_type" => 'blog'));\r
+               $comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc");\r
+               $area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments));\r
+       //include a view for plugins to extend\r
+               $area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog'));\r
+               \r
+       // Display them in the page\r
+        $body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3);\r
+               \r
+       // Display page\r
+               page_draw(elgg_echo('blog:friends'),$body);\r
+               \r
 ?>
\ No newline at end of file
index 7c23e4089c21c4c2abf8b13ece833717cac20fc7..5d03ce4857fe7d88065b82b99777b3c64946c09f 100644 (file)
@@ -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\r
+\r
+/**\r
+ * Elgg blog index page\r
+ */\r
+\r
+// Load Elgg engine\r
+require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");\r
+               \r
+// Get the current page's owner\r
+$page_owner = page_owner_entity();\r
+if ($page_owner === false || is_null($page_owner)) {\r
+       $page_owner = $_SESSION['user'];\r
+       set_page_owner($_SESSION['guid']);\r
+}\r
+\r
+//set breadcrumbs if in a group\r
+//$area1 = elgg_view('elggcampus_layout/breadcrumbs_general', array('object_type' => 'blog'));\r
+       \r
+//set blog header\r
+if(page_owner()== get_loggedin_user()->guid){\r
+       $area1 .= elgg_view('blog/blog_header', array('context' => "own", 'type' => 'blog'));\r
+}elseif($page_owner instanceof ElggGroup){\r
+       $area1 .= elgg_view('groups/blog_header_group');\r
+}else{\r
+       $area1 .= elgg_view('blog/blog_header_visit', array('type' => 'blog'));\r
+}\r
+               \r
+// Get a list of blog posts\r
+set_context('search');\r
+$blogs = list_user_objects($page_owner->getGUID(),'blog',10,false, false);\r
+if(!$blogs && ($page_owner->guid == get_loggedin_user()->guid))\r
+       $blogs = elgg_view('help/blogs');\r
+$area2 = "<div id=\"blogs\">" . $blogs  . "<div class='clearfloat'></div></div>";\r
+set_context('blog');\r
+//if the logged in user is not looking at their stuff, display the ownerblock otherwise\r
+//show the users favourites\r
+if(page_owner()        != get_loggedin_user()->guid){\r
+       $area3 = elgg_view('blog/ownerblock');\r
+}else{ \r
+       //a view for the favourites plugin to extend\r
+       //$area3 .= elgg_view("blogs/favourite", array("object_type" => 'blog'));\r
+}\r
+//get the latest comments on user's blog posts\r
+$comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc",0,0,page_owner());\r
+$area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments));\r
+//a view for the favourites plugin to extend\r
+$area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog'));\r
+//display archive\r
+$area3 .= elgg_view("blog/archive");\r
+// Display them in the page\r
+$body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3);\r
+       \r
+// Display page\r
+page_draw(sprintf(elgg_echo('blog:user'),$page_owner->name),$body);
\ No newline at end of file
index 88d293487eb9b15b0fe17a2d0ce09790a81e72c0..93e11c2228e8a5ccfb669da15d8db2ed57ed1085 100644 (file)
@@ -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\r
+\r
+       /**\r
+        * Elgg blog: preview page\r
+        */\r
+\r
+               require_once(dirname(dirname(dirname(__FILE__))).'/engine/start.php');\r
+\r
+       // Make sure we're logged in (send us to the front page if not)\r
+               gatekeeper();\r
+\r
+       // Get input data\r
+       \r
+               $blogpost = new stdClass;\r
+               $blogpost->title = get_input('blogtitle');\r
+               $blogpost->description = get_input('blogbody');\r
+               $blogpost->tags = get_input('blogtags');\r
+               $blogpost->access = get_input('access_id');\r
+               $blogpost->comments_on = get_input('comments_select');\r
+               $blogpost->time_created = time();\r
+               \r
+       // Convert string of tags into a preformatted array\r
+               $blogpost->tags = string_to_tag_array($blogpost->tags);\r
+               \r
+       // Display it\r
+               $area2 = elgg_view("blog/previewpane") .\r
+                                elgg_view("object/blog",array(\r
+                                                                                       'entity' => $blogpost,\r
+                                                                                       'entity_owner' => $_SESSION['user']->guid,\r
+                                                                                       'comments' => false,\r
+                                                                                       'full' => true\r
+                                                                                       ));\r
+                                                                                       \r
+       // Set the title appropriately\r
+               $title = sprintf(elgg_echo("blog:posttitle"),$_SESSION['user']->name,$blogpost->title);\r
+\r
+       // Display through the correct canvas area\r
+               $body = elgg_view_layout("one_column_with_sidebar", $area1 . $area2);                   \r
+               echo page_draw($blogpost->title,$body);\r
+\r
+?>\r
index 7be396759cf9cd166cc53605765ccd39ce1e5c4e..291a7bdf8b8bdaab6b80b64dd24d57bb347d5115 100644 (file)
@@ -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\r
+\r
+       /**\r
+        * Elgg read blog post page\r
+        * @package ElggBlog\r
+        * @copyright Curverider Ltd 2008-2009\r
+        */\r
+\r
+// Load Elgg engine\r
+require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");\r
+\r
+// Get the specified blog post\r
+$post = (int) get_input('blogpost');\r
+\r
+// If we can get out the blog post ...\r
+if ($blogpost = get_entity($post)) {\r
+       // Set variables\r
+       $blog_acl = '';                 \r
+       // Set the page owner\r
+       if ($blogpost->container_guid)\r
+               set_page_owner($blogpost->container_guid);\r
+       else\r
+               set_page_owner($blogpost->owner_guid);\r
+               \r
+       //set breadcrumbs\r
+       //$area2 = elgg_view('elggcampus_layout/breadcrumbs', array('object_title' => $blogpost->title, 'object_type' => 'blog'));\r
+       // Display it\r
+       $area2 .= elgg_view_entity($blogpost, true);\r
+       //get the blog's access level\r
+       $blog_acl = get_readable_access_level($blogpost->access_id);                                    \r
+       // Set the title appropriately\r
+       $title = $blogpost->title;\r
+       //set blog ownerblock if not your own\r
+       if($blogpost->owner_guid != get_loggedin_user()->guid){\r
+               $area3 = elgg_view('blog/ownerblock');\r
+       }\r
+       //display the read sidebar\r
+       //$area3 .= elgg_view('blog/read_sidebar', array('blog_acl' => $blog_acl, 'entity' => $blogpost));\r
+       //if the logged in user is not looking at their stuff, display the ownerblock otherwise\r
+       //show the users favourites\r
+       if(page_owner() != get_loggedin_user()->guid){\r
+               $area3 = elgg_view('blog/ownerblock');\r
+       }else{  \r
+               //a view for the favourites plugin to extend\r
+               $area3 .= elgg_view("blogs/sidebar_options", array("object_type" => 'blog'));\r
+       }\r
+       //display archive\r
+       $area3 .= elgg_view("blog/archive");\r
+       //get the latest comments on user's blog posts\r
+       $comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc",0,0,page_owner());\r
+       $area3 .= elgg_view('page_elements/latest_comments', array('comments' => $comments));\r
+\r
+       // Display through the correct canvas area\r
+       $body = elgg_view_layout("one_column_with_sidebar", $area1.$area2, $area3);\r
+                       \r
+// If we're not allowed to see the blog post\r
+} else {               \r
+       // Display the 'post not found' page instead\r
+       $body = elgg_view("blog/notfound");\r
+       $title = elgg_echo("blog:notfound");            \r
+}\r
+               \r
+// Display page\r
+page_draw($title,$body);\r
+               \r
 ?>
\ No newline at end of file
diff --git a/mod/blog/shared.php b/mod/blog/shared.php
new file mode 100644 (file)
index 0000000..67dae20
--- /dev/null
@@ -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
index baf059e75f86f850a62dce077def2ba71fcf621e..6f4ca7889a193edbae98e872e2502cb722a1807d 100644 (file)
@@ -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
index 6f9a898b5db6a5d6459eef1358e2cd74727d996f..8f816b2856b7afd03ae76cdd1959380ccfb22a03 100644 (file)
@@ -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
index 2262cadffecf3083543475dea86ad69b05fd28a7..f068e7c50f2ccda53733c5b576cbca340f8609c4 100644 (file)
@@ -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
index 3fc4a0d2d15eb3ed57a5138bd4cc402a987f762a..c4e3e3c58469377005521aa28d5f659b9ad1343d 100644 (file)
@@ -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
index 042ac73467061cce922e4268a2de9f1011063e57..baff805bfcb9bcc8cc3200e702611c4b31bc74bd 100644 (file)
@@ -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
index 324790f29aaf9f9c301d2c6d4224f4abf0e43415..6ff8b7bde46834b89f97870e8f63b9807b8c4e22 100644 (file)
@@ -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));
index a7c33a5153cce10824e6028d850de7afa8c1201c..abfa5319974c9c7b961a2ec64cece4829064458a 100644 (file)
@@ -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
index 10ef4e3a11f5be63e106c79067efe411c5f9e59d..466c3a0bea71285d37c4b5e573bbec05f9223468 100644 (file)
@@ -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
index 04a0407458e8cc4bc606b24f7ae235d64cc04d0f..ed9343fefd63569f0061e533c209d37e58744b43 100644 (file)
@@ -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);
index 51c337238a6b42a9c93aa4963a571b55834691c2..11c3235d12f70adc7f1a436eeb87b1e3f664134d 100644 (file)
@@ -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);
index 31dd2b7ef5fb6f2d5b93cf24520523f448619e7f..1568bf88e49e79a7ff175e481b5b9d681a4bbcc2 100644 (file)
@@ -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);
index 5d33d2bc3505148e447d578c62da0b5ef33fc76b..94160891a3c452cadae9267be28867b0935b428e 100644 (file)
@@ -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
index 2f8f14a02bfc91acee4fa61e7c12630f062c3836..6c4b97a25cfc48ff2355cffb737b872e4987fa32 100644 (file)
@@ -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);
index f9c5131cc30cd34b7d65533663a456906a5d1999..531cc1fd67d6355dd0bd0910d1b8e17b6c94be0c 100644 (file)
@@ -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');
        
index 72160469111338e8e36141ce05940bdc3c16a689..42875b52fa9bd36767c72bf6cd8cf36485248ad4 100644 (file)
 
                }
                
-               $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
index 36137033d62bd18982ecf98da455e63a4d19547b..94853d373dd9262f90f8fba5ac2bb4fe4d853308 100644 (file)
@@ -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);
index e9b8f1cf17f3cc2192a5e3ab963640578746200e..f2594c786cd9ca8b380aea5e8fe9fb557e777ec6 100644 (file)
@@ -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
index 1ce9fd86361552addc23018dcd00d6faecc9d56a..f83ad51eb71f896d8b691ae26f22ad31d3d8db29 100644 (file)
@@ -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
index 66cd5ed16e1a9e1895df0900423f2985571af0ac..4b5d6b89fd2d694dd9d69271346f43020edd7ef4 100644 (file)
@@ -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);
index a812a213cfd4ed222dd4664ecf8d418e7d24431f..ed41c76bfd2c4230fe9b0c037669f45ca39018a5 100644 (file)
@@ -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
index 3459c3f4a063126e1b37992df1e7a4af058d619e..32b8d1902c34e8587453b93e8cd7599f4465fbae 100644 (file)
@@ -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
index 70d3c199ba72125b6b705b48d3a5477540251917..9f8c962d7b232e03b7212e6d631c7b445bebc1f6 100644 (file)
@@ -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);
index f3c9e4d41e5b0e1304c603555fd82d42d9ef15a7..3629b94d58166b656c10ad919d6f5bce18960b67 100644 (file)
@@ -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));
 
 ?>
index d9ef0a7320c9f38eebab1109f3c0c06498dcb1e6..c19ed8b4aa9efbf5eb14ca56cb39827f97fb120a 100644 (file)
@@ -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
index e5124a71aa20bc9bf1a6c371f9b349700b3f729e..97c1cfff445cfc0bbabc82593f187dfd043fa2fe 100644 (file)
@@ -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
index 2c3c5af505b9fed4b3c7114fe521782c7a6a7a7e..9e84a3e671099ade515d61aff97ce9ba3d055bfe 100644 (file)
@@ -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
index ecab600730443379aa743936e95cbb830b4a69f5..f918eec5c0d1bfb7af925b01c5f0de7695cd4163 100644 (file)
@@ -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
index 750e932e7e674579676d8d81dd1eb4fe1baec5b6..4f432b47ff7121c40f48c321888182e50000c31c 100644 (file)
@@ -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
index 1e288458243cd8c5327c26c69743014bdf8602d2..233214c1533bba594bb436b52b8c706ec9a2d834 100644 (file)
@@ -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
index 313d144fea4226fea28d20119cd18ef412b06c7a..9894ce35d21d022682acc738263ecea66eee3a47 100644 (file)
@@ -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);
index 1c5c20d305200528498beca0d760693710bee4a3..65b4b10daf4ce1e6542b81818c25ed144e9448c3 100644 (file)
@@ -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);
index 4087012cf4975b32af9a48ac2177d6ff6bb0c2ea..17076df01bc6fc6c06cd0da3b536daddbd0dde77 100644 (file)
@@ -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
index 400e0dc1f2f75b8656a0ff1f7aa0f7a75143facb..3f3a4c5feac940913caa9e4e270b13a387cc4599 100644 (file)
@@ -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
index ff251dddc684e16156f5072217a2c403850e7c24..a09c688ed87042d35b6ecfc247c683bfeefb4d7e 100644 (file)
@@ -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;
index 5a66ac47cbfb5b41ef2353a4a78e559e0918c96e..28b0ff235dd8f4fa7bb660df76104ef0ad008c5a 100644 (file)
@@ -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
index 0341b590bcac9530ecccb8c67adce57920aad6fa..000a5eb1a6766ae39405d91814bc2851d92dd061 100644 (file)
@@ -86,7 +86,7 @@ function sitepages_get_edit_section_content($page_type) {
        $form .= elgg_view($view, array('page_type' => $page_type));\r
        $body = $title .  $menu . $form;\r
 \r
-       $content = elgg_view_layout('one_column_with_sidebar', '', $body, $keywords);\r
+       $content = elgg_view_layout('one_column_with_sidebar', $body, $keywords);\r
        return $content;\r
 }\r
 \r
@@ -107,7 +107,7 @@ function sitepages_get_page_content($page_type) {
                $body .= elgg_view('page_elements/elgg_content', array('body' => elgg_echo('sitepages:notset')));\r
        }\r
 \r
-       $content = elgg_view_layout('one_column_with_sidebar', '', $body);\r
+       $content = elgg_view_layout('one_column_with_sidebar', $body);\r
        return $content;\r
 }\r
 \r
index 6012338fa2c57ad2f1987655579875c3c3bf5c77..213b633c7dff6be2227957dc1481bb64fa571447 100644 (file)
@@ -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);
index db35f441091e8f7826ff84b12ec9392c8f5aaf03..1f0913ab34b9eacd003722937ccd9d0ce12cf6d4 100644 (file)
@@ -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);
index 078e932711780a36b9060d049f942d2244b9f515..a1e0a97abe0cff3e1d41367f9186b24a6198879b 100644 (file)
@@ -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);
index 251725496370d4ac843603d7f37fbf5ece027846..b5b6e57c6980d3613daf62390fc0919a65699171 100644 (file)
@@ -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
index d26f626f7ec83f0f7857d0189cfcd98bb594aa56..11459a6b70756bb5737d769cef14b36eef09a8cd 100644 (file)
@@ -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()))));
index 48bf46a043ded5d4fc18d05dab75a30a06f63153..f354168b469d4ea791281c870c180eacd19e71fe 100644 (file)
@@ -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
index 8bfdc87fa792dcbffced123ec5512347f9069498..7e7a3967f6fa4a5950c707398b74512d2d92fc2c 100644 (file)
@@ -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
index f7fff4d0879b78abe5ab915cf096d43f934f424f..d7271c9c3706264fddd430ed31600d58db9c0d1a 100644 (file)
        <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>