aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 14:21:12 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 14:21:12 +0000
commit688a1e02a89e25caba37c91be7ac56d7bdc6dc4a (patch)
treef954680aa8a7aaa33f2cc5b1846c952d516995fe /mod
parentf361fa6d7a3e990ed6bcb05cf634ef9cfae0fe4d (diff)
downloadelgg-688a1e02a89e25caba37c91be7ac56d7bdc6dc4a.tar.gz
elgg-688a1e02a89e25caba37c91be7ac56d7bdc6dc4a.tar.bz2
Refs #109 : Widget support
git-svn-id: https://code.elgg.org/elgg/trunk@1293 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/groupprofile.php9
-rw-r--r--mod/groups/languages/en.php1
-rw-r--r--mod/groups/start.php20
3 files changed, 26 insertions, 4 deletions
diff --git a/mod/groups/groupprofile.php b/mod/groups/groupprofile.php
index 9d354ef0d..2602dac1e 100644
--- a/mod/groups/groupprofile.php
+++ b/mod/groups/groupprofile.php
@@ -10,15 +10,16 @@
*/
$group_guid = get_input('group_guid');
+ set_context('groups');
- $group = get_entity($group_guid);
+ $group = get_entity($group_guid);
- $body = elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true));
+ $body = elgg_view_layout('one_column', elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true)));
- // TODO: Add widgets etc
+ $body .= elgg_view_layout('widgets', "", "", elgg_echo('groups:nowidgets'));
// Finally draw the page
- page_draw($group->name, elgg_view_layout('one_column', $body));
+ page_draw($group->name, $body);
?> \ No newline at end of file
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index f43e89fb5..3f26a6f0e 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -77,6 +77,7 @@ or click below to confirm request:
%s",
'groups:river:member' => 'is now a member of',
+ 'groups:nowidgets' => 'No widgets defined!',
);
diff --git a/mod/groups/start.php b/mod/groups/start.php
index f577b096c..ca402df15 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -53,6 +53,9 @@
// Use group widgets
use_widgets('groups');
+ // Add a page owner
+ add_page_owner_handler('groups_page_owner_handler');
+
// For now, we'll hard code the groups profile items as follows:
// TODO make this user configurable
@@ -74,6 +77,23 @@
}
/**
+ * Set a page owner handler.
+ *
+ */
+ function groups_page_owner_handler()
+ {
+ $group_guid = get_input('group_guid');
+ if ($group_guid)
+ {
+ $group = get_entity($group_guid);
+ if ($group instanceof ElggGroup)
+ return $group->owner_guid;
+ }
+
+ return false;
+ }
+
+ /**
* Group page handler
*
* @param array $page Array of page elements, forwarded by the page handling mechanism