diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-06-11 21:57:33 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-06-11 21:57:33 +0000 |
commit | e7b9401e4e918ec7c4a442e2acb3fb48926e90a9 (patch) | |
tree | 3450eca9500facc192da0fd1373898962ae6fe8f /mod/profile/start.php | |
parent | 9cff8b2cbf16d11fe0861229347edf5e62dac2b5 (diff) | |
download | elgg-e7b9401e4e918ec7c4a442e2acb3fb48926e90a9.tar.gz elgg-e7b9401e4e918ec7c4a442e2acb3fb48926e90a9.tar.bz2 |
Some code cleanup on profile plugin.
Added wrapper view for profile content.
Added ECML for profile content.
Moved profile/profile_content/sidebar to profile/sidebar
git-svn-id: http://code.elgg.org/elgg/trunk@6464 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/start.php')
-rw-r--r-- | mod/profile/start.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php index 90caa8f64..17a55e1f9 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -50,7 +50,11 @@ function profile_init() { // Now override icons register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook'); - + + // allow ECML in parts of the profile + register_plugin_hook('get_views', 'ecml', 'profile_ecml_views_hook'); + + // default profile fields admin item elgg_add_admin_submenu_item('defaultprofile', elgg_echo('profile:edit:default'), 'appearance'); } @@ -258,6 +262,20 @@ function profile_usericon_hook($hook, $entity_type, $returnvalue, $params){ } } +/** + * Parse ECML on parts of the profile + * + * @param unknown_type $hook + * @param unknown_type $entity_type + * @param unknown_type $return_value + * @param unknown_type $params + */ +function profile_ecml_views_hook($hook, $entity_type, $return_value, $params) { + $return_value['profile/profile_content'] = elgg_echo('profile'); + + return $return_value; +} + // Make sure the profile initialisation function is called on initialisation register_elgg_event_handler('init','system','profile_init',1); register_elgg_event_handler('init','system','profile_fields_setup', 10000); // Ensure this runs after other plugins |