aboutsummaryrefslogtreecommitdiff
path: root/mod/dashboard/start.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-08-25 10:00:38 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-08-25 10:00:38 -0700
commitdccc333c765bb28da55b4a55d9c916acdb88413a (patch)
treebdd26a0b4cd85241a19b7fcb2c0770f0ac3eb9f0 /mod/dashboard/start.php
parentec7b94a64aef23b85866ecdac8e8acc712d29bb6 (diff)
parent003cb81c7888f4d2fd763e5814027c6f8d71186f (diff)
downloadelgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.gz
elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.bz2
Merge branch 'master' of github.com:brettp/Elgg
Diffstat (limited to 'mod/dashboard/start.php')
-rw-r--r--mod/dashboard/start.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php
index 4fa048b3d..69572bd32 100644
--- a/mod/dashboard/start.php
+++ b/mod/dashboard/start.php
@@ -8,6 +8,8 @@ elgg_register_event_handler('init', 'system', 'dashboard_init');
function dashboard_init() {
elgg_register_page_handler('dashboard', 'dashboard_page_handler');
+ elgg_extend_view('css/elgg', 'dashboard/css');
+
elgg_register_menu_item('topbar', array(
'name' => 'dashboard',
'href' => 'dashboard',
@@ -15,6 +17,8 @@ function dashboard_init() {
'priority' => 450,
'section' => 'alt',
));
+
+ elgg_register_plugin_hook_handler('get_list', 'default_widgets', 'dashboard_default_widgets');
}
function dashboard_page_handler() {
@@ -40,3 +44,27 @@ function dashboard_page_handler() {
echo elgg_view_page($title, $body);
}
+
+
+/**
+ * Register user dashboard with default widgets
+ *
+ * @param unknown_type $hook
+ * @param unknown_type $type
+ * @param unknown_type $return
+ * @param unknown_type $params
+ * @return array
+ */
+function dashboard_default_widgets($hook, $type, $return, $params) {
+ $return[] = array(
+ 'name' => elgg_echo('dashboard'),
+ 'widget_context' => 'dashboard',
+ 'widget_columns' => 3,
+
+ 'event' => 'create',
+ 'entity_type' => 'user',
+ 'entity_subtype' => ELGG_ENTITIES_ANY_VALUE,
+ );
+
+ return $return;
+} \ No newline at end of file