]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
videolist ownerblock menu put back
authorDave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 26 May 2010 16:32:01 +0000 (16:32 +0000)
committerDave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 26 May 2010 16:32:01 +0000 (16:32 +0000)
git-svn-id: http://code.elgg.org@6236 36083f99-b078-4883-b0ff-0f9b5a30f544

start.php

index 2a23b8850544b11c7ac0484e5b62694d27687c8e..effe3c73d92515f1aa9d7c50733f1003769aa108 100644 (file)
--- a/start.php
+++ b/start.php
@@ -40,6 +40,8 @@ function videolist_init() {
 
        // Register entity type
        register_entity_type('object','videolist');
+       
+       register_plugin_hook('profile_menu', 'profile', 'videolist_profile_menu');
 }
 
 /**
@@ -174,6 +176,17 @@ function videolist_object_notifications_intercept($hook, $entity_type, $returnva
        return null;
 }
 
+function videolist_profile_menu($hook, $entity_type, $return_value, $params) {
+       global $CONFIG;
+       
+       $return_value[] = array(
+               'text' => elgg_echo('videolist'),
+               'href' => "{$CONFIG->url}pg/videolist/owned/{$params['owner']->username}",
+       );
+       
+       return $return_value;
+}
+
 // Register a handler for adding videos
 register_elgg_event_handler('create', 'videolist', 'videolist_create_event_listener');