From: moodler Date: Tue, 28 Dec 2004 13:49:44 +0000 (+0000) Subject: Add messaging buttons to the user profile X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2fc1b1feb8a703c834622123f763e5d0ca050809;p=moodle.git Add messaging buttons to the user profile --- diff --git a/user/view.php b/user/view.php index f7e505be21..7e2fff741d 100644 --- a/user/view.php +++ b/user/view.php @@ -282,6 +282,21 @@ echo ""; echo ""; } + if ($USER->id == $user->id) { + if ($countmessages = count_records('message', 'useridto', $user->id)) { + $messagebuttonname = get_string("messages", "message")."($countmessages)"; + } else { + $messagebuttonname = get_string("messages", "message"); + } + echo "
"; + echo ""; + echo "
"; + } else { + echo "
id\" action=\"../message/user.php\" method=\"get\">"; + echo "id\" />"; + echo "id', 'message_$user->id', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\" />"; + echo "
"; + } echo ""; echo "\n";